Skip to contentSkip to conversation

Changing label of a mounted XFS filesystem

DISCUSSION Matthias Schniedermeyer 3 participants 4 messages Jul 3, 2014

lore
Share & tools
lore
#0 lore raw

Hi

Is there a particular reason that the label of a mounted XFS fileystem can't be changed?

The man-page of xfs_admin gives a blanket "Devices that are mounted cannot be modified" but no explanation for why that is.

In my case it's the label of the root-filesystem i want to change. So to change it i would have to boot the computer with some kind of live or rescure-system. Or i would need to temporarily connect the device to another computer, both aren't really nice hoops to jump through just to change a few characters.

The only thing i can compare this to is ext2 and with ext2 (/boot partition, so it really is ext2) i can change the label to my hearts content, even the device is mounted.

For my case i could live with it if i could remount the filesystem RO, change the label and then having to reboot the machine, still nicer than the other 2 options.

Signature · 6 lines
Matthias

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#1 lore raw

Hi,

Quoted 5 lines · Matthias Schniedermeyer

Hi

Is there a particular reason that the label of a mounted XFS fileystem can't be changed?

Maybe since we have no user request for this function? :)

Quoted 9 lines

The man-page of xfs_admin gives a blanket "Devices that are mounted cannot be modified" but no explanation for why that is.

In my case it's the label of the root-filesystem i want to change. So to change it i would have to boot the computer with some kind of live or rescure-system. Or i would need to temporarily connect the device to another computer, both aren't really nice hoops to jump through just to change a few characters.

Quoted 7 lines

The only thing i can compare this to is ext2 and with ext2 (/boot partition, so it really is ext2) i can change the label to my hearts content, even the device is mounted.

For my case i could live with it if i could remount the filesystem RO, change the label and then having to reboot the machine, still nicer than the other 2 options.

Btrfs support set/change label on a mounted file system via ioctl(2), maybe we can implement it if that sounds useful to our users.

Cheers,
-Jeff

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw
Quoted 24 lines · Jeff Liu

Hi,

Quoted 5 lines · Matthias Schniedermeyer

Hi

Is there a particular reason that the label of a mounted XFS fileystem can't be changed?

Maybe since we have no user request for this function? :)

Quoted 13 lines

The man-page of xfs_admin gives a blanket "Devices that are mounted cannot be modified" but no explanation for why that is.

In my case it's the label of the root-filesystem i want to change. So to change it i would have to boot the computer with some kind of live or rescure-system. Or i would need to temporarily connect the device to another computer, both aren't really nice hoops to jump through just to change a few characters.

The only thing i can compare this to is ext2 and with ext2 (/boot partition, so it really is ext2) i can change the label to my hearts content, even the device is mounted.

Quoted 6 lines
Quoted 3 lines

For my case i could live with it if i could remount the filesystem RO, change the label and then having to reboot the machine, still nicer than the other 2 options.

Btrfs support set/change label on a mounted file system via ioctl(2), maybe we can implement it if that sounds useful to our users.

I would vote for that, i've run into this particular brickwall several times over the years.

I more or less reguarly clone or "move" storage and/or machines around and several times i forgot to re-label filesystems "at that point in time were it was easily done" and then run into the brickwall when first booting whatever i built at that time. Same has happend to me for /etc/fstab and/or GRUB configuration. But unless GRUB doesn't boot at all it can be rectified without too much hassle.

Yesterday i "fixed" it by changing the fstab to the "wrong" label.

The other solution would be for me to make a checklist, so i don't forget such things. But that would be to easy. ;-)

Signature · 6 lines
Matthias

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#3 lore raw
Quoted 11 lines · Matthias Schniedermeyer
Quoted 10 lines · Jeff Liu

Hi,

Quoted 5 lines · Matthias Schniedermeyer

Hi

Is there a particular reason that the label of a mounted XFS fileystem can't be changed?

Maybe since we have no user request for this function? :)

Most likely. It's currently done by xfs_db, which is an offline tool.

Quoted 17 lines
Quoted 17 lines
Quoted 16 lines

The man-page of xfs_admin gives a blanket "Devices that are mounted cannot be modified" but no explanation for why that is.

In my case it's the label of the root-filesystem i want to change. So to change it i would have to boot the computer with some kind of live or rescure-system. Or i would need to temporarily connect the device to another computer, both aren't really nice hoops to jump through just to change a few characters.

The only thing i can compare this to is ext2 and with ext2 (/boot partition, so it really is ext2) i can change the label to my hearts content, even the device is mounted.

For my case i could live with it if i could remount the filesystem RO, change the label and then having to reboot the machine, still nicer than the other 2 options.

Quoted 5 lines
Quoted 2 lines

Btrfs support set/change label on a mounted file system via ioctl(2), maybe we can implement it if that sounds useful to our users.

I would vote for that, i've run into this particular brickwall several times over the years.

There's a bunch of things I'd like to make online modifiable that currently can only be done offline by xfs_db and other tools. I'll add this to the list, and hopefully when I get a little time I'll do something about it...

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs