[CentOS] Re: hard drive failing in linux raid

Wed Nov 15 15:05:49 UTC 2006
Alexey Loukianov <aloukianov at lavtech.ru>

Greetings, Scott.

8 ?????? 2006 ?., 19:40:44 you have wrote:

> Adriano Frare spake the following on 11/7/2006 5:51 PM:
>> I tested RAID 1 with differents size hard disk , it is work.
>> 
>> You need first, execute command sfdisk -l /dev/hd_GOOD > partitions.txt
>> Second execute command sfdisk /dev/hd_NEWDISK < partitons.txt.
>> 
>> After recover process normal RAID recover.
>> 
> Or shorten it with a pipe;
> sfdisk -l /dev/hd_GOOD | sfdisk /dev/hd_NEWDISK

To be totally correct, use -uS, as when info is displayed in block
units, some rounding of the size might occur.

Compare this:

[root at runchik ~]# sfdisk -l /dev/sda

Disk /dev/sda: 8923 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+     12      13-    104391   83  Linux
/dev/sda2         13     143     131    1052257+  82  Linux swap
/dev/sda3        144    8922    8779   70517317+  8e  Linux LVM
/dev/sda4          0       -       0          0    0  Empty

With this:

[root at runchik ~]# sfdisk -uS -l /dev/sda

Disk /dev/sda: 8923 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/sda1   *        63    208844     208782  83  Linux
/dev/sda2        208845   2313359    2104515  82  Linux swap
/dev/sda3       2313360 143347994  141034635  8e  Linux LVM
/dev/sda4             0         -          0   0  Empty

-- 
Best Regards,
 Alexey Loukianov                          mailto:aloukianov at lavtech.ru

Software Development Department,
Lavtech Corp
http://mnogo.ru, http://lavtech.ru