LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Really trashed disk (https://www.linuxquestions.org/questions/linux-newbie-8/really-trashed-disk-835269/)

swamp-dog 09-29-2010 03:45 PM

Really trashed disk
 
I managed to stomp on the first 64Gb of a 2Tb ext3 disk (75% used). Unable to back it up first, I was forced to fsck it (using the furthest on the disk superblock). It's now ext2 and the entire disk is sat in "lost+found". Question1 - which forum is best for asking question2?

Question2: (background) Much of the data is large. "ls" doesn't come back, just too much in lost+found. No problem, I can write an opendir/readdir prog "look for large things". Unfortunately the majority of the files/folders (let's say items) have their FIFO bit set. I *know* these items are files.
How the heck does one force the FIFO inode bit clear?

TIA
Guy

business_kid 09-30-2010 08:56 AM

I think you're in deep.

I feel dd may have been a better thing to start with. As things stand, if the entire disk is in lost+found, fsck has written over the directories with blank ones.

If the data is precious, you can start knitting. where the sector numbers are continuous, you can extract and reassemble chunks of files Otherwise it's off to those forensic type folks with fancy software to see if they can pick up what the data was.

TobiSGD 09-30-2010 09:50 AM

I don't hope you have valuable data on it. Otherwise it would be a expensive experience. I want not sound offensive, but this experience will hopefully let you think about backups.

swamp-dog 10-01-2010 08:50 AM

Thanks for the replies folks,

The machine did start out life backed up - through a catalog of mishaps, delays plus increasing lack of sleep on my part, I ended up trashing the second backup.

Lesson(s) learnt this time is "don't use a huge disk that isn't easily replaced" for backups. Also don't use one of those poxy right-angled sata cables when the disks are real close together else you end up with the 3rd drive unconnected, write to sdc and end up trashing what should have been sdd. Most importantly don't yield to pressure to put an OS on the first backup disk in an attempt to recover the raid just because it has to be done before the shops open tomorrow.

Anyways, anybody got any thoughts on the FIFO problem (ie "p---------" from 'ls -l'). Virtually all the entries in lost+found have it set. I've googled for mkfifo() source but only gets links to how to use it rather than mkfifo.c itself. If I can see how it sets the bit likely I'll be able to clear it. Ideally it would be RHEL/Centos 5.5 but anything will do.

TIA


All times are GMT -5. The time now is 12:11 AM.