set_label
Description:
set filesystem label
Set the filesystem label on mountable
to label
.
Only some filesystem types support labels, and libguestfs supports setting labels on only a subset of these.
ext2, ext3, ext4 Labels are limited to 16 bytes.
NTFS Labels are limited to 128 unicode characters.
XFS The label is limited to 12 bytes. The filesystem must not be mounted when trying to set the label.
btrfs The label is limited to 255 bytes and some characters are not allowed. Setting the label on a btrfs subvolume will set the label on its parent filesystem. The filesystem must not be mounted when trying to set the label.
fat The label is limited to 11 bytes.
swap The label is limited to 16 bytes.
If there is no support for changing the label for the type of the specified filesystem, set_label will fail and set errno as ENOTSUP.
To read the label on a filesystem, call vfs_label.
Parameters:
this |
A GuestfsSession object |
Returns:
true on success, false on error |