Rename an existing SAM-QFS file system?

Renaming a SAM-QFS file system is a two-step process. Firstly, change the family set name for the file system by editing the /etc/opt/SUNWsamfs/mcf file. Then you have the samfsck -R -F command read the new name and update the superblock on the corresponding disk devices.

In this example, we will rename the fsname qfs1 to qfs2

  1. Log on to the SAM-QFS server as root
  2. Unmount the file system you wish to rename. In our example, we unmount qfs1
    # umount qfs1
  3. Update /etc/opt/SUNWsamfs/mcf replacing all entries of qfs1 with qfs2. For example: Before:
    # cat /etc/opt/SUNWsamfs/mcf
    # Equipment          Equipment  Equipment  Family        Device   Additional
    # Identifier         Ordinal    Type       Set           State    Parameters
    #-----------------   ---------  ---------  ------------  ------   ----------
    qfs1                                             100    ms      qfs1   on
     /dev/dsk/c6t600A0B80004715700000074D47FD082Ed0s0 101    md      qfs1   on
     /dev/dsk/c6t600A0B8000471570000007D247FD0A22d0s0 102    md      qfs1   on
     /dev/dsk/c6t600A0B80004715700000086F49F1D551d0s0 103    md      qfs1   on
    After:
    # cat /etc/opt/SUNWsamfs/mcf
    # Equipment          Equipment  Equipment  Family        Device   Additional
    # Identifier         Ordinal    Type       Set           State    Parameters
    #-----------------   ---------  ---------  ------------  ------   ----------
    qfs2                                             100    ms      qfs2   on
     /dev/dsk/c6t600A0B80004715700000074D47FD082Ed0s0 101    md      qfs2   on
     /dev/dsk/c6t600A0B8000471570000007D247FD0A22d0s0 102    md      qfs2   on
     /dev/dsk/c6t600A0B80004715700000086F49F1D551d0s0 103    md      qfs2   on
    In the about example, we have changed both the equipment identifier and the family set name of the file system from qfs1 to qfs2.
  4. Run samfsck on the new file system to reflect the new family set name to be updated in the fs superblock:
    # samfsck -F -R qfs2
     name:     qfs2       version:     2A    shared
    First pass
    Second pass
    Third pass
    
    Inodes processed: 2048
    
    total data kilobytes       = 3382270208
    total data kilobytes free  = 3382259904
  5. (optional) Create a new mountpoint for the reamed file system
  6. Check the mcf file for errors by running sam-fsd command, correcting any errors:
    # sam-fsd
    Note: The sam-fsd is an initialization command that reads SAM-QFS configuration files. It will stop if an errors are detected.
  7. Tell the SAM-QFS software to reread the mcf file and reconfigure itself accordingly:
    # samd config
    Note: If samd config reports any errors, correct them and re-issue the command until no errors are found.
  8. Update /etc/vfstab to reflect the file system name change, and finally mount the new fsname
    # mount qfs2