Koozali.org: home of the SME Server

Partitions deleted

Offline rmoria

  • ****
  • 78
  • +0/-0
    • http://www.osvorca.nl
Partitions deleted
« on: March 24, 2015, 12:26:15 PM »
Hi all,

i made a big booboo. I wanted to partition 2 external harddisks, but due to typo's and not paying enough attention I wiped the sda1 and sda2 partition.
I am using testdisk to try and recover the data, but i need some help figuring out which partition to restore.
Is there a way to rebuild the disk to it's former state?
...
Yes, I can ask more questions then you can answer  8-)
...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Partitions deleted
« Reply #1 on: March 24, 2015, 12:28:09 PM »
first partition is mounted in /boot, the second one is the one which contains your data..

you'd better reinstall and restore

Offline rmoria

  • ****
  • 78
  • +0/-0
    • http://www.osvorca.nl
Re: Partitions deleted
« Reply #2 on: March 24, 2015, 02:55:48 PM »
Can I do a restore from the 'raw' data? I was partitioning the other harddisks because my backup-disk failed.
...
Yes, I can ask more questions then you can answer  8-)
...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Partitions deleted
« Reply #3 on: March 24, 2015, 02:58:23 PM »
I don't know what you mean by "raw data"

anyway, if you just deleted your partitions, testdisk should do the trick


Offline rmoria

  • ****
  • 78
  • +0/-0
    • http://www.osvorca.nl
Re: Partitions deleted
« Reply #4 on: March 24, 2015, 03:10:59 PM »
I'll see what testdisk digs up first. Its a 1 TB disk so the runtime is about 5 days  :sad:

With raw data i ment just the files, without any rights. That is when i can't restore the partition, but i can save the files.
...
Yes, I can ask more questions then you can answer  8-)
...

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Partitions deleted
« Reply #5 on: March 24, 2015, 03:21:48 PM »
You should first restore your partition /dev/sda2 with testdisk. Then, you need to assemble a RAID1 array from it, using mdadm (mdadm --assemble /dev/md1 --run /path/to/your/restored/sda2). Then, from this RAID array, you'll have to scan for LVM volumes (vgscan), and enable logical volumes in the "main" volume group (vgchange -ay main). Only then you should have access to /dev/main/root (which you can mount anywhere, it's an ext3 file system) to get your data back. Of course, all this assume that you haven't damaged the partition, itself, but just touched the partition table
C'est la fin du monde !!! :lol: