Drive Crashes

neolith13
Posts: 3
Joined: Tue Sep 25, 2012 7:18 am

Re: Drive Crashes

Post by neolith13 » Mon Oct 15, 2012 7:21 pm

Maybe somebody can upload originals partitions for whose hard drive crashed ;)

Thanks ;)

nadum35
Posts: 12
Joined: Mon Oct 15, 2012 4:05 pm

Re: Drive Crashes

Post by nadum35 » Mon Oct 15, 2012 7:29 pm

Hi Mijzelf
Please look at these 2 attachments according to names and sizes. Also when I fdisk -l it shows GPT system??? No clue.
You do not have the required permissions to view the files attached to this post.

nadum35
Posts: 12
Joined: Mon Oct 15, 2012 4:05 pm

Re: Drive Crashes

Post by nadum35 » Mon Oct 15, 2012 7:39 pm

This is my Lacie backup partitions. Please advise
You do not have the required permissions to view the files attached to this post.

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: Drive Crashes

Post by Mijzelf » Mon Oct 15, 2012 8:03 pm

When you build a partition table as shown on rigacci.org, indeed sdx7 cannot fit. On this disk partition 7 is 15MB (10MB used), while the rigacci partition is only 8MB. (And it's 8 MB on all Lacie's I've ever seen).
And apparently a GPT partition table is used. That's strange, as it's only needed for >2TB disks.
I *think* partitions 3 and 4 are just dummies, to be able to have a partition 5-10, because GPT doesn't use extended partitions.

Anyway, I think the box should be able to run with a 'classic' MBR partition table. Can you upload the (compressed) partition 6, 7 and 8 to my FTP server, then I'll see if I can repack them, so the (slightliy adapted) instructions for the EdMini V2 can be used. I'll pm the url.

/Edit:The dumps as shown in your screenshot are not compressed. Please compress them first:

Code: Select all

mv sda6.gz sda6
gzip sda6

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: Drive Crashes

Post by Mijzelf » Tue Oct 16, 2012 11:46 am

It turned out to be a bit more complicated. The partitions (thanks nadum35!) are actually raid members (of a single disk raid1 array). I adapted the instructions for the 2Big2. If they fit, I'll put it in the wiki.

First attempt of instructions:
Connect the new disk to a Linux PC. (A windows PC booted from a Linux Live CD or -usb stick is fine). You can use an USB-SATA converter, or connect the disk on an in- or extern SATA port.
You'll need mdadm and xfstools. mdadm is not installed by default on an Ubuntu system, so you'll have to install it:

Code: Select all

sudo apt-get update
sudo apt-get install mdadm
Find device name
Find the device name of the disk:

Code: Select all

cat /proc/partitions
I'll assume the disk is sdb for the rest of the story.

Collect files
Download the files here.

Become root
You'll need to have root rights to do the next steps. In Ubuntu or Knoppix you can get these by executing

Code: Select all

sudo su
In most other flavors you just execute

Code: Select all

su
Create partitions
Use fdisk to generate this partition table:

Code: Select all

   Device Boot      Start         End      Blocks  Id System
/dev/sdb1               1         250     2008093+  5 Extended
/dev/sdb2             251      121601   974751907+ fd Linux raid autodetect
/dev/sdb5               1          32      256977  fd Linux raid autodetect
/dev/sdb6              33          33        8001  83 Linux
/dev/sdb7              34          35       16002  fd Linux raid autodetect
/dev/sdb8              36         141      851413+ fd Linux raid autodetect
/dev/sdb9             142         249      867510  fd Linux raid autodetect
/dev/sdb10            250         250        8001  83 Linux
/dev/sdb2 is the data partition, it uses all remaining space.
/dev/sdb2 is a primary partition, /dev/sdb1 is an extended partition, and all other partitions are logical.

fdisk is started by:

Code: Select all

fdisk /dev/sdb
and use 'm' to get further help.

Preparing raid arrays
/dev/sdb5 (swap)

Code: Select all

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb5 missing --metadata=0.90
mkswap -f /dev/md0
mdadm --stop /dev/md0
/dev/sdb7 (initfs)

Code: Select all

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb7 missing --metadata=0.90
mke2fs -j /dev/md0
mkdir /tmp/md0
mount /dev/md0 /tmp/md0
cd /tmp/md0
tar xzf /full/path/to/sda7.tgz
cd ..
umount /tmp/md0
mdadm --stop /dev/md0
/dev/sdb8 (ro layer rootfs)

Code: Select all

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb8 missing --metadata=0.90
mke2fs -j /dev/md0
mount /dev/md0 /tmp/md0
cd /tmp/md0
tar xzf /full/path/to/sda8.tgz
cd ..
umount /tmp/md0
mdadm --stop /dev/md0
/dev/sdb9 (rw layer rootfs)

Code: Select all

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb9 missing --metadata=0.90
mke2fs -j /dev/md0
mdadm --stop /dev/md0
/dev/sdb2 (data partition)

Code: Select all

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb2 missing --metadata=0.90
mkfs.xfs /dev/md0
mdadm --stop /dev/md0
/dev/sdb6 (kernel)

Code: Select all

gzip -cd /full/path/to/sda6.gz | dd of=/dev/sdb6
/dev/sdb10 (update kernel)

Code: Select all

dd if=/dev/zero of=/dev/sdb10

nadum35
Posts: 12
Joined: Mon Oct 15, 2012 4:05 pm

Re: Drive Crashes

Post by nadum35 » Tue Oct 16, 2012 7:30 pm

Mijzelf
Great... I will be trying tomorrow hope everything will be working... really appreciate your help.

Regards

G

Post Reply