[PATCH blivet rhel7-branch] iscsi: mount partitions in initramfs for root on iscsi (#740106)

Radek Vykydal rvykydal at redhat.com
Fri Sep 5 13:09:11 UTC 2014


On 09/05/2014 03:04 PM, Radek Vykydal wrote:
> / and /usr are mounted automatically, for other partitions
> x-initrd.mount option is needed in /etc/fstab
>
> Resolves: rhbz#740106
> ---
>   blivet/__init__.py | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/blivet/__init__.py b/blivet/__init__.py
> index a4264f3..b1cfd8e 100644
> --- a/blivet/__init__.py
> +++ b/blivet/__init__.py
> @@ -2917,6 +2917,10 @@ class FSSet(object):
>               devices += self.swapDevices
>   
>           netdevs = self.devicetree.getDevicesByInstance(NetworkStorageDevice)
> +
> +        rootdev = devices[0]
> +        root_on_netdev = any(rootdev.dependsOn(netdev) for netdev in netdevs)
> +
>           for device in devices:
>               # why the hell do we put swap in the fstab, anyway?
>               if not device.format.mountable and device.format.type != "swap":
> @@ -2943,6 +2947,8 @@ class FSSet(object):
>               for netdev in netdevs:
>                   if device.dependsOn(netdev):
>                       options = options + ",_netdev"
> +                    if root_on_netdev and device.format.mountpoint not in ["/", "/usr"]:
You should use mountpoint instead of device.format.mountpoint here.



More information about the anaconda-patches mailing list