IBM Support

Where are the superblocks?

Question & Answer


Question

This document shows where the superblocks exist for JFS and JFS2 filesystems, and how to find them in a logical volume.

Answer

JFS2 Filesystem
Primary superblock for JFS2 is at 32768 bytes (32 kb) into the lv (0x8000)

# lquerypv -h /dev/fslv05 8000 100
00008000 4A324653 00000001 00000000 4845D182 |J2FS........HE..|

Secondary superblock is at 61440 bytes (60 kb) into the lv (0xF000)

# lquerypv -h /dev/fslv05 F000 100
00008000 4A324653 00000001 00000000 4845D182 |J2FS........HE..|



JFS Filesystem
For JFS they are at block 1 (4096 dec = 0x1000)

# lquerypv -h /dev/lv00 1000 10
00001000 65872143 00000000 00001000 00000001 |e.!C............|

Secondary superblock at block 31 (4096 *31 = 126976 dec = 0x1F000)

# lquerypv -h /dev/lv00 1F000 10
0001F000 65872143 00000000 00001000 00000000 |e.!C............|



What are the digits at the beginning of the superblock?

The first 4 bytes of each superblock contains the magic for that type of filesystem. This is how the fsck and mount utilities know what type of filesystems they are.

Magic for both types of filesystems:

Hex: 4A324653 Char: J2FS = JFS2 filesystem
Hex: 43218765 = Regular JFS filesystem
Hex: 65872143 = Large-file enabled JFS filesystem

[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"File management","Platform":[{"code":"PF002","label":"AIX"}],"Version":"5.3;6.1;7.1","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
17 June 2018

UID

isg3T1011009