Specifying an existing BTRFS subvolume in a kickstart file is now supported with --noformat. When --noformat is pecified, the BTRFS subvolume will be added to the /etc/fstab definition with the UUID of the BTRFS parent volume.
The use of --noformat replaces the use of --useexisting although currently there is no difference. A test is added just in case noformat is specified for a BTRFS volume.
This patch was developed against git level anaconda-20-22-1, built on a Fedora TC1+ system and tested by running F20-beta-TC2 installation with all repos enabled onto a KVM virtual. --- pyanaconda/kickstart.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py index 34929b9..739f716 100644 --- a/pyanaconda/kickstart.py +++ b/pyanaconda/kickstart.py @@ -346,13 +346,20 @@ class BTRFSData(commands.btrfs.F17_BTRFSData): if self.mountpoint != "" and self.mountpoint[0] != '/': raise KickstartValueError(formatErrorMsg(self.lineno, msg="The mount point "%s" is not valid." % (self.mountpoint,)))
- if self.preexist: + if not self.format: # --noformat + if not self.subvol: + raise KickstartValueError(formatErrorMsg(self.lineno, msg="Specifying btrfs command for existing volume %s invalid" % self.name)) + device = devicetree.getDeviceByName(self.name) if not device: device = udev.udev_resolve_devspec(self.name)
if not device: raise KickstartValueError(formatErrorMsg(self.lineno, msg="Specified nonexistent BTRFS volume %s in btrfs command" % self.name)) + device.format.mountpoint = self.mountpoint + device.format.mountopts = "subvol=%s" % (self.name) + device.format.uuid = dev.uuid # use the UUID from the parent (the BTRFS Volume) + return else: # If a previous device has claimed this mount point, delete the # old one.
On Mon, 2013-10-14 at 09:33 -0400, Gene Czarcinski wrote:
Specifying an existing BTRFS subvolume in a kickstart file is now supported with --noformat. When --noformat is pecified, the BTRFS subvolume will be added to the /etc/fstab definition with the UUID of the BTRFS parent volume.
The use of --noformat replaces the use of --useexisting although currently there is no difference. A test is added just in case noformat is specified for a BTRFS volume.
This patch was developed against git level anaconda-20-22-1, built on a Fedora TC1+ system and tested by running F20-beta-TC2 installation with all repos enabled onto a KVM virtual.
I have a patch that fixes the bug in question, as I said in the bug report. Here's a link to the post:
https://lists.fedorahosted.org/pipermail/anaconda-patches/2013-October/00654...
Please use the bug report for further correspondence on this subject.
Also, thanks for digging in and looking for a solution.
David
anaconda-patches@lists.fedorahosted.org