2Big Drive Image help

Post Reply
Mijzelf
Posts: 6226
Joined: Mon Jun 16, 2008 10:45 am

Re: 2Big Drive Image help

Post by Mijzelf » Wed Aug 19, 2009 12:17 pm

So the patch worked, and the update didn't? An important difference between these is the size.

Long shot: did you reassemble the contents of the disks after Thu Aug 06, 2009 11:30 pm? Maybe you did something wrong with the sdx5 partitions, and are now running without swapspace. A look in the log could tell. Maybe the log also gives an indication what's going wrong with the update.

grfilho
Posts: 7
Joined: Mon Aug 10, 2009 7:59 pm

Re: 2Big Drive Image help

Post by grfilho » Thu Aug 20, 2009 4:45 pm

Maybe the problem is related to the fact that just the storage (/dev/md4) is created as a RAID array? What if every other partition is also created as RAID arrays? I am just thinking out loud and I apologize if I said something stupid... ;)

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

Re: 2Big Drive Image help

Post by Mijzelf » Fri Aug 21, 2009 7:11 pm

Those partitions *are* raid arrays, as you can read in the log Darth provided at Thu Aug 06, 2009 11:30 pm. The fysical partitions were copied, which means that the existing raid information was also copied.

The reason a new array was created for /dev/md4, instead of copying the containing partitions, is that it's impractical to dump and distribute multi-gigabyte partitions.

ozone
Posts: 21
Joined: Mon Aug 24, 2009 2:05 pm

Re: 2Big Drive Image help

Post by ozone » Mon Aug 24, 2009 2:13 pm

Hi guys.

Could anybody please post here original images for hard drives to process this procedure? viewtopic.php?p=4895#p4895

ozone
Posts: 21
Joined: Mon Aug 24, 2009 2:05 pm

Re: 2Big Drive Image help

Post by ozone » Mon Sep 21, 2009 1:29 pm

I've got all neccesary images, tried several times to unbrick my Lacie, but without results :(

Is anybody there who can help me and our followers? :/

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

Re: 2Big Drive Image help

Post by Mijzelf » Tue Sep 22, 2009 6:53 am

What did you try, and what did it do?

ozone
Posts: 21
Joined: Mon Aug 24, 2009 2:05 pm

Re: 2Big Drive Image help

Post by ozone » Tue Sep 22, 2009 7:47 am

I tried these steps viewtopic.php?p=4891#p4891 and everything seems ok.
but when i inserted hard drives into lacie nothing happend - it doesn't boot as usual :(

my hard drives are 500 gigs capacity, but images and partition tables i've got are from 1 tbs HDs. so i edited partition table file a bit (changed only size of sdx2).

one more thing: when i DD mbr file into hard drives and launch GParted i see one unallocated partition on every drive.
the second thing: when i partition hard drives manually in gparted and then DD images on partitions i can see in file manager (in Ubuntu) content of sdx7, sdx8, sdx9, BUT sdx6 and sdx10 become 'unknown' file system.

sorry for а jumble of thoughts :) and thanks for your reply.

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

Re: 2Big Drive Image help

Post by Mijzelf » Tue Sep 22, 2009 9:32 am

Can you post the output of

Code: Select all

sudo /sbin/fdisk -l /dev/sdx
and the original partition table you got?
sdx6 and sdx10 become 'unknown' file system.
For sdx6 that's normal I think. It contains a bootloader and the kernel. No filesystem. You can verify that with

Code: Select all

file partition6
on the original dumpfile. I don't know the purpose of sdx10, but maybe the 'file' command can tell you what it is.

ozone
Posts: 21
Joined: Mon Aug 24, 2009 2:05 pm

Re: 2Big Drive Image help

Post by ozone » Tue Sep 22, 2009 10:46 am

Ok, what i did now:

1.
original partition table i've got:

Code: Select all

# partition table of /dev/sdb
unit: sectors

