Close

Renaming a stornext file system

Topic

As it’s quite easy on a generic local file system to change the label/name with data in place , it’s the opposite in a SAN environment.  In some (or even most) cases you have to offload the data, rename the file system and initialize it again. It’s also possible under StorNext , even if not well documented.

No can do? Yes can do!

Situation

You got a new storage subsystem and it you copied all the data over from the old file system to the new one. Now it occurs to you that many project folders have hard coded file system names in it or you simply don’t like the name. While it is hard (impossible to my knowledge) to fake a file system name because the clients see the file system as native volume.

Abstract

Since StorNext version 3.1.2 Quantum allows and provides tools for renaming a file system with their utilities Quantum’s process does not expect disk labels to be altered between name changes. Given the fact that you may have plenty of disk labels and want to identify the right storage unit with the LUN label. Some say it can’t be done but I have done this several times without issues.

  It is important to note that a file system name change could cause data loss in a worst-case scenario. I also urge the reader to read the user manual before attempting this procedure. And as always, a backup is always a good thing.

Details

Changing the file system name

  1. un-mount the active file system
  2. run cvadmin -e ‘stop <file system name>’
  3. run cvfsck <file system name> expecting no errors; stop here on errors
  4. copy /usr/cvfs/config/<file system name>.(x)cfg to /usr/cvfs/config/<file system name>.(x)cfg.org
  5. archive the /usr/cvfs/data/<file system name> and the /usr/cvfs/debug elements which pertain to <file system name> to a secure location
  6. run cvfsck (i.e. interactive mode); enter the number for the <new file system name> when prompted
    NOTE: Since SNFS 4.3.1 you should run cvfsck twice. The first time missing folder will be create and at the second time the update will happen! On the other side, it doesn’t hurt to run it twice anyway.

    1. Answer Y to “Do you want to proceed?”
    2. At this point you may see a message stating:
      *Warning*: Icb has a configuration mismatch!
      Icb mismatches configuration:
        File System Name Mismatch. exp-newname rcv-test
      ** WARNING ** Do you want to correct the Icb for the
      
                    --- [newname] ---
      
                    file system. This procedure cannot be un-done!

      Select y at the prompt to proceed

  7. run cvupdatefs <new file system name> (I had this report no changes occasionally)
  8. edit /etc/fstab to reflect <new file system name>
  9. edit /usr/cvfs/config/fsmlist to reflect <new file system name>
  10. run cvadmin -e ‘start <new file system name>’
  11. run cvadmin -e ‘activate <new file system name>’
  12. mount <new file system name> and verify

According to Quantum the SNFS labels can not be renamed. As I have done this several times successfully I have to disagree. If you have a file system to test, give it a try.

It should be noted that the procedure has been split into two distinct actions within the process and that within each action, it is recommend that full file system checks be run. Quantum highly suggests these checks given our need to change device labels and given the requirement of data-in-place.

It is acknowledged by anyone who chooses to utilize this procedure that all risks taken in performing these steps are performed on your own and that I am not reliable for any damage.

Leave a Reply

Your email address will not be published.