FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 10-05-2008, 09:58 PM
Iulian Badea
 
Default Software Raid Expert Needed

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

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-05-2008, 10:15 PM
John R Pierce
 
Default Software Raid Expert Needed

Iulian Badea wrote:

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)?



ouch.

I'd boot a rescue CD, drop the mirrors, repartition and mkfs on sdb1,
dump both file systems to it, drop both metadisks, repartition sda1 as 2
x raid1 w/o any active mirrors, mkfs on them, restore the dumps to these
new md0, md1, then repartition sdb again as the two mirrors and join
them to md0, md1


but thats just me. others might do it differently.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-05-2008, 10:24 PM
Iulian Badea
 
Default Software Raid Expert Needed

My solution, please tell me if I'm right:

-remove the entire sdb disk from raid
-remove sda2 from raid
-resize sda1 (the rest of disk)
-copy partition table from sda to sdb
-make raid between sda1/sdb1 and sda3 and sdb3

Is this possible?

On Sun, 05 Oct 2008 15:15:40 -0700, John R Pierce <pierce@hogranch.com>
wrote:
> Iulian Badea wrote:
>> 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)?
>>
>
> ouch.
>
> I'd boot a rescue CD, drop the mirrors, repartition and mkfs on sdb1,
> dump both file systems to it, drop both metadisks, repartition sda1 as 2
> x raid1 w/o any active mirrors, mkfs on them, restore the dumps to these
> new md0, md1, then repartition sdb again as the two mirrors and join
> them to md0, md1
>
> but thats just me. others might do it differently.
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

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

Thread Tools




All times are GMT. The time now is 06:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org