Server “A” (external drive not plugged in):
Code:
Disk /dev/sda: 499.0 GB, 499021512704 bytes 255 heads, 63 sectors/track, 60669 cylinders, total 974651392 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00059fd2 Device Boot Start End Blocks Id System /dev/sda1 * 2048 1028095 513024 83 Linux /dev/sda2 1028096 21993471 10482688 82 Linux swap / Solaris /dev/sda3 21993472 974651391 476328960 8e Linux LVM Disk /dev/mapper/VG_SYSTEM-ROOT: 487.8 GB, 487755612160 bytes 255 heads, 63 sectors/track, 59299 cylinders, total 952647680 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/VG_SYSTEM-ROOT doesn't contain a valid partition table
I am trying to clone this machine to another server, both servers are Dell Poweredge 1900, with 3 – 250 WD drives (the only difference is the ‘B’ server has WD Cavier drives), pretty much identical machines, same processor and ram. I have a 2TB ext hard drive that I am using to store the output of DD. I have booted from the CD to a rescue system, then mounted my 2TB ext and did the following:
Code:
# dd if=/dev/sda conv=sync,noerror bs=64k | gzip –c | split –a3 –b 2G –verbose - /mnt/exthd/
This gives me the following files on my external hard drive:
Code:
-rwxr-xr-x 1 root root 2147483648 Jan 10 21:00 aaa -rwxr-xr-x 1 root root 2147483648 Jan 10 21:31 aab -rwxr-xr-x 1 root root 2147483648 Jan 10 21:53 aac -rwxr-xr-x 1 root root 2147483648 Jan 10 22:05 aad -rwxr-xr-x 1 root root 2147483648 Jan 10 22:10 aae -rwxr-xr-x 1 root root 2147483648 Jan 10 22:17 aaf -rwxr-xr-x 1 root root 2147483648 Jan 10 22:24 aag -rwxr-xr-x 1 root root 2147483648 Jan 10 22:31 aah -rwxr-xr-x 1 root root 2147483648 Jan 10 22:37 aai -rwxr-xr-x 1 root root 2147483648 Jan 10 22:43 aaj -rwxr-xr-x 1 root root 2147483648 Jan 10 22:50 aak -rwxr-xr-x 1 root root 2147483648 Jan 10 22:56 aal -rwxr-xr-x 1 root root 2147483648 Jan 10 23:02 aam -rwxr-xr-x 1 root root 2147483648 Jan 10 23:06 aan -rwxr-xr-x 1 root root 2147483648 Jan 10 23:12 aao -rwxr-xr-x 1 root root 2147483648 Jan 10 23:32 aap -rwxr-xr-x 1 root root 324998512 Jan 10 23:35 aaq
Now, I boot to the rescue system on server ‘B’ with the external drive plugged in, and run fdisk:
Code:
Disk /dev/sda: 498.8 GB, 498753077248 bytes 255 heads, 63 sectors/track, 60636 cylinders, total 974127104 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00059fd2 Device Boot Start End Blocks Id System Disk /dev/sdb: 2000.4 GB, 2000398933504 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907029167 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00015a3d Device Boot Start End Blocks Id System /dev/sdb1 2048 3907028991 1953513472 c W95 FAT32 (LBA)
Notice sda is only 498.8GB where on server ’A’, it was 499.0. when I try to restore my files from the DD, I get an out of space error. To restore, I use the following:
Code:
# cat /mnt/exthd/aa* | gunzip –c | dd of=/dev/sda dd: writing to ‘/dev/sda’: No space left on device 974127105+0 records in 974127104+0 records out 498753077248 bytes (499 GB) copied, 37067.3 s, 13.5MB/s
My guess, is that although the drives are the same capacity (3 – 250GB in RAID 5 array), the number of cylinders is different because it is a different model, and that is where it is running out of space, although I wouldn’t think it would.
Please correct me if I am wrong as I am a newbie, but if I do “# dd if=/dev/sda” that will take all the partitions with it? Such as sda1, sda2, sda3 correct?