[PATCH 1/2] fix support existing btrfs subvolumes

David Lehman dlehman at redhat.com
Mon Oct 21 15:45:19 UTC 2013


On Fri, 2013-10-18 at 15:44 -0400, Gene Czarcinski wrote:
> This patch corrects anaconda 20.25.1 to update device.format.__
> rather than device.___ and adds the information of both subvol
> name and parent btrfs volume UUID 'what to mount'
> ---
>  pyanaconda/kickstart.py | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
> index b146ecc..4624fce 100644
> --- a/pyanaconda/kickstart.py
> +++ b/pyanaconda/kickstart.py
> @@ -386,7 +386,9 @@ class BTRFSData(commands.btrfs.F17_BTRFSData):
>              if not device:
>                  raise KickstartValueError(formatErrorMsg(self.lineno, msg="Specified nonexistent BTRFS volume %s in btrfs command" % self.name))
>  
> -            device.mountpoint = self.mountpoint
> +            device.format.mountpoint = self.mountpoint

This one's obviously good.

> +            device.format.mountopts = "subvol=%s" % (self.name)

This is already done when the subvol is detected, so this is not needed.

> +            device.format.uuid = dev.uuid # use the UUID from the parent (the BTRFS Volume)

This should also be done when the btrfs filesystem is detected. If that
isn't happening it should be fixed in blivet/devicetree.py -- not here.

>          else:
>              request = storage.newBTRFS(name=name,
>                                         subvol=self.subvol,




More information about the anaconda-patches mailing list