/dev/sdb1 : start=       63, size=  2008062, Id= 5
/dev/sdb2 : start=  2008125, size=1951511940, Id=83
/dev/sdb3 : start=        0, size=        0, Id= 0
/dev/sdb4 : start=        0, size=        0, Id= 0
/dev/sdb5 : start=      126, size=   256914, Id=82
/dev/sdb6 : start=   257103, size=    16002, Id=83
/dev/sdb7 : start=   273168, size=    16002, Id=83
/dev/sdb8 : start=   289233, size=   353367, Id=83
/dev/sdb9 : start=   642663, size=  1349397, Id=83
/dev/sdb10: start=  1992123, size=    16002, Id=83
but my hard drives are only 500 gigs, so i edited this partition table to:

Code: Select all

# partition table of /dev/sdb
unit: sectors

/dev/sdb1 : start=       63, size=  2008062, Id= 5
/dev/sdb2 : start=  2008125, size=974759940, Id=83
/dev/sdb3 : start=        0, size=        0, Id= 0
/dev/sdb4 : start=        0, size=        0, Id= 0
/dev/sdb5 : start=      126, size=   256914, Id=82
/dev/sdb6 : start=   257103, size=    16002, Id=83
/dev/sdb7 : start=   273168, size=    16002, Id=83
/dev/sdb8 : start=   289233, size=   353367, Id=83
/dev/sdb9 : start=   642663, size=  1349397, Id=83
/dev/sdb10: start=  1992123, size=    16002, Id=83
sudo sfdisk /dev/sdb < /ozones_files/sdR_table
sudo sfdisk /dev/sdc < /ozones_files/sdR_table

Code: Select all

ozone@ubuntu:~$ sudo sfdisk /dev/sdb < '/home/ozone/Desktop/sdR_table2' 
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdb: 60801 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0+    124     125-   1004031    5  Extended
/dev/sdb2        125   60800   60676  487379970   83  Linux
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
/dev/sdb5          0+     15      16-    128457   82  Linux swap / Solaris
/dev/sdb6         16+     16       1-      8001   83  Linux
/dev/sdb7         17+     17       1-      8001   83  Linux
/dev/sdb8         18+     39      22-    176683+  83  Linux
/dev/sdb9         40+    123      84-    674698+  83  Linux
/dev/sdb10       124+    124       1-      8001   83  Linux
New situation:
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/sdb1            63   2008124    2008062   5  Extended
/dev/sdb2       2008125 976768064  974759940  83  Linux
/dev/sdb3             0         -          0   0  Empty
/dev/sdb4             0         -          0   0  Empty
/dev/sdb5           126    257039     256914  82  Linux swap / Solaris
/dev/sdb6        257103    273104      16002  83  Linux
/dev/sdb7        273168    289169      16002  83  Linux
/dev/sdb8        289233    642599     353367  83  Linux
/dev/sdb9        642663   1992059    1349397  83  Linux
/dev/sdb10      1992123   2008124      16002  83  Linux
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Device or resource busy
The command to re-read the partition table failed
Reboot your system now, before using mkfs

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
ozone@ubuntu:~$ sudo sfdisk /dev/sdc < '/home/ozone/Desktop/sdR_table2' 
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdc: 60801 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdc1          0+    124     125-   1004031    5  Extended
/dev/sdc2        125   60800   60676  487379970   83  Linux
/dev/sdc3          0       -       0          0    0  Empty
/dev/sdc4          0       -       0          0    0  Empty
/dev/sdc5          0+     15      16-    128457   82  Linux swap / Solaris
/dev/sdc6         16+     16       1-      8001   83  Linux
/dev/sdc7         17+     17       1-      8001   83  Linux
/dev/sdc8         18+     39      22-    176683+  83  Linux
/dev/sdc9         40+    123      84-    674698+  83  Linux
/dev/sdc10       124+    124       1-      8001   83  Linux
New situation:
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/sdc1            63   2008124    2008062   5  Extended
/dev/sdc2       2008125 976768064  974759940  83  Linux
/dev/sdc3             0         -          0   0  Empty
/dev/sdc4             0         -          0   0  Empty
/dev/sdc5           126    257039     256914  82  Linux swap / Solaris
/dev/sdc6        257103    273104      16002  83  Linux
/dev/sdc7        273168    289169      16002  83  Linux
/dev/sdc8        289233    642599     353367  83  Linux
/dev/sdc9        642663   1992059    1349397  83  Linux
/dev/sdc10      1992123   2008124      16002  83  Linux
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Device or resource busy
The command to re-read the partition table failed
Reboot your system now, before using mkfs

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
3.
sudo dd if=/ozones_files/partition5 of=/dev/sdb5
sudo dd if=/ozones_files/partition6 of=/dev/sdb6
sudo dd if=/ozones_files/partition7 of=/dev/sdb7
sudo dd if=/ozones_files/partition8 of=/dev/sdb8
sudo dd if=/ozones_files/partition9 of=/dev/sdb9
sudo dd if=/ozones_files/partition10 of=/dev/sdb10

