Date: Tue, 08 May 2007 16:42:59 +0800 From: Zhang Weiwu <zhangweiwu@realss.com> To: freebsd-questions@freebsd.org Subject: harddisk failed strangely, badly need to recover data Message-ID: <1178613779.6328.85.camel@joe.realss.com>
next in thread | raw e-mail | index | archive | help
Dear list. I added a 160 GB harddisk to the FreeBSD server several days ago. I have setup only one slice on it (/dev/ad6s1) and it has two partitions on it. /dev/ad6s1c is used as swap /dev/ad6s1d is used as /var Today I decided to reboot the FreeBSD server because I messed up nfs settings. After restart /var/ failed to mount. I was brought to a shell where I am suggested to do fsck manually. fsck manually couldn't help either: [root@exupery /home/zhangweiwu]# fsck /dev/ad6s1d ** /dev/ad6s1d Cannot find file system superblock LOOK FOR ALTERNATE SUPERBLOCKS? [yn] y 32 is not a file system superblock 28780512 is not a file system superblock 57560992 is not a file system superblock 86341472 is not a file system superblock 115121952 is not a file system superblock 143902432 is not a file system superblock 172682912 is not a file system superblock 201463392 is not a file system superblock 230243872 is not a file system superblock 259024352 is not a file system superblock 287804832 is not a file system superblock SEARCH FOR ALTERNATE SUPER-BLOCK FAILED. YOU MUST USE THE -b OPTION TO FSCK TO SPECIFY THE LOCATION OF AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8). I tried to fix it by do inga harddisk bad-sector checking for the beginning 1GB of the harddisk (result is successful, no bad sector in the beginning 1GB). The data on the harddisk is not modified/erased during checking Use 'dd if=/dev/ad6 bs=32k | hd -v | grep "19 01 54 19"' to locate the super block and do some calculation to get the superblock sector number (following an Internet article) and pass it to fsck_ufs like this: 'fsck_ufs -b 12032 /dev/ad6s1d'. Under a lot of time pressure I confirmed twice with 'y' for the following questions of whether or not to set some values to default without fully understanding the questions, later seeing more questions I stopped fsck by Ctrl+C. Before running fsck I tried to backup the first 100MB data of /dev/ad6 using dd which should help me recover even if I destroyed superblock of /dev/ad6s1d. Later I realized I have by mistake only backed up the beginning 4.0MB of /dev/ad6 Is it possible now for me to recover the data in /var/ (especially /var/backups)? Thanks a lot in advance! P.S. I am being really unlucky because this harddisk is mostly used for backup purpose and thus is not backed up (who back up the back-up harddisk?) and when I today failed to mount this harddisk, 0.5 hour later the server being backed up by it has got an accident and need the backup data to recover.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1178613779.6328.85.camel>