Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fixing a bad file system that failes fsck

Troubleshooting

Fixing a bad file system that failes fsck

by  MoshiachNow  Posted    (Edited  )
Fixing a bad filesystem with fsdb.

Sometimes fsck will consistently fail on severall bad inodes .

The technics to fix it is :

1. I find the problematic dir/file inode by "ls -lai" - assume it's "16"
2. Unmount the <fs>
3. fsdb /dev/<fs>

File System: /dev/slv1.6

File System Size: 3932160 (512 byte blocks)
Disk Map Size: 36 (4K blocks)
Inode Map Size: 36 (4K blocks)
Fragment Size: 4096 (bytes)
Allocation Group Size: 2048 (fragments)
Inodes per Allocation Group: 2048
Total Inodes: 491520
Total Fragments: 491520

4. 16i (this is to access the bad inode)

16i
i#: 16 md: d---rwxrwx--- ln: 3 uid: 0 gid: 0
szh: 0 szl: 512 (actual size: 512)
a0: 0x8f a1: 0x00 a2: 0x00 a3: 0x00
a4: 0x00 a5: 0x00 a6: 0x00 a7: 0x00
at: Thu May 24 08:12:10 2001
mt: Wed Feb 21 09:06:10 2001
ct: Wed Feb 21 09:06:10 2001

displays the directory params.
Now zero the link and length values:

5. ln=0
6. szl =0

this effectively zeroes the params of this directory.

7. quit and fsck,answering "NO" to all suggestions to reconnect,"YES" to suggestions to clear/remove.

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top