Manage BTRFS file systems.
Alberto Planas <firstname.lastname@example.org>
properties(name, device, use_default=False, __dest=None, **properties)¶
Makes sure that a list of properties are set in a subvolume, file or device.
Name of the object to change
Device where the object lives, if None, the device will be in name
If True, this subvolume will be resolved to the default subvolume assigned during the create operation
Dictionary of properties
Valid properties are 'ro', 'label' or 'compression'. Check the documentation to see where those properties are valid for each object.
subvolume_created(name, device, qgroupids=None, set_default=False, copy_on_write=True, force_set_default=True, __dest=None)¶
Makes sure that a btrfs subvolume is present.
Name of the subvolume to add
Device where to create the subvolume
Add the newly created subcolume to a qgroup. This parameter is a list
If True, this new subvolume will be set as default when mounted, unless subvol option in mount is used
If false, set the subvolume with chattr +C
If false and the subvolume is already present, it will not
force it as default if
set_default is True
subvolume_deleted(name, device, commit=False, __dest=None)¶
Makes sure that a btrfs subvolume is removed.
Name of the subvolume to remove
Device where to remove the subvolume
Wait until the transaction is over