Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a debian server with a RAID array of a configuration i don't know much about. It apparently had a RAID array with two 500gb disks. The main disk had two partitions, /dev/sda1 where the root FS is mounted, and /dev/sda2.

I say had because i messed up the configuration. I didn't know it was a RAID configuration, and it seemed like the second disk was unused, so i fired up fdisk and i destroyed every partition i could find on /dev/sdb. I hadn't actually understood every partition on sdb was tied to the partitions on sda..

After reboot, none of my partitions show up. The computer works, but :

ls /dev/sd*

gives out nothing. Similarly

fdisk -l

returns nothing too, and parted fails with an error, mdadm --detail --scan returns nothing too.

I tried anything i could find, but i didn't find anybody for who every device disappeared in /dev/ and i don't know what to do. The strange thing is that df outputs :

Sys. de fichiers      1K-blocs   Utilisé    Dispo. Uti% Monté sur
/dev/sda1             10080488   6255148   3313272  66% /
tmpfs                  1018372         0   1018372   0% /lib/init/rw
udev                     10240        32     10208   1% /dev
tmpfs                  1018372         0   1018372   0% /dev/shm

even if /dev/sda1 devices doesn't actually exist. I'm totally lost in here.

Some more info:

  • It's a remote server so i can't get any of the disks out of the server
  • It's running debian lenny

EDIT: Some more info : I can't find the disks under /dev/disk either. If they were there i guess fdisk would find them. The only place i can find info about the partitions is when i do cat /proc/partitions

major minor  #blocks  name

   8     0  488386584 sda
   8     1   10241406 sda1
   8     2     522112 sda2
   8     3  477620482 sda3
   8    16  488386584 sdb
   8    17  488384001 sdb1

I can't save anything with dd either unfortunately since i can't reach any of my disk devices ..

EDIT 2: Here is the dmesg log file

share|improve this question
1  
So the kernel is aware of the disks and partitions, but for whatever reason your device nodes are missing. cd /dev && MAKEDEV sda sdb –  al. Nov 4 '10 at 11:04
add comment

1 Answer

Are you sure the disk device nodes under /dev haven't just decided to go somewhere else? Have you checked out /dev/disk directory and its contents? Sometimes things like that can happen if you have recently upgraded your udev or some other piece of system packages related to disks.

In situations like this it's essential to first backup everything you have! I mean, DO NOT try to do anything for that setup, or you may do more harm. Instead take an image of that system to USB disk or some other media, and do your recovery attempts with that copy. That way you always have your original setup around in case your recovery attempt does harm the situation even more.

You can take that recovery image with some imaging software such as PartImage or if you find the device nodes under /dev/disk, with dd if=/dev/disk/pathtoyourdisk of=/path/to/your/usbdrive/recoveryimage.image bs=1M.

Then you can fire up TestDisk and let it find the partitions for you.

EDIT: This desperate-looking situation was actually due a failed operating system upgrade, as you can see from the comments to my reply. Remember, kids, when everything else fails, stay cool and analyze the situation. :-)

share|improve this answer
    
Hi janne, thanks for your answer. I updated my post with more info. TestDisk doesn't find any partitions either : "No harddisk found" –  raph.amiard Nov 4 '10 at 10:49
    
How about dmesg? Does it tell something about disks? –  Janne Pikkarainen Nov 4 '10 at 10:56
    
Sorry forgot the dmesg log, added it to the post –  raph.amiard Nov 4 '10 at 10:58
    
How can he take an image on USB disk? He said it is a remote server!! –  Khaled Nov 4 '10 at 10:59
2  
@raph.amiard: You did a right decision. Better to take careful baby steps and make sure that whatever you do, you can take steps back, too. Patience and coolness are the keys to successful recovery, not some "HMMMM let me try that button!!" entropy-based random guesses. :-) –  Janne Pikkarainen Nov 4 '10 at 11:08
show 9 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.