fsck reports "BAD SUPER BLOCK" when an alternate super block is specified.

Article:TECH9150  |  Created: 2000-01-06  |  Updated: 2002-01-30  |  Article URL http://www.symantec.com/docs/TECH9150
Article Type
Technical Solution

Product(s)

Environment

Issue



fsck reports "BAD SUPER BLOCK" when an alternate super block is specified.

Error



BAD SUPER BLOCK: MAGIC NUMBER WRONG

Solution



When VERITAS Volume Manager Storage Administrator (VMSA) creates a UFS file system, it uses the command "/usr/sbin/mkfs -F ufs".  The location of the alternate super blocks created this way are different from those created using /usr/sbin/newfs at the command line.  Thus, if "fsck" is run on such a file system using an alternate super block reported by "newfs -Nv", fsck will complain about the super block.  For example,

      # /usr/sbin/newfs -Nv /dev/vx/rdsk/testdg/testvol
      mkfs -F ufs -o N /dev/vx/rdsk/testdg/testvol 409600 64 32 8192 1024 16 10 120 2048 t 0 -1 8 32
      /dev/vx/rdsk/testdg/testvol:    409600 sectors in 200 cylinders of 32 tracks, 64 sectors
            200.0MB in 13 cyl groups (16 c/g, 16.00MB/g, 7680 i/g)
      super-block backups (for fsck -F ufs -o b=#) at:
       32, 32864, 65696, 98528, 131360, 164192, 197024, 229856, 262688, 295520,
       328352, 361184, 394016,

      # /usr/sbin/fsck -F ufs -o b=131360 /dev/vx/rdsk/testdg/testvol
      Alternate super block location: 131360.
      ** /dev/vx/rdsk/testdg/testvol
      BAD SUPER BLOCK: MAGIC NUMBER WRONG
      USE AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED INFORMATION;
      eg. fsck [-F ufs] -o b=# [special ...]
      where # is the alternate super block. SEE fsck_ufs(1M).

A workaround is to use the first alternate super block at block 32.  For example,

      # /usr/sbin/fsck -F ufs -o b=32 /dev/vx/rdsk/testdg/testvol
      Alternate super block location: 32.
      ** /dev/vx/rdsk/testdg/testvol
      ** Last Mounted on
      ** Phase 1 - Check Blocks and Sizes
      ** Phase 2 - Check Pathnames
      ** Phase 3 - Check Connectivity
      ** Phase 4 - Check Reference Counts
      ** Phase 5 - Check Cyl groups
      2 files, 9 used, 191974 free (14 frags, 23995 blocks,  0.0% fragmentation)

      ***** FILE SYSTEM WAS MODIFIED *****

Another workaround is to find the correct locations of the alternate super blocks using mkfs.  For example,

      # /usr/sbin/mkfs -F ufs -o N /dev/vx/rdsk/testdg/testvol 409600
      /dev/vx/rdsk/testdg/testvol:    409600 sectors in 800 cylinders of 16 tracks, 32 sectors
            200.0MB in 50 cyl groups (16 c/g, 4.00MB/g, 1920 i/g)
      super-block backups (for fsck -F ufs -o b=#) at:
       32, 8256, 16480, 24704, 32928, 41152, 49376, 57600, 65824, 74048, 82272,
       90496, 98720, 106944, 115168, 123392, 131104, 139328, 147552, 155776, 164000,
       172224, 180448, 188672, 196896, 205120, 213344, 221568, 229792, 238016,
       246240, 254464, 262176, 270400, 278624, 286848, 295072, 303296, 311520,
       319744, 327968, 336192, 344416, 352640, 360864, 369088, 377312, 385536,
       393248, 401472,

      # /usr/sbin/fsck -F ufs -o b=115168 /dev/vx/rdsk/testdg/testvol
      Alternate super block location: 115168.
      ** /dev/vx/rdsk/testdg/testvol
      ** Last Mounted on
      ** Phase 1 - Check Blocks and Sizes
      ** Phase 2 - Check Pathnames
      ** Phase 3 - Check Connectivity
      ** Phase 4 - Check Reference Counts
      ** Phase 5 - Check Cyl groups
      2 files, 9 used, 191974 free (14 frags, 23995 blocks,  0.0% fragmentation)

      ***** FILE SYSTEM WAS MODIFIED *****


            
            



Legacy ID



233187


Article URL http://www.symantec.com/docs/TECH9150


Terms of use for this information are found in Legal Notices