SNFS/Xsan: Changing a volume name

By | 16th April 2020

In the past it used to be a very straightforward process. You would rename the volume configuration file and run cvfsck.

With newer versions if you try to do that you will get an error message.

To make the name change you can use the cvupdatefs command.

If you have more than one volume running, the below instructions will allow you to rename one volume while the rest are still running, minimising downtime.

Stopping the file system

Stop the file system

# cvadmin -e 'stop oldname_volume1'

Check that it hasn't failed over.

# cvadmin -e 'select'

If it has failed over to another server just run the first command again until the volume you want to rename isn't running.

Check the filesystem

# cvfsck -j oldname_volume1
# cvfsck -nvvvvv oldname_volume1

If errors are shown at the above you need to fix them. Ideally you want to dump inode information before any big repair but that is for another article.

You can fix the errors with:

# cvfsck -vvvvv

Run the above command until there are no errors shown.

Changing the volume name

You can now change the volume name.

# cvupdatefs -R newname_volume2 oldname_volume1

Update the name of the volume in fmslist.

# vim /usr/cvfs/config/fsmlist

# vim /Library/Preferences/Xsan/fsmlist

In Xsan you need to push the changes to the second metadata server.

# xsanctl pushConfigUpdate

In Xsan you might need to check that the name isn’t referenced in any other configuration file (/Library/Preferences/Xsan), but you can run grep and see where you might need to make changes.

Also in Xsan, if needed, copy the configuration file to the second metadata server. Be aware that Xsan Admin does very often fail to make a good copy of the configuration to the second server. Run a file checksum on both ends and copy the volume configuration file manually if it doesn’t match.

This issue with Xsan Admin will in the best case not allow a volume to fail over, and in the worst case, cause data loss.

In SNFS/Linux you should check for any references of the old name in /usr/cvfs/config/

Also in SNFS/Linux, make sure that the changed files are also updated on the second metadata server.

Remounting the filesystem

In Xsan you don’t need to issue a new profile for the clients to mount the new volume. Just mount it once from the CLI and it will automount on restart:

# xsanctl mount newname_volume2

On Linux clients update entries in /etc/vstab or /etc/fstab to automount the volume on boot.

On Windows clients you will need to use the SNFS configuration tool to mount the newly named volume.

For HA environments Quantum has published an article with the above steps for their systems.

image_printPrint this page

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.