StorNext: How to Re-Label StorNext Disks (LUNs) That Have Lost Their Labels

Problem:

A StorNext file system will not mount on a SAN client after an attempted disk recovery, because StorNext disks (LUNs) no longer have labels.

Solution:

1. Re-apply labels from a previously saved cvlabel -c output, or from labels extracted from the last good disk discovery found within the /usr/cvfs/debug/nssdbg.out file.

*** WARNING *** Take extreme care to ensure that the correct and proper labels and label format types (EFI or VTOC) are applied to the LUNs. Incorrect labeling can lead to data corruption on the file system.

If the disks are visible to the system, the cvlabel -c output will show the LUNs with "lost" labels as CvfsDisk_UNKNOWN. It will also show non-StorNext disk devices with CvfsDisk_UNKNOWN labels, which is normal.

Example:

# cvlabel -c

CvfsDisk_UNKNOWN /dev/sda    # host 0 lun 0 sectors 41924575 sector_size 512 inquiry [VMware  Virtual disk    1.0 ] serial unknown
CvfsDisk_UNKNOWN /dev/sdb    # host 0 lun 0 sectors 3393173471 sector_size 512 inquiry [HP HSV210 6220] serial 600508B4001000AE0001200000000001
CvfsDisk_UNKNOWN /dev/sdc    # host 0 lun 0 sectors 3393173471 sector_size 512 inquiry [HP HSV210 6220] serial 600508B4001000AE0001200000000002
CvfsDisk_UNKNOWN /dev/sdd    # host 0 lun 0 sectors 3393173471 sector_size 512 inquiry [HP HSV210 6220] serial 600508B4001000AE0001200000000003

2. Extract the relevant disk labels, either from a saved file with cvlabel -c output, or from the nssdbg.out file. If you are pulling the labels from the nssdbg.out file, skip to the end of the file and find the appropriate disk labels (based on their unique LUN serial numbers) within the most recent successful disk discovery. Do NOT use labels from an earlier disk discovery, unless they are known to be valid.

Example from nssdbg.out:

[0413 11:34:22] 0x2ae1a5de13e0 NOTICE PortMapper: CVFS Volume CvfsDisk01 on device: /dev/sdb (blk 0x820 raw 0x820)  con: 0 lun: 0 state: 0x4 inquiry [HP HSV210 6220] controller # 'default' serial # '600508B4001000AE0001200000000001' Size: 3393058816 Sector Size: 512
[0413 11:34:22] 0x2ae1a5de13e0 NOTICE PortMapper: CVFS Volume CvfsDisk02 on device: /dev/sdc (blk 0x830 raw 0x830)  con: 0 lun: 0 state: 0x4 inquiry [HP HSV210 6220] controller # 'default' serial # '600508B4001000AE0001200000000002' Size: 3393058816 Sector Size: 512
[0413 11:34:22] 0x2ae1a5de13e0 NOTICE PortMapper: CVFS Volume CvfsDisk03 on device: /dev/sdd (blk 0x840 raw 0x840)  con: 0 lun: 0 state: 0x4 inquiry [HP HSV210 6220] controller # 'default' serial # '600508B4001000AE0001200000000003' Size: 3393058816 Sector Size: 512

3. Replace the relevant CvfsDisk_UNKNOWN entries in the saved cvlabel -c output with the appropriate disk labels, delete all the lines that do not apply (labels that do not need to be corrected), and save to a temp file (in this example, cvlabel_tmp.txt).

Example of the edited cvlabel -c output:

CvfsDisk01 /dev/sdb    # host 0 lun 0 sectors 3393173471 sector_size 512 inquiry [HP HSV210 6220] serial 600508B4001000AE0001200000000001
CvfsDisk02 /dev/sdc    # host 0 lun 0 sectors 3393173471 sector_size 512 inquiry [HP HSV210 6220] serial 600508B4001000AE0001200000000002
CvfsDisk03 /dev/sdd    # host 0 lun 0 sectors 3393173471 sector_size 512 inquiry [HP HSV210 6220] serial 600508B4001000AE0001200000000003

4. Re-apply the labels, using proper options for different label types, if necessary.

Example:

# cvlabel cvlabel_tmp.txt

The output will look like the following:

 *WARNING* This program will over-write volume labels on the
                    devices specified in the file "cvlabel_tmp.txt".

                    After execution, the devices will only be usable by the
                    StorNext File System. You will have to re-partition the
                    devices to use them on a different file system.

          Do you want to proceed? (Y / N) -> y    << answer here

          /dev/sdb [HP HSV210 6220] unknown  Controller 'default', Serial '600508B4001000AE0001200000000001', Sector Size 512, Sectors Max 3393058816
          Do you want to label it SNFS-VTOC - Name: CvfsDisk01 Sectors: 3393058816 (Y / N) -> y    << answer here
          New Volume Label -Device: /dev/sdb  SNFS Label: CvfsDisk01  Sectors: 3393058816.

          ...

          Done.  3 source lines.  3 labels.

The labels are done.

4. List the disks again to ensure that  the labels are correct:

# cvlabel -c

CvfsDisk_UNKNOWN /dev/sda    # host 0 lun 0 sectors 41924575 sector_size 512 inquiry [VMware  Virtual disk    1.0 ] serial unknown
CvfsDisk01 /dev/sdb    # host 0 lun 0 sectors 3393173471 sector_size 512 inquiry [HP HSV210 6220] serial 600508B4001000AE0001200000000001
CvfsDisk02 /dev/sdc    # host 0 lun 0 sectors 3393173471 sector_size 512 inquiry [HP HSV210 6220] serial 600508B4001000AE0001200000000002
CvfsDisk03 /dev/sdd    # host 0 lun 0 sectors 3393173471 sector_size 512 inquiry [HP HSV210 6220] serial 600508B4001000AE0001200000000003

5. Mount the file system (assuming that the file system is in the mount list, i.e. /etc/fstab):

# mount -a

NOTE: If the file system continues NOT to mount, please log a case with Quantum Support.

Audience: 
Public Unrestricted
Review/Evaluate: 
2015-01-15
Document Type: