by cynjut » Sat May 02, 2009 11:49 am
I used 'dd' - my 'recovery console' boots NetBSD and XP, so I can easily switch back and forth between the two systems.
The exact command is "dd conv=noerror,sync progress=16 if=/dev/raid0d of=/dev/wd2d"
This way, if there's an error, the system will ignore it, and copy NULLs into what would have been a bad sector. It prints a '.' once per Gig of data. Since I'm using the alternate superblock for everything I can, the fact that there was a bad sector in the primary superblock should be OK. It would be cool if I could specify a different superblock for UFS1 and UFS2 drives.
I might have used to R-TT tools, but with the "odd" settings, the drive wasn't being interpreted correctly. The 31.5K block stripe size might have confused it a little bit.
On to the next question - it looks like a lot of my directory nodes are damaged, so a LOT of my files are ending up in the R-TT version of "Lost+Found" with 'inode number' as their file name. I'm getting ready to write a filename finder that scans the drive and tries to find all of the inodes associated with things that look like filenames. I can't really trust the directory structure - it looks pretty serious hosed. Since all of the files on the hard drive have files in the same format "200[789][01][0-9][0-3][0-9]-[012][0-9][0-6][0-9][0-6][0-9]-[0-9]*.[0-9]*.mp3", I should be able to scan the drive, find anything that looks like that, back up 8 bytes and display those 4 bytes as an unsigned long. That will give me the equivalent of "ls -ri /" without crashing the server with "Page fault in supervisor mode - bad directory entry".
If someone's already written that program, I'd love to hear from you....
I used 'dd' - my 'recovery console' boots NetBSD and XP, so I can easily switch back and forth between the two systems.
The exact command is "dd conv=noerror,sync progress=16 if=/dev/raid0d of=/dev/wd2d"
This way, if there's an error, the system will ignore it, and copy NULLs into what would have been a bad sector. It prints a '.' once per Gig of data. Since I'm using the alternate superblock for everything I can, the fact that there was a bad sector in the primary superblock should be OK. It would be cool if I could specify a different superblock for UFS1 and UFS2 drives.
I might have used to R-TT tools, but with the "odd" settings, the drive wasn't being interpreted correctly. The 31.5K block stripe size might have confused it a little bit.
On to the next question - it looks like a lot of my directory nodes are damaged, so a LOT of my files are ending up in the R-TT version of "Lost+Found" with 'inode number' as their file name. I'm getting ready to write a filename finder that scans the drive and tries to find all of the inodes associated with things that look like filenames. I can't really trust the directory structure - it looks pretty serious hosed. Since all of the files on the hard drive have files in the same format "200[789][01][0-9][0-3][0-9]-[012][0-9][0-6][0-9][0-6][0-9]-[0-9]*.[0-9]*.mp3", I should be able to scan the drive, find anything that looks like that, back up 8 bytes and display those 4 bytes as an unsigned long. That will give me the equivalent of "ls -ri /" without crashing the server with "Page fault in supervisor mode - bad directory entry".
If someone's already written that program, I'd love to hear from you....