Re: How to fix bad superblock on UFS2?
Try to use tools/tools/find-sb to locate superblocks. -- Maxim Konovalov ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How to fix bad superblock on UFS2?
On 20 Jul 2011 , Maxim Konovalov entreated about Re: How to fix bad superblock on UFS2?: Try to use tools/tools/find-sb to locate superblocks. Thankyou Maxim I may yet need to use that on another partition, but last night I achieved some success by hacking fsck_ffs to display what it is doing. By doing this I found that it considers the 'first alternate' superblock to be the one in the LAST cylinder group. So, by using dd to copy a working superblock to block 128 and to the last one listed by 'newfs -N', fsck_ffs could then actually recover some files. Since I probably broke more things on this partition than were broken by the 'disk smoke event', I was not surprised when only about half the drives files showed up in lost+found and the primary folder is now empty (the whole drive is a Samba share with quotas, so I create a folder to share so that users cannot mess with the quota.* files). Not a problem for this partition as I have a full level 0 dump. I now have 2 more partitions to resurrect both report 'Cannot find file system superblock' though 'newfs -N' shows a sensible list of them, so I have hope. But, further thanks to you for pointing out find-sb, because in googling for that I found various other very useful things, including http://www.chakraborty.ch/tag/raid-filesystem-partition-recovery-ufs- freebsd/ which at the least, points out things to avoid doing (-: thanks -- DA Fo rsythNetwork Supervisor Principal Technical Officer -- Institute for Water Research http://www.ru.ac.za/institutes/iwr/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: how to fix bad superblock
On Monday 18 July 2011 16:49:25 DA Forsyth wrote: After a hardrive let the smoke out last week, part of a 4 drive RAID array, I am now battling to get back into the array. I have replaced the bad drive and it has been rebuilt (Intel Matrix Raid on the motherboard). some partitions are ok but had lots of errors fsck fixed, others report ** /dev/ar0s1f BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE it then asks if it must look for alternates but claims 32 is not one and stops. All my partitions are UFS so why doesn't it look at block 160? You may want to ask your question on the freebsd-fs mailing list. signature.asc Description: This is a digitally signed message part.
How to fix bad superblock on UFS2?
Hi all I had a drive let out smoke, it was part of a 4 drive RAID5 array on an intel Matrix motherboard controller (device ar). Having fought various battles just to get the machine to boot again (had to upgrade to 7.4 from 7.2 to do it because of a panic in ataraid.c) I now have some partitions reporting superblock problems. Havign googled around this topic for some hours now, and having tried copying one or more of the backup superblocks to the primary and secondary (at block 160), I still get ** /dev/ar0s1f BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE it then asks if it must look for alternates but claims 32 is not one and stops. All my partitions are UFS2 so why doesn't it look at block 160, which 'newfs -N' finds correctly as the next superblock copy? So, how do I fix this? Also, why does fsck_ufs prompt to update the primary superblock when you give it an alternate with '-b xx', and then not do it? I have now tried booting from the FreeBSD 8.2 live CD in the hopes that the most recent fsck will actually fix this, but it does not. One thing I found in my web searching is that there is confusion over block sizes. 'newfs -N' appears to report sector counts as block addresses. Doing dd if=/dev/ar0s1fbs=512 skip=160 count=16 | hd -v | grep 54 19 bears this out as the output does indeed contain the correct magic number. 'fsck_ufs -b 160 /dev...' also works as expected, but then you try 'fsck /dev/...' and it will report the bad superblock, and then fail to find any backup superblocks, which newfs managed just fine, and this might be because the disk thinks blocks are 16384 in size. Thanks -- DA Fo rsythNetwork Supervisor Principal Technical Officer -- Institute for Water Research http://www.ru.ac.za/institutes/iwr/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
how to fix bad superblock
Hiya all After a hardrive let the smoke out last week, part of a 4 drive RAID array, I am now battling to get back into the array. I have replaced the bad drive and it has been rebuilt (Intel Matrix Raid on the motherboard). some partitions are ok but had lots of errors fsck fixed, others report ** /dev/ar0s1f BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE it then asks if it must look for alternates but claims 32 is not one and stops. All my partitions are UFS so why doesn't it look at block 160? 'newfs -N ar0s1f' displays a lot of copies of the superblock. Google show that this error happens to a lot of folks,a nd there is no tool for fixing it. fsck_ufs will use an alternate superblock, prompt you to update the master block, and then NOT do it, the error persists. I used a dd command I found on the web to copy an alternate SB to the master superblock, and fsck still shows the message as above. I then copied the 2nd alternate to both the master and the 1nd alternate superblock positions, and it STILL reports a mismatch. Please tell me, how do I fix this. ar0s1f is discardable which is why I am trying to fix it first. /home has stuff I want to recover and it also has a bad superblock. The stuff I googled shows that there is confusion about block sizes. When 'newfs -N' shows a copy at block 160, what block size does it mean? the 16384 it shows in its display for this partition, or the default of 512? Thanks -- DA Fo rsythNetwork Supervisor Principal Technical Officer -- Institute for Water Research http://www.ru.ac.za/institutes/iwr/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org