After running a full fsck to repair a corrupted filesystem,fsck fails with no valid OLT
# fsck -F vxfs -o full /dev/vx/rdsk/testdg/testvol vxfs fsck: ERROR: V-3-20726: OLT extent 0 has bad checksum read of primary OLT failed UX:vxfs fsck: ERROR: V-3-20726: OLT extent 1 has bad checksum read of OLT copy failed UX:vxfs fsck: ERROR: V-3-20718: no valid OLT, cannot continue file system check failure, aborting
1. check the volume size of the effect filesystem
# vxprint –g testdg testvol
v tvol - ENABLED ACTIVE 17616076 SELECT - fsgen
pl tvol-01 tvol ENABLED ACTIVE 17617920 CONCAT - RW
sd d1-01 tvol-01 d1 0 17617920 0 c4t5d30 ENA
Volume size = 17616076 sectors
2. Validate the superblock using the fsdb filesystem debugging tool
# fsdb -F vxfs /dev/vx/rdsk/testdg/testvol
> 8192B.p S
super-block at 00000008.0000 magic a501fcf5 version 6 ctime 1096293624 999550 ( Mon Sep 27 07:00:24 2004 PDT ) << check create time log_version 12 logstart 0 logend 0 bsize 1024 size 8807078 dsize 8807078 ninode 0 nau 0 << use bsize & size values to match volume size * defiextsize 0 oilbsize 0 immedlen 96 ndaddr 10 aufirst 0 emap 0 imap 0 iextop 0 istart 0 bstart 0 femap 0 fimap 0 fiextop 0 fistart 0 fbstart 0 nindir 2048 aulen 32768 auimlen 0 auemlen 8 auilen 0 aupad 0 aublocks 32768 maxtier 15 inopb 4 inopau 0 ndiripau 0 iaddrlen 8 bshift 10 inoshift 2 bmask fffffc00 boffmask 3ff checksum e66ac5be free 3326029 ifree 0 efree 2157 2422 3099 729 426 229 198 148 97 73 30 12 10 8 5 18 12 2 3 1 0 0 0 0 0 0 0 0 flags 0 mod 1 clean 3c time 1314698781 367816 (Tue Aug 30 03:06:21 2011 PDT) << check last superblock flush is current oltext[0] 45958 oltext[1] 46019 oltsize 1 << location of the 2 OLT copies if they existiauimlen 1 iausize 4 dinosize 256 checksum2 0 checksum3 0 fsetquotaction 0 fsetquotahardlimit 0 fsetquotasoftlimit 0 log_gen 15
* checking the sizes of the filesystem and volume match
where
filesystem size in sectors = ( bsize*size)/512 = 1024*8807078 = 17616076 << size match the volume size
> olt
failed reading the OLT << as expected since there are no valid olt
2. display the content of the OLT blocks at both locations as specified in the superblock above
> 45958b.p 100 c
0.0000b386.0000: t h i s i s a d a t a f 0.0000b386.0010: r o m a u s e r a n d 0.0000b386.0020: n o t m e t a d a t a s o 0.0000b386.0030: _ i t a p p e a r s d a t a 0.0000b386.0040: h a s b e e n o v e r w r i 0.0000b386.0050: t t e n t h e m e t a d a t 0.0000b386.0060: a . . . . .
> 46019b.p 100 c
0.0000b386.0000: m o r e u s e r d a t a a n 0.0000b386.0010: d a g a i n u s e r d a t a 0.0000b386.0020: n o t m e t a d a t a s o 0.0000b386.0030: _ i t a p p e a r s d a t a 0.0000b386.0040: h a s b e e n o v e r w r i 0.0000b386.0050: t t e n t h e m e t a d a t 0.0000b386.0060: a . . . . .
> quit
It is clear this does not contain OLT data since it has been overwritten by user data
For a valid OLT we would see an output similar to this
> 45958b.p 100 c
0.00000020.0000: a5 04 fc f5 00 00 00 @ N i be 8d 00 00 00 01 << OLT magic number=a504fcf5 exist at start
0.00000020.0010: N e 91 10 00 04 13 8 00 00 00 00 00 00 00 00
0.00000020.0020: 00 00 00 00 00 00 09 02 00 00 00 00 00 00 00 00
0.00000020.0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 08
0.00000020.0040: 00 00 00 02 00 00 00 18 00 00 00 00 00 00 00 03
0.00000020.0050: 00 00 00 00 00 00 00 # 00 00 00 04 00 00 00 18
0.00000020.0060: 00 00 00 00
3. Check if the OLT may be located at a different location using the OLT magic no a504fcf5
# dd if=/dev/vx/rdsk/testdg/tvol |od -Ax -X | grep a504fcf5
If it fails to return it indicates there is no copy of the OLT and there is no chance of recovery of this filesystem.
But if the dd commands returns a valid OLT then follow the process as per the article: https://support-staff.cloud.com/wolken/esd/knowledge-base-view/view-kb-article?articleNumber=100020562&isLocationBackOnHome=true&hideTabs=true
Note: This is valid for all platforms and in this example, we have used Solaris, for other platforms, replace "-F vxfs" as follows:
Linux : -t vxfs ; AIX: -V vxfs ; HPUX: -F vxfs
How to check if a valid OLT exist on a VXFS filesystem