Your Ad Here

IBM AIX/UNIX system storage administration ksh/perl scripting

Saturday, March 28, 2009

Querying filesystem information used in mouting a filesystem

Question

This technote lists some methods to check information used in mounting a filesystem.


Answer

If you are encountering problems with the mount command and filesystems, make sure to check multiple sources of information about the filesystem and compare them.

For example, if encountering the mount error:


mount: 0506-324 Cannot mount /dev/lv06 on /filesystem06:
A system call received a parameter that is not valid.

This may be due to an inconsistency between the information in /etc/filesystems, the Logical Volume Control Block (LVCB), and the superblock of the filesystem.

To check the LVCB directly, use:

# /usr/sbin/getlvcb -AT

example:

# getlvcb -AT fslv00
AIX LVCB
intrapolicy = m
copies = 2
interpolicy = m
lvid = 0007b53c00004c00000001122a1ec0fd.2
lvname = fslv00
label = /myfilesystem
machine id = 7B53C4C00
number lps = 4
relocatable = y
strict = y
stripe width = 0
stripe size in exponent = 0
type = jfs2
upperbound = 32
fs = vfs=jfs2:log=/dev/loglv00:options=rw:account=false
time created = Fri May 4 08:46:00 2007
time modified = Mon May 21 15:04:24 2007

To check the superblock, use

# /usr/sbin/lsfs -q /dev/

example:

# lsfs -q /myfilesystem
Name Nodename Mount Pt VFS Size Options Auto Accounting
/dev/fslv00 -- /myfilesystem jfs2 524288 rw no no
(lv size: 524288, fs size: 524288, block size: 4096, sparse files: yes, inline log: no, inline log size: 0,

reserved: 0, reserved: 0, DMAPI: no, VIX: no)


If the filesystem is a JFS2 filesystem, the same information can be printed in a less-readable format by using:

# /usr/sbin/lsjfs2 /

example:
# lsjfs2 /myfilesystem
#MountPoint:Device:Vfs:Nodename:Type:Size:Options:AutoMount:Acct:OtherOptions:LvSize:FsSize:

BlockSize:Sparse:InlineLog:InlineLogSz:Reserved:Reserved:DMAPI:VIX:
/myfilesystem:/dev/fslv00:jfs2:::524288:rw:no:no::524288:524288:4096:yes:no:0:0:0:no:no:


Also, check the stanza within /etc/filesystems to confirm the information matches the superblock data:

# grep -p /etc/filesystems

example:

# grep -p /myfilesystem /etc/filesystems
/myfilesystem:
dev = /dev/fslv00
vfs = jfs2
log = /dev/loglv00
mount = false
options = rw
account = false


PLEASE NOTE: /usr/sbin/getlvcb and /usr/sbin/lsjfs2 are undocumented, low-level commands.

No comments:

Labels

Blog Archive

BlogCatalog