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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recreating bad superblock

Troubleshooting

Recreating bad superblock

by  MoshiachNow  Posted    (Edited  )
If you have a dirty superblock you might try to do ôfsckö. If this does not work try the following (This procedure does not promise 100% success).
(The following example relats to a bad filesystem in slv4.0)

1. Copy the original Superblock into a file (calld sd0 in /tmp - places can be changed):
dd if=/dev/rslv4.0 of=/tmp/sb0 bs=4k count=1 skip=1
Note: if=Input File, of=Output file, bs=Block Size.
2. Copy the backup Superblock into a file (calld sd1 in /tmp - places can be changed):
dd if=/dev/rslv4.0 of=/tmp/sb1 bs=4k count=1 skip=31
3. Copy the Backup Superblock file over the original Superblock:
dd if=/tmp/sb1 of=/dev/rslv4.0 bs=4k seek=1
4. Do ôfsckö again on this filesystem


Note:
If you want to restore the original Superblock, do:
dd if=/tmp/sb0 of=/dev/rslv4.0 bs=4k seek=1
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