Code: Select all

ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/partition5' of=/dev/sdb5
256914+0 records in
256914+0 records out
131539968 bytes (132 MB) copied, 274.655 s, 479 kB/s
ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/partition6' of=/dev/sdb6
16002+0 records in
16002+0 records out
8193024 bytes (8.2 MB) copied, 18.198 s, 450 kB/s
ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/partition7' of=/dev/sdb7
16002+0 records in
16002+0 records out
8193024 bytes (8.2 MB) copied, 17.7902 s, 461 kB/s
ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/partition8' of=/dev/sdb8
353367+0 records in
353367+0 records out
180923904 bytes (181 MB) copied, 11.063 s, 16.4 MB/s
ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/partition9' of=/dev/sdb9
1349397+0 records in
1349397+0 records out
690891264 bytes (691 MB) copied, 49.9944 s, 13.8 MB/s
ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/partition10' of=/dev/sdb10
16002+0 records in
16002+0 records out
8193024 bytes (8.2 MB) copied, 17.4953 s, 468 kB/s
sudo dd if=/ozones_files/partition5 of=/dev/sdc5
sudo dd if=/ozones_files/partition6 of=/dev/sdc6
sudo dd if=/ozones_files/partition7 of=/dev/sdc7
sudo dd if=/ozones_files/partition8 of=/dev/sdc8
sudo dd if=/ozones_files/partition9 of=/dev/sdc9
sudo dd if=/ozones_files/partition10 of=/dev/sdc10

Code: Select all

ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/partition5' of=/dev/sdc5
256914+0 records in
256914+0 records out
131539968 bytes (132 MB) copied, 277.041 s, 475 kB/s
ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/partition6' of=/dev/sdc6
16002+0 records in
16002+0 records out
8193024 bytes (8.2 MB) copied, 18.1376 s, 452 kB/s
ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/partition7' of=/dev/sdc7
16002+0 records in
16002+0 records out
8193024 bytes (8.2 MB) copied, 17.2484 s, 475 kB/s
ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/partition8' of=/dev/sdc8
353367+0 records in
353367+0 records out
180923904 bytes (181 MB) copied, 10.2667 s, 17.6 MB/s
ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/partition9' of=/dev/sdc9
1349397+0 records in
1349397+0 records out
690891264 bytes (691 MB) copied, 49.3246 s, 14.0 MB/s
ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/partition10' of=/dev/sdc10
16002+0 records in
16002+0 records out
8193024 bytes (8.2 MB) copied, 16.9929 s, 482 kB/s
if i open GParted now i can see something like this: http://ozone.name/exchange/gparted1.png

4.
sudo dd if=/ozones_files/dev/sdb.mbr of=/dev/sdb bs=512 count=1
sudo dd if=/ozones_files/dev/sdb.mbr of=/dev/sdc bs=512 count=1

Code: Select all

ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/sdb.mbr' of=/dev/sdb bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.854312 s, 0.6 kB/s
ozone@ubuntu:~$ sudo dd if='/home/ozone/Desktop/sdb.mbr' of=/dev/sdc bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.938638 s, 0.5 kB/s
now GParted says: http://ozone.name/exchange/gparted2.png

5.
sudo /sbin/fdisk -l /dev/sdx

Code: Select all

ozone@ubuntu:~$ sudo /sbin/fdisk -l /dev/sdb

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5911d524

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         125     1004031    5  Extended
/dev/sdb2             126      121601   975755970   83  Linux
/dev/sdb5               1          16      128457   82  Linux swap / Solaris
/dev/sdb6              17          17        8001   83  Linux
/dev/sdb7              18          18        8001   83  Linux
/dev/sdb8              19          40      176683+  83  Linux
/dev/sdb9              41         124      674698+  83  Linux
/dev/sdb10            125         125        8001   83  Linux
ozone@ubuntu:~$ sudo /sbin/fdisk -l /dev/sdc

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5911d524

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         125     1004031    5  Extended
/dev/sdc2             126      121601   975755970   83  Linux
/dev/sdc5               1          16      128457   82  Linux swap / Solaris
/dev/sdc6              17          17        8001   83  Linux
/dev/sdc7              18          18        8001   83  Linux
/dev/sdc8              19          40      176683+  83  Linux
/dev/sdc9              41         124      674698+  83  Linux
/dev/sdc10            125         125        8001   83  Linux
p.s. do i need to mark sdx6 as a boot partition?

ozone
Posts: 21
Joined: Mon Aug 24, 2009 2:05 pm

Re: 2Big Drive Image help

Post by ozone » Tue Sep 22, 2009 12:05 pm

tried to insert hard drives into lacie after that operations. it blinks by front led from blue to red several times, blinks by backside leds few times and that's all. front led doesn't light, backside leds are blue. device doesn't try to get IP through my DHCP and can't be switched off using it's power button.

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

Re: 2Big Drive Image help

Post by Mijzelf » Tue Sep 22, 2009 6:27 pm

The followed procedure seems fine to me. Except
1. sudo sfdisk /dev/sdb < /ozones_files/sdR_table
4. sudo dd if=/ozones_files/dev/sdb.mbr of=/dev/sdb bs=512 count=1
5. sudo /sbin/fdisk -l /dev/sdx
You didn't do this sequence, did you? AFAIKS step 4 erases the result of step 1.

I miss the creation of the raid array on sdx2.
do i need to mark sdx6 as a boot partition?
I don't think so. Only a MS mbr uses that, AFAIK. It won't hurt either.

ozone
Posts: 21
Joined: Mon Aug 24, 2009 2:05 pm

Re: 2Big Drive Image help

Post by ozone » Tue Sep 22, 2009 6:38 pm

i did all these steps, including
sudo dd if=/ozones_files/dev/sdb.mbr of=/dev/sdb bs=512 count=1

i did not create raid now cause only wants to post you the result of 'fdisk -l'

so you think i don't need to DD mbr file on hard drives?
will lacie boot into admin area if i don't create raid?

how can i skip resync?
"5. The array MAY go into re sync mode which would take 10 hours if we allowed it to continue. So we use mdadm to stop the array.
6. Create xfs filesystem on the new raid array md4"

but if i stop array i cant do step 6...

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

Re: 2Big Drive Image help

Post by Mijzelf » Tue Sep 22, 2009 7:24 pm

i did all these steps, including
sudo dd if=/ozones_files/dev/sdb.mbr of=/dev/sdb bs=512 count=1
I should have seen it:
ozone@ubuntu:~$ sudo sfdisk /dev/sdb < '/home/ozone/Desktop/sdR_table2'
Device Boot Start End #cyls #blocks Id System
/dev/sdb2 125 60800 60676 487379970 83 Linux

$ sudo /sbin/fdisk -l /dev/sdb
Device Boot Start End Blocks Id System
/dev/sdb2 126 121601 975755970 83 Linux
You've overwritten your mbr including the partition table. fdisk shows a 1TB partition. You should dd the mbr *before* using sfdisk.
how can i skip resync?
"5. The array MAY go into re sync mode which would take 10 hours if we allowed it to continue. So we use mdadm to stop the array.
6. Create xfs filesystem on the new raid array md4"

but if i stop array i cant do step 6...
You create and assemble (assembling might be done automatically) the raid1 array, then you create the XFS filesystem, and then you stop the array. You've got a valid filesystem, only the unused space (99% of the disk) is not synced. But who cares?

ozone
Posts: 21
Joined: Mon Aug 24, 2009 2:05 pm

Re: 2Big Drive Image help

Post by ozone » Tue Sep 22, 2009 8:03 pm

tried now these steps:

1. dd mbr
2. sudo sfdisk /dev/sdb < '/home/ozone/Desktop/sdR_table2'
3. dd partitions mbx5-mbx10
4. sudo mdadm --create /dev/md4 --level=raid1 --raid-devices=2 /dev/sdb2 /dev/sdc2
mdadm: array /dev/md4 started.
5. sudo mdadm --assemble /dev/md4 /dev/sdb2 /dev/sdc2
mdadm: device /dev/md4 already active - cannot assemble it
6. sudo mkfs.xfs /dev/md4

Code: Select all

sudo mkfs.xfs /dev/md4
mkfs.xfs: /dev/md4 appears to contain an existing filesystem (xfs).
mkfs.xfs: Use the -f option to force overwrite.
ozone@ubuntu:~$ sudo mkfs.xfs -f /dev/md4
meta-data=/dev/md4               isize=256    agcount=4, agsize=30461244 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=121844976, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal log           bsize=4096   blocks=32768, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0

7. fdisk -l

Code: Select all

sudo fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0009f53a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1244     9992398+  83  Linux
/dev/sda2            1245        1305      489982+   5  Extended
/dev/sda5            1245        1305      489951   82  Linux swap / Solaris

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5911d524

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         125     1004031    5  Extended
/dev/sdb2             126       60801   487379970   83  Linux
/dev/sdb5               1          16      128457   82  Linux swap / Solaris
/dev/sdb6              17          17        8001   83  Linux
/dev/sdb7              18          18        8001   83  Linux
/dev/sdb8              19          40      176683+  83  Linux
/dev/sdb9              41         124      674698+  83  Linux
/dev/sdb10            125         125        8001   83  Linux

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5911d524

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         125     1004031    5  Extended
/dev/sdc2             126       60801   487379970   83  Linux
/dev/sdc5               1          16      128457   82  Linux swap / Solaris
/dev/sdc6              17          17        8001   83  Linux
/dev/sdc7              18          18        8001   83  Linux
/dev/sdc8              19          40      176683+  83  Linux
/dev/sdc9              41         124      674698+  83  Linux
/dev/sdc10            125         125        8001   83  Linux

Disk /dev/md4: 499.0 GB, 499077021696 bytes
2 heads, 4 sectors/track, 121844976 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md4 doesn't contain a valid partition table
8.

Code: Select all

ozone@ubuntu:~$ sudo umount /dev/md4
umount: /dev/md4: not mounted
ozone@ubuntu:~$ sudo mdadm --stop /dev/md4
mdadm: stopped /dev/md4

then inserted hard drives into lacie - nothing happend as usual :(((

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

Re: 2Big Drive Image help

Post by Mijzelf » Wed Sep 23, 2009 10:03 am

Too bad!

Maybe (maybe) there is a logfile which shows what's going wrong on disk? I'd expect it on sdx8/var/log. Don't know if your box has a RTC, so the timestamp of the file could be completely wrong.

By the way, can you assemble and mount the sdx5, sdx7 and sdx8 array on your ubuntu box?

Code: Select all

sudo mkdir /mnt/sdx7
sudo mdadm --assemble /dev/md0 /dev/sdb7 /dev/sdc7
sudo mount /dev/md0 /mnt/sdx7
sdx7 and sdx8 should be browsable. sdx5 is a swappartition, so

Code: Select all

sudo swapon /dev/mdx
should work

Code: Select all

cat /proc/swaps
should show it. (Remember to call sudo swapoff /dev/mdx before unplugging the disks. Nasty things could happen)

Post Reply