How to collect JFS file system metadata dump

Jump to: navigation, search


This article explains how to collect a JFS (vxfs) file system metadata dump for low level analysis using the unsupported metasave command. On this article, a data dump for the / (root) file system will be collected to demonstrate the process.

NOTE: This operation can be executed on a live (mounted) file system.

Determine the file system backing storage[edit]

# bdf /root
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  536056  508704   51% /

Determine the layout version of the file system[edit]

# fstyp -v /dev/vg00/rlvol3
version: 6                                <-- Layout version 6 (JFS 4.1)
f_bsize: 8192
f_frsize: 8192
f_blocks: 131072
f_bfree: 64065
f_bavail: 63565
f_files: 20640
f_ffree: 16000
f_favail: 16000
f_fsid: 1073741827
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 16
f_fsindex: 10
f_size: 131072

Determine the available version(s) of the metasave command on the system[edit]

# find /sbin/fs | grep metasave


  • HP-UX 11i v1 (11.11):
# find /sbin/fs | grep metasave
/sbin/fs/vxfs/metasave                    <-- JFS 3.3 (layout version 4 or lower)

  • HP-UX 11i v2 (11.23):
# find /sbin/fs | grep metasave
/sbin/fs/vxfs/metasave                    <-- JFS 3.5 (layout version 5 or lower)
  • HP-UX 11i v3 (11.31):
# find /sbin/fs | grep metasave
/sbin/fs/vxfs/unsupported/metasave        <-- JFS 4.1 (layout version 6 or lower)
/sbin/fs/vxfs5.0/unsupported/metasave     <-- JFS 5.0 (layout version 7)
NOTE: If there is not any available version of the metasave command on your system, obtain the latest version available from the WTEC HPUX Filesystems and Volumes Sharepoint, at the Tools section.

Create the file system metasave binary dump[edit]

Use the minimal version of the tool that supports your file system layout version.

# <path>/metasave -f /tmp/<file system>.meta <backing storage>


# /sbin/fs/vxfs/unsupported/metasave -f /tmp/root.meta /dev/vg00/rlvol3
# ls -l /tmp/root.meta
-rw-r--r--   1 root       sys        24576000 Apr 23 13:52 /tmp/root.meta

Compress the dump file for transfer[edit]

# /usr/contrib/bin/gzip /tmp/<file system>.meta


# /usr/contrib/bin/gzip  /tmp/root.meta
# ls -l  /tmp/root.meta.gz
-rw-r--r--   1 root       sys        1277471 Apr 23 13:52 /tmp/root.meta.gz