Rename an existing SAM-QFS file system?

Renaming a SAM-QFS file system is a two-step process.

  1. Firstly, you need to change the family set name for the file system by editing the /etc/opt/SUNWsamfs/mcf file.
  2. Secondly, you have to run samfsck -R -F to read the new name and update the superblock on the corresponding disk devices.
  3. Example

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

    • Log on to the SAM-QFS server as root
    • Unmount the file system you wish to rename. In our example, we unmount qfs1
      # umount qfs1
    • Update /etc/opt/SUNWsamfs/mcf replacing all entries of qfs1 with qfs2.
      Before:
      # cat /etc/opt/SUNWsamfs/mcf
      # Equipment          Equipment  Equipment  Family        Device   Additional
      # Identifier         Ordinal    Type       Set           State    Parameters
      #-----------------   ---------  ---------  ------------  ------   ----------
      qfs1                                              500    ms      qfs1   on
       /dev/dsk/c6t600A0B80004715700000074D47FD082Ed0s0 501    md      qfs1   on
       /dev/dsk/c6t600A0B8000471570000007D247FD0A22d0s0 502    md      qfs1   on
       /dev/dsk/c6t600A0B80004715700000086F49F1D551d0s0 503    md      qfs1   on
      After:
      # cat /etc/opt/SUNWsamfs/mcf
      # Equipment          Equipment  Equipment  Family        Device   Additional
      # Identifier         Ordinal    Type       Set           State    Parameters
      #-----------------   ---------  ---------  ------------  ------   ----------
      qfs2                                              500    ms      qfs2   on
       /dev/dsk/c6t600A0B80004715700000074D47FD082Ed0s0 501    md      qfs2   on
       /dev/dsk/c6t600A0B8000471570000007D247FD0A22d0s0 502    md      qfs2   on
       /dev/dsk/c6t600A0B80004715700000086F49F1D551d0s0 503    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.
    • 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
    • (optional) Create a new mountpoint for the reamed file system
    • 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.
    • 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.
    • Update /etc/vfstab to reflect the file system name change, and finally mount the new fsname
      # mount qfs2