[PATCH] v3 btrfs subvolume reclaim option for kickstart

David Lehman dlehman at redhat.com
Fri Nov 22 20:35:24 UTC 2013


On Fri, 2013-11-22 at 14:12 -0500, Gene Czarcinski wrote:
> On 11/08/2013 04:30 PM, Gene Czarcinski wrote:
> > This involves a patch to pykickstart and a patch to anaconda.
> >
> > The patch for anaconda was created on anaconda-20.25.6-1 and the patch
> > for pykickstart was created on r-1.99.44-1 and should easily apply or
> > rebase.

I am not the pykickstart maintainer, so my opinion is mostly commentary,
but I don't think these patches add anything that a) is already present
for other device types and b) cannot be achieved in numerous other ways.
If you have an existing btrfs volume with a "root" subvolume and you
want to install a new OS into the same volume, you can easily either a)
create a "newroot" subvolume (or any of a million variations thereof) or
b) remove or rename the old "root" subvolume prior to performing the new
installation during which you create a new "root" subvolume.

> >
> > The patches implement a capability currently available if you perform a
> > non-kickstart custom-allocation install where you can reclaim the name
> > (and space) of an existing btrfs subvolume and then reuse (recreate) a
> > new btrfs subvolume of the smae name over it.

The analog to the interactive installer functionality is actually
(literally) a combination of the following:

clearpart --list=root
btrfs / --subvol --name=root <your_btrfs_volume_label>

I just learned, however, that clearpart --list does not work for devices
other than disks and partitions as of now. I have just finished briefly
testing some patches that will make the above work as expected.

> >
> > The are times in both virtual and real world when a reinstall is needed.
> > Currently, when this involves a btrfs subvolume as root, you have to manually
> > delete that subvolume.  The capability implemented in these patches allows
> > a kickstart user to do that at install time.
> >
> > These patches were used to create an updated pykickstart noarch.rpm and an
> > updates images which included the anaconda and pykickstart changes.  The
> > updates iamge was then used with an updated ISO created with lorax/pungi
> > under mock running on a Fedora 20-Beta system to creat a TC6+ install
> > environment.  Testing was successful and everything worked as designed.
> >
> > Note:  "--reclaim" was chosen for the option since it is both different and,
> > at the same time, the same as the term used in a non-kickstart install.
> >
> >
> > Gene Czarcinski (1):
> >    v3 add reclaim capability for btrfs subvolumes
> >
> >   pyanaconda/kickstart.py | 8 ++++++++
> >   1 file changed, 8 insertions(+)
> >
> > Gene Czarcinski (1):
> >    v3 add reclaim option to kickstart btrfs command
> >
> >   pykickstart/commands/btrfs.py | 5 +++++
> >   1 file changed, 5 insertions(+)
> >
> PING
> 
> Since the update to "Specify btrfs volumes by UUID in /etc/fstab." has 
> been added to the blivet git repository, commit id:
>       b3042c63e93fe84fe3a22ff1666fe04216b3d270
> 
> I was wondering if the reclaim update could be added also.  Clearly, 
> both of these will not be part of Fedora 20 but I would like to get 
> reclaim into the repository along with the UUID update so that it not be 
> forgotten and will be included in Fedora 21.
> 
> BTW, I noticed that you have added a bit more code to the UUID update.  
> I backported this patch onto python-blivet-0.23.5-1 and it worked just fine.
> 
> Gene
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches




More information about the anaconda-patches mailing list