Koozali.org: home of the SME Server

Hard disk crashed, how to restore data

Offline swissis

  • ***
  • 61
  • +0/-0
Hard disk crashed, how to restore data
« on: March 14, 2007, 02:30:07 PM »
Hi my Primary Master has some problems and i can't get SME to boot.
It hangs at mysql.init and the disk makes strange noises then.

So i dicided to do a fresh install on a different disk.
After that i would like to add the corrupt disk as slave and try to rescue some data.

I followed a topic on this forum to add a second harddisk but all i see is a /grub and a /lost+found folder in the mounting folder

Can anyone tell me if and how i can get data back?
...

Offline wjhobbs

  • *****
  • 171
  • +0/-0
    • http://www.chryxus.ca
Hard disk crashed, how to restore data
« Reply #1 on: March 15, 2007, 11:08:08 PM »
Please show the results of
# sfdisk -s

John
...

Offline swissis

  • ***
  • 61
  • +0/-0
Hard disk crashed, how to restore data
« Reply #2 on: March 16, 2007, 12:25:04 AM »
Hi, i can't boot the server using that drive.
...

Offline wjhobbs

  • *****
  • 171
  • +0/-0
    • http://www.chryxus.ca
Hard disk crashed, how to restore data
« Reply #3 on: March 16, 2007, 01:36:56 AM »
I guess I wasn't clear.

I am presuming that you have managed to boot from your new drive with the fresh install. I also presume that you have attached the old (corrupt) drive to the same machine.

Before you try to mount anything, please do
# sfdisk -s

This will show what partitions the system can see and then we might know what we are working with. If the corrupt disk is so bad you can't see the partitions, then your data is probably gone. If you can see the partitions on the old drive, you may have to do something to them (i.e. change their filesystem type to 0x83) before you can get at the data.

John
...

Offline swissis

  • ***
  • 61
  • +0/-0
Hard disk crashed, how to restore data
« Reply #4 on: March 16, 2007, 07:10:38 AM »
I have the disk in a machine which i booted with knoppix right now.
It's the only HD and when i type sfdisk -s it says

/dev/hda: 60051600
total1: 60051600 blocks
...

Offline wjhobbs

  • *****
  • 171
  • +0/-0
    • http://www.chryxus.ca
Hard disk crashed, how to restore data
« Reply #5 on: March 16, 2007, 04:37:51 PM »
Using Knoppix, if you do
# fdisk /dev/hda
followed by 'p', you should see two partitions: a small one at /dev/hda1 and a larger one at /dev/hda2. Both should have a partition id of 'fd' indicating a Linux RAID partition. Your data files are on the larger one /dev/hda2.

If you use the 't' option on fdisk and select that partition and change its type to '83' it will become a standard ext3 partition.

You can then use fsck to try to repair the partition before getting your data off -- or you can simply mount the partition and try to copy your data to another drive. (Others may have opinions about what is best.)

Search the forum or check the manual to see which directories are included in backups and these are the ones you should try to backup. Unfortunately, since you were unable to do a pre-backup event, your mysql database may not get restored correctly when you put the data back on a fresh install.

Hope this helps. Good luck.

John
...