xfs labels on mounted volumes

2020.11.28

turns out you can’t directly create an xfs label on a mounted volumes.

xfs_admin -L /dev/volume doesn’t work. 🙁

thanks to a coworker, i learned you can issue a raw xfs command to set the label instead.

xfs_io -c "label -s SOMELABEL" /some_mountpoint

verify with xfs_admin -l /dev/volume

how’d i discover this? mdraid volume wouldn’t keep the device name across reboots in centos 7. i changed /etc/fstab to mount with the label instead. also screw UUIDs.

Categories : geek

Leave a comment