Re: Software Raid Expert Needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



on 10-5-2008 2:58 PM Iulian Badea spake the following:
> Hello all,
> 
> I have 2 x 250GB sata disks (sda and sdb).
> 
> # fdisk -l /dev/sda
> 
> Disk /dev/sda: 250.0 GB, 250059350016 bytes
> 255 heads, 63 sectors/track, 30401 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *           1       14939   119997486   fd  Linux raid
> autodetect
> /dev/sda2           14940       29878   119997517+  fd  Linux raid
> autodetect
> /dev/sda3           29879       30400     4192965   fd  Linux raid
> autodetect
> 
> # fdisk -l /dev/sdb
> 
> Disk /dev/sdb: 250.0 GB, 250059350016 bytes
> 255 heads, 63 sectors/track, 30401 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sdb1   *           1         522     4192933+  fd  Linux raid
> autodetect
> 
> # cat /proc/mdstat
> Personalities : [raid1]
> md2 : active raid1 sdb1[1] sda3[0]
>       4192832 blocks [2/2] [UU]
> 
> md1 : active raid1 sda2[1] sda1[0]
>       119997376 blocks [2/2] [UU]
> 
> What I want to do:
> - have on each disk 2 partitions (4gb for swap and the 200gb+ the rest for
> /)
> - raid 1 between them
> 
> This is what I wanted in the beginning, but...I didn't paid attention...
> 
> What can I do to rebuild it to my needs (without loosing data or
> reformatting)?
> 
> Thanks 
It looks like you can fail sdb1 from md2 and start fresh with it. You can
build 2 new arrays on the single drive using the -missing parameter. That will
let you create the raid1 with only one partition. You can then copy all the
data from md1 and md2 to what will become md3 and md4. Then you can wipe sda
and copy the partition table from sdb to sda and add the partitions to md3 and
md4. If the out of sequence numbering of md3 and md4 bothers you, you can
renumber them from a rescue CD.


-- 
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux