Xsanity Sanity for Apple's Xsan and Final Cut Server.
  
Saturday, May 25 2013 @ 10:49 PM EDT
Topics
Storage (39)
People (1)
Xsan (103)
How To (26)
User Functions
Username:

Password:

Don't have an account yet? Sign up as a New User
Who's Online
Guest Users: 11
Sponsorship

Xsanity is proudly sponsored by:

Tekserve
The Old Reliable Mac Shop

How To
How To: Rename a Volume

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!



How To: Rename a Volume | 6 comments | Create New Account
The following comments are owned by whomever posted them.
Icb mismatch
Authored by: Xngurevar on Saturday, December 08 2007 @ 04:34 PM EST
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.
[ Reply to This ]
  • Icb mismatch - Authored by: Tim Burton on Wednesday, December 12 2007 @ 08:38 AM EST
  • Icb mismatch - Authored by: MattG on Saturday, January 16 2010 @ 10:22 PM EST
  • How To: Rename a Volume
    Authored by: mjsanders on Wednesday, May 25 2011 @ 08:20 AM EDT
    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.
    [ Reply to This ]
  • How To: Rename a Volume - Authored by: mjsanders on Wednesday, May 25 2011 @ 09:22 AM EDT
  • How To: Rename a Volume - Authored by: wrstuden on Wednesday, May 25 2011 @ 10:27 PM EDT
  • Story Options
    Best Viewed on a Mac | Suggested Browser: Whatever floats yer boat.