sajal Posted July 25, 2007 Share Posted July 25, 2007 i have successfully(read: stupidly) managed to corrupt my main partition of my hard disk!!! and that too just after deleting my backups to make space for pr0n.... now im in a bad fix... tried everything to recover my partition... last 24 hours continously working hard to get it to work... read numerous forums... finders aching now... at the moment ive replaced the hdd on my notebook with an old one(says S.M.A.R.T failure) and am instaling FC7 on it. i have the corrupted hdd with me... Is there any shop in bangkok who know about linux filesystem and can recover the data on the disk? willing to pay for their services if successfull..... at the moment i will be happy with wehatever they can salvage from the disk...really desperate. the damaged partition was a linux LVM type and it used ext3 filesystem. really in a desperate situation. my stupidity ... computer had FC6... yesterday i had problems loging on... i panicked... loged on to the terminal as root... searched using lynx... on reading incomplete guides/forum posts i did an fsck on the main partition. ignored the following warning/ WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage. all hel_l broke loose after that. even testdisk didnt help. guess i should get some sleep. Link to comment Share on other sites More sharing options...
geoffphuket Posted July 25, 2007 Share Posted July 25, 2007 If you're just interested in recovering lost data, how about buying an external drive case for it (USB) and examining the files on a working machine? geoffphuket Link to comment Share on other sites More sharing options...
LostInBKK Posted July 25, 2007 Share Posted July 25, 2007 Ouch!! That sucks..... My 500GB external died on me a few days ago, though I'm running Win XP. The file system was trashed and could not be repaired. I ran (literally RAN) to Pantip and got a new Western Digital MYBook ES 500GB drive and started data recovery on my old one...took 4 days and it finally crapped out before I could recover the last 30gb or so (I had close to 500gb of data on it) The software I used was "Stellar Phoenix FAT & NTFS" and it has worked wonders for me over the years..... they have a version for ext2/3 & UFS....maybe you can find it on one of the torrent sites. I figure as long as the issue is only the file system, this software should be able to recover the data. http://www.stellarinfo.com/ Link to comment Share on other sites More sharing options...
bruceboy Posted July 25, 2007 Share Posted July 25, 2007 Pantip Plaza, near the Amari Hotel, is the place for computers in Bangkok. Good luck with it! Link to comment Share on other sites More sharing options...
sajal Posted July 25, 2007 Author Share Posted July 25, 2007 tx for the replies ppl... tried a lot attaching this disk as external usb to my home pc as well as my neighbour's windoze box .. no help.. tried demo versions of few recovery software... no help. ill try the software suggested by lostinbkk tomorrow (as it too runs only on windows) if that doesnt help ill be rushing to panthip and then to fortune. any shops in particular which have linux experts? or any expert linux suport company/individuals in bkk? let this be a reminder for all you trigger happy ppl.... take a fresh backup NOW and make it a point to update backups daily! Link to comment Share on other sites More sharing options...
Richard-BKK Posted July 25, 2007 Share Posted July 25, 2007 I a situation like this I probably would start with looking for my Fedora Core 6 installation disk's. With Fedora Core 6 you can start from the "Rescue Disk" or "Install Disk 1, boot into Recovery" and login as "root" look what data is effected..... (Sometimes big problems are just a small issue) If the data is still there and you not get any read errors on the hard disk, you could try to "upgrade" to the original installation, what is more like a "rollback" as most of the updates (installed after the installation) will be lost. (But your user space will not be effected) Try to install Fedora Core 6 on the hard disk and select the "upgrade" option and be careful, if it sees the previous Fedora installation it will probably work. Link to comment Share on other sites More sharing options...
Richard-BKK Posted July 25, 2007 Share Posted July 25, 2007 P.S. I would not recommend that you start rushing to Panthip, as it is unlikely that you will find people with enough know-how of the LVM (volume manager) which exist of a detectable ext3 /boot partition and 2 partitions within the LVM known as /root filesystem (VolGroup00) and /swap (VolGroup01). If you can boot from the Fedora rescue CD or Fedora Install Disk 1 you need to try to start the "logical volume manager", to see the status of the volumes. (from command line you can start LVM manager by /usr/bin/system-config-lvm) Read info about LVM (http://tldp.org/HOWTO/LVM-HOWTO/) Link to comment Share on other sites More sharing options...
sajal Posted July 25, 2007 Author Share Posted July 25, 2007 Richard : thanks a lot for the tip. I tried the rescue mode as well. it doesnt seem to be able to recognise any previous installation of FC6. when loged in as shel, fdisk -l shows both the partitions, but im unable to mount the /dev/hda2 i guess my only hope is trying the stellar phonex thingy tomorrow morning. Link to comment Share on other sites More sharing options...
autonomous_unit Posted July 26, 2007 Share Posted July 26, 2007 Ouch. I'm sorry to say that in 15 years of using Linux, I've found that very few people know how to recover badly damaged filesystems. Those who do learned it by trying to recover their own after a mistake like this, and then they vowed to follow better backup strategies and never face doing it again! I was lucky enough to learn their backup attitude before I ever had a disk go wrong. You cannot mount /dev/hda2 because you were using LVM. The PC partitions do not contain filesystems but rather the entire LVM space which is further divided into logical volumes. So, you face the double problem of recovering the LVM metadata if the LVM layer is not auto-detecting properly, before you can even begin to address the corrupted ext3 data. Did your install have a separate /home volume or just / with everything in it? (I don't know what the default behavior of Fedora is, as I always do a custom layout without LVM...) Link to comment Share on other sites More sharing options...
sajal Posted July 26, 2007 Author Share Posted July 26, 2007 thanks a lot for your reply autonomous_unit! i think after almost 1 year of full time linux user, this stupidity still makes me a newbie... the partition structure was the default when i first installed FC% (upgraded to FC6 using yum) approx 100 MB for /boot ext3 rest LVM (almost 80 GB) the LVM had about 2 GB for swap and rest as / /home was just a folder on / not a dedicated partition. what you mean to say... is i am better off not using LVM ? had i not used LVM, my files would be easily recoverable? i have the corrupted hdd with usb cord, i can do stuff on it on my home pc.. (or now my notebook as i got it working with a spare hard disk installed FC7) i just need my /home partition back.... any recovery methods which can help me recover the lvm metadata thingie? Link to comment Share on other sites More sharing options...
Richard-BKK Posted July 26, 2007 Share Posted July 26, 2007 (edited) When you boot from "Rescue Disk" and login as root type command "lvm segtypes" (this shows the recognized logical volume segment types) You can also try "lvmdiskscan" Read http://www.linuxcommand.org/man_pages/lvm8.html Edited July 26, 2007 by Richard-BKK Link to comment Share on other sites More sharing options...
lost_in_space Posted July 26, 2007 Share Posted July 26, 2007 There are people experienced with Linux in Thailand. there's even a Linuxtle (Thai language edition). there is a place somewhere out by bang kapi that gives classes on Linux. i came across their website once, if i can find it again, I'll post it. Link to comment Share on other sites More sharing options...
lost_in_space Posted July 26, 2007 Share Posted July 26, 2007 yep, I Googled " Linux Thailand" and it's number 8 on the list. Good luck recovering your data. Link to comment Share on other sites More sharing options...
autonomous_unit Posted July 27, 2007 Share Posted July 27, 2007 This stupidity? I guess you mean whatever you did to corrupt the system? Hey, if it makes you feel better, I remember in my early days discovering what a recursive delete as root could do when you accidentally included .. in the argument list! It was interesting to watch my computer go senile as /lib and /usr/lib were slowly deleted out from under the X session. As for what to do, I'd suggest listening to Richard's advice about trying to recover the LVM state. Whether you use a rescue CD or a new Linux install (with the old disk on an external adapter), you need to recover the LVM volumes so you can try to attack the filesystem itself. As for future approaches... the best thing to do is use a separate /home volume because sometimes these "stupid mistakes" would corrupt the / system and you can just replace it and preserve your existing /home volume. It also makes it a little easier to manage backups/dumps of just /home, but that's a minor difference. I don't use LVM just because I'm old fashioned and have never seen a need for it. I use regular partitions and Software RAID in all sorts of strange configurations. If your corruption is just from fsck'ing a live filesystem, I don't see why the LVM layer would be corrupted. Unless you tried to fsck the partition containing the LVM system, rather than fsck'ing a filesystem in a logical volume?? That would be a VERY bad idea, and I'm surprised if fsck would even agree to go forward without a basically intact filesystem underneath. Link to comment Share on other sites More sharing options...
sajal Posted July 27, 2007 Author Share Posted July 27, 2007 [root@localhost sajal]# /sbin/lvm vgdisplay -v Finding all volume groups Finding volume group "VolGroup00" Fixing up missing format1 size (74.43 GB) for PV /dev/sdb2 --- Volume group --- VG Name VolGroup00 System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 74.41 GB PE Size 32.00 MB Total PE 2381 Alloc PE / Size 2380 / 74.38 GB Free PE / Size 1 / 32.00 MB VG UUID 4NFF99-9gbc-v6nJ-jq2h-P1hf-hRCy-km77mU --- Logical volume --- LV Name /dev/VolGroup00/LogVol00 VG Name VolGroup00 LV UUID 2x2fDW-nSdl-DKa5-VT59-DBB5-95Ti-Tkujzc LV Write Access read/write LV Status available # open 0 LV Size 72.44 GB Current LE 2318 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:0 --- Logical volume --- LV Name /dev/VolGroup00/LogVol01 VG Name VolGroup00 LV UUID 4af9Y5-DK5S-oFuh-JBWF-55ZO-QD6X-42VNoB LV Write Access read/write LV Status available # open 0 LV Size 1.94 GB Current LE 62 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:1 --- Physical volumes --- PV Name /dev/sdb2 PV UUID jO0ck1-oYYr-i2hJ-AKwZ-8cHA-p7ll-8Dad41 PV Status allocatable Total PE / Free PE 2381 / 1 [root@localhost sajal]# mount /dev/VolGroup00/LogVol00 temp mount: you must specify the filesystem type [root@localhost sajal]# mount -t ext3 /dev/VolGroup00/LogVol00 temp mount: wrong fs type, bad option, bad superblock on /dev/VolGroup00/LogVol00, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so [root@localhost sajal]# dmesg | tail sd 2:0:0:0: Attached scsi generic sg2 type 0 kjournald starting. Commit interval 5 seconds EXT3 FS on sdb1, internal journal EXT3-fs: recovery complete. EXT3-fs: mounted filesystem with ordered data mode. hfs: unable to find HFS+ superblock VFS: Can't find ext3 filesystem on dev dm-0. hfs: unable to find HFS+ superblock hfs: unable to find HFS+ superblock VFS: Can't find ext3 filesystem on dev dm-0. [root@localhost sajal]# Thanks autonomous_unit and richard, i had given up on vgscan and other LVM commands as they werent working for me earlier. now i can see the volume group, but unable to mount it. even runing testdisk on /dev/VolGroup00/LogVol00 doesnt get any partition. I think the problem is the bad superblock thingy... i could see it many places after fsck'ing Link to comment Share on other sites More sharing options...
sajal Posted July 27, 2007 Author Share Posted July 27, 2007 (edited) progress(i hope) : all hope is not lost! discovering the volume group was there but it was still unmountable i fscked it (dont ask me why im in a state of panic!) it ran for a few hours.. asking me to type y loads of times. now i just mounted it to /home/sajal/temp [root@localhost lost+found]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 9.5G 3.4G 5.7G 38% / /dev/sda5 43G 257M 41G 1% /home tmpfs 506M 0 506M 0% /dev/shm /dev/scd0 2.8G 2.8G 0 100% /media/Fedora 7 i386 DVD /dev/sdb1 99M 43M 52M 46% /media/_boot /dev/mapper/VolGroup00-LogVol00 71G 53G 15G 79% /home/sajal/temp [root@localhost lost+found]# its for only one folder under it lost+found loads of folders inside lost+found .. eg :- #13461425 #13699355 #13861164 #13928476 #14286924 #66194 #13437408 #13450805 #13461426 #13699356 #13861193 #13928478 #14286925 #66195 #13437409 #13450848 #13461428 #13699357 #13861224 #13928486 #14286926 #66196 #13437420 #13450867 #13461429 #13699358 #13861248 #13928487 #14286927 #66201 #13437421 #13450868 #13461430 #13699359 #13861286 #13928489 #14286928 #66206 #13437432 #13450870 #13461435 and so on.... now will begin the tedious task of goin thru them... //Edit : typo Edited July 27, 2007 by sajal Link to comment Share on other sites More sharing options...
Richard-BKK Posted July 27, 2007 Share Posted July 27, 2007 Are there now "normal" files in /home/sajal ? If more people get into problems with partitions or hard drives try Parted Magic http://partedmagic.com/index.html it can help you with all sorts of Linux/Windows/Apple/and more and is open source free and can boot from CD-rom Link to comment Share on other sites More sharing options...
sajal Posted July 27, 2007 Author Share Posted July 27, 2007 Hi Richard, the folders in lost+found were all coded in numbers... the files/folders beneath them were normal.... just now... did a find for one of the obvious filenames in my old home and was glad to finally find my home folder.... and everything in it apparently there!!!! /home/sajal from the damaged disk reads as about 44 GB which is about right.... im so glad... tomorrow im supposed to hand over some video files (interview with a celebrity who recently visited bangkok) to someone... he would have eaten me alive i guess if i couldn't recover it. if u read my my rant from last night... ull see that i had lost all hope of recovering my data... its only due to you for mentioning to digg deeper into the LVM thing and autonomous_unit who reminded me... in the end fsck killed my data and it was fsck only which got it back!!!! the current disk inside my pc has some heat issues... need to buy a bigger better disk... moral : Even if u arent as crazy as me, still take backups. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now