Saturday, October 13, 2012

How to rename QFS fsname?


1: umount /new

2: vi /etc/vfstab     change new to new4
3: vi mcf      change new to new4 in all places.

cat /etc/opt/SUNWsamfs/mcf

new4                                            500    ms      new4   on        shared
/dev/dsk/c6t600A0B80004715700000074D47FD082Ed0s0 501    md      new4   on
/dev/dsk/c6t600A0B8000471570000007D247FD0A22d0s0 502    md      new4   on
/dev/dsk/c6t600A0B80004715700000086F49F1D551d0s0 504    md      new4   on


4: samd config
5: samfsck -F -R new4          (this will change the file system name to new4)

Example:
bash-3.00# samfsck -F -R new4
name:     bcombackups       version:     2A    shared
First pass
ALERT:  ino 1743721017.967461289, Object flag set, should be clear, meta_flag 1, size 8581431105406506118
ALERT:  ino -796177020.1556009446, Object flag set, should be clear, meta_flag 0, size 3201155233938255577
ALERT:  ino 22367104.671481968, Object flag set, should be clear, meta_flag 0
ALERT:  ino 700653835.-1820544200, Object flag set, should be clear, meta_fla
ALERT:  ino -2107630336.-937590376, Object flag set, should be clear, meta_fl
ALERT:  ino 738287680.101681192, Object flag set, should be clear, meta_flag
ALERT:  ino 503702500.2047090706, Object flag set, should be clear, meta_flag
ALERT:  ino -445008776.-1635288612, Object flag set, should be clear, meta_fl
ALERT:
Second pass
Third pass
ALERT:  Invalid block:        ino 1853 marked damaged
NOTICE: ino 2214.1,     Repaired link count from 688 to 674
ALERT:  Invalid block:        ino 4218 marked damaged
ALERT:  Invalid block:        ino 5893 marked damaged
ALERT:  Invalid block:        ino 8836 marked damaged
ALERT:  Invalid block:        ino 12528 marked damaged
ALERT:  Invalid block:        ino 16594 marked damaged
ALERT:  Invalid block:        ino 18916 marked damaged

Inodes processed: 8066560

total data kilobytes       = 5858959296
total data kilobytes free  = 1617932544
NOTICE: Reclaimed 332916064256 bytes

Another example:
root@dam-app2 # samfsck -F -R new4
name:     opsbackup       version:     2A    shared
First pass
Second pass
Third pass

Inodes processed: 2048

total data kilobytes       = 3382270208
total data kilobytes free  = 3382259904



6: mount new4

new4                  4.7T    34G   4.7T     1%    /nearline3


No comments: