[PATCH] v3 btrfs subvolume reclaim option for kickstart

Gene Czarcinski gene at czarc.net
Sun Nov 24 17:23:11 UTC 2013


On 11/22/2013 03:35 PM, David Lehman wrote:
> 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.
I always said that you can do this manually such as first coming up in 
rescue mode deleting the root subvol and then rebooting to do the 
install but being able to specify --reclaim just saves time and effort.

A second point, yes you can use a different subvol name but then you 
still have the disk SPACE that is used by the old subvol.

My question to you is not "why do this" but "why not do this"

The pykickstart patch without the anaconda patch is useless.  The 
anaconda patch without the pykickstart patch is equally as useless.

But, if the anaconda patch is added, then that will be a motivator for 
the pykickstart patch to be added.

There was zero reason for the pythen-blivet UUID patch before the 
existing BTRFS subvolumes were added to /etc/fstab.  However, once that 
change was made to anaconda, yes, there was a reason for the change to 
blivet.

Same argument here.
>
>>> 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.
Mmm. I have never heard of clearpart --list=root

When doing a interactive install where I reclaim the name and space used 
by the root subvol, the list of actions give me are:
   destroy filesystem subvol=root
   destroy device subvol=root
   create  device subvol=root
   create filesystem subvol=root

which is exactly the same thing that happens with my patch.
>
>>> 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
>
> _______________________________________________
> 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