How To: Rename a Volume

Tim Burton's picture

Recently I faced migrating our main production volume onto new storage. With thousands of FCP projects on the volume I really did not want to spend the next 6 months reconnecting media. This meant the new volume had to have the same name as the volume it was replacing. I decided the cleanest way was to rename the current volume, so I could create the new volume with the correct name. This is something the Xsan literature says can't be done, however it is relatively easy within terminal. Here's how...

Note: I did this procedure using Xsan 1.4.1. I would imagine the principles are the same using other versions.

  1. BACKUP your 'volumename.cfg' file!

    This file lives in /Library/Filesystems/Xsan/config/.

  2. Unmount all clients and stop the volume.

  3. Check the volume cvfsck:

    Use the following commands:

    1. sudo cvfsck -jv volumename
    2. sudo cvfsck -nv volumename

    Ensure the volume is reported to be 'clean'. If reported 'dirty' or that if cvfsck had not been run in read only mode then there would have been changes; run cvfsck -wv to fix the corruption.

    Only proceed with the following steps once the volume is 'clean'.

    Digression: what do those cvfsck flags mean?

    -j

    Execute journal recovery and then exit. Running journal recovery will ensure all operations have been committed to disk, and that the metadata state is up to date. It is recommended that cvfsck is run with the -j flag before any read-only checks or volume reports are run.

    -n

    This option allows a volume to be checked in a read-only mode. The modifications that would have happened are described but are not actually performed. A read-only volume check may display errors if there are journaled volume transactions which have not yet been committed. It is recommended that cvfsck is run with the -j flag before a read-only check is run.

    -v

    As default cvfsck runs in verbose mode, however when using the flags above you have to manually add the v flag.

  4. Do the actual renaming

    1. Navigate to /Library/Filesystems/Xsan/config/
    2. Rename the file volumename.cfg to desiredname.cfg
    3. Use a text editor to update the file fsmlist. Replace occurrences of volumename with desiredname.

    Repeat this procedure on each of your metadata controllers.

  5. Fix the ICB mismatch

    To fix the ICB mismatch we caused by changing the name, you will need to run cvfsck in interactive mode. Just type sudo cvfsck with no flags or quoted volumes. Follow the on screen screen prompt and select your renamed volume. Cvfsck will ask if you want to fix the ICB mismatch, reply 'yes'.

  6. Start the volume and remount the clients!

I did a trial run a on a test volume I created, just so I was sure of the outcome before I changed our main volume name. I strongly suggest doing the same!

Comments

6
Xngurevar's picture

Ahoy:

I am trying to rename a volume with Xsan 1.4.2. Everything goes as expected until step 5. If I run "sudo cvfsck", I am presented with a list of volumes, with my renamed volume appearing under its new name. But if I select that volume, then I get this message:

Created directory /tmp/cvfsck276a for temporary files.

  • Warning*: Icb has a configuration mismatch!

Icb mismatches configuration:
File System Name Mismatch. exp-NewName rcv-OldName

    • Cannot re-create Icb with uncertain configuration parameters. **
    • You must use cvfsck interactively to correct this problem. **

and cvfsck quits, instead of offering to fix the Icb mismatch. I rebooted all the MDCs, but nothing changed. I have searched unsuccessfully for a way to get cvfsck to fix the mismatch; does anyone have any ideas?

Again, this is Xsan 1.4.2.

Tim Burton's picture

try running cvfsck with the -w flag under root

mdc:~ root# cvfsck -w

Tim

MattG's picture

Wow. This really works. Really.

---
Matt Geller
Meta Mediaâ„¢ Creative Technologies
Consulting & Integration | Proactive & Reactive Maintenance
Xsan Integration Specialists

mjsanders's picture

I tried this on a Xsan 2.2 Volume in a test environment (Mac OS X 10.6.7/Xsan
2.2)

the procedure works with a few tweaks:

after step 4:

-change the name of the file Volumename-auxdate.plist to
desiredname-
auxdata.plist


-edit automount.plist and change old volumename to
desiredname



step 5 needs most tweaking.

as noted above, sudo cvfsck is not working

We did:
sudo -s to run as root, and then

cvfsck
-w
with interactive repair.

only when running as root the ICB was really fixed.

test it by running cvfsck a second time, without the sudo -s the ICB error
needed repair (again)

step 6:

use cvadmin to start new volume, and activate.



The Graphical Xsan Admin gets confused (but that is expected :-)
re-connect to mdc.

mjsanders's picture

additional info:

The Xsan Admin app can be refreshed by deleting the file in
~/Library/Application Support/Xsan Admin/XsanName.xsan, and reconnect to
the Xsan (MDC's).

This file contains a (cached) version of the xsan info (and cached the old
name)

rebooting all MDC's and clients helps to clear out errors in Xsan Admin.

wrstuden's picture

Why not just have the GUI do the rename? That's one of the features of
Xsan 2.2!