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 > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-19-2010, 07:32 PM
Aaron Toponce
 
Default Resizing Raid 1 partitions

On 05/19/2010 12:47 PM, Erwan David wrote:
> Hi,
>
> I have a setup with 2 disks and following raid setting:
>
> sda1+sdb1 -> md0, /
> sda2+sdb2 -> md1 swap
> sda3+sdb3 -> md2 /home
>
> I'd like to resize partitions to get more space on md2 and less on md0.
>
> What would bea good way to achieve this ?

The "best" way to acheive this would be to use LVM above your software
RAID. At that point, it would be very painless, compared to what is
ahead of you now. If you're curious, here would be the steps:

mdadm -C /dev/md0 -n 2 -l 1 -a yes /dev/sd{a,b}
pvcreate /dev/md0
vgcreate home /dev/md0
lvcreate -L 1G -n swap home
lvcreate -L 10G -n root home
lvcreate -l 100%FREE -n home home

Then, for giving more space to home, and less to root, boot off a live
CD, and (assuming you're using ext3/4):

e2fsck /dev/home/root
resize2fs /dev/home/root 6G
lvreduce -L 6G /dev/home/root
lvextend -L +4G /dev/home/home
resize2fs /dev/home/home

That's it! However, because you chose not to use LVM, you will need to
boot of a live CD that supports Linux software RAID, rebuild the array,
and perform the resizing there. I'm not sure if GParted supports this or
not. Worth checking out, however.

I would personally recommend backing up your data, and reinstalling,
with LVM on top of your software RAID. You still have the redundancy,
and you have the awesome flexibility of resizing volumes with great ease.

--
. O . O . O . . O O . . . O .
. . O . O O O . O . O O . . O
O O O . O . . O O O O . O O O
 
Old 05-20-2010, 05:21 AM
Alex Samad
 
Default Resizing Raid 1 partitions

On Wed, 2010-05-19 at 13:32 -0600, Aaron Toponce wrote:
> On 05/19/2010 12:47 PM, Erwan David wrote:
> > Hi,
[snip]

> I would personally recommend backing up your data, and reinstalling,
> with LVM on top of your software RAID. You still have the redundancy,
> and you have the awesome flexibility of resizing volumes with great ease.

ditto

>




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1274332912.28864.1.camel@alex-mini.samad.com.au">http://lists.debian.org/1274332912.28864.1.camel@alex-mini.samad.com.au
 
Old 05-20-2010, 07:57 AM
Erwan David
 
Default Resizing Raid 1 partitions

Aaron Toponce wrote:
> On 05/19/2010 12:47 PM, Erwan David wrote:
>> Hi,
>>
>> I have a setup with 2 disks and following raid setting:
>>
>> sda1+sdb1 -> md0, /
>> sda2+sdb2 -> md1 swap
>> sda3+sdb3 -> md2 /home
>>
>> I'd like to resize partitions to get more space on md2 and less on md0.
>>
>> What would bea good way to achieve this ?
>
> The "best" way to acheive this would be to use LVM above your software
> RAID. At that point, it would be very painless, compared to what is
> ahead of you now. If you're curious, here would be the steps:
>
> mdadm -C /dev/md0 -n 2 -l 1 -a yes /dev/sd{a,b}
> pvcreate /dev/md0
> vgcreate home /dev/md0
> lvcreate -L 1G -n swap home
> lvcreate -L 10G -n root home
> lvcreate -l 100%FREE -n home home
>
> Then, for giving more space to home, and less to root, boot off a live
> CD, and (assuming you're using ext3/4):
>
> e2fsck /dev/home/root
> resize2fs /dev/home/root 6G
> lvreduce -L 6G /dev/home/root
> lvextend -L +4G /dev/home/home
> resize2fs /dev/home/home
>
> That's it! However, because you chose not to use LVM, you will need to
> boot of a live CD that supports Linux software RAID, rebuild the array,
> and perform the resizing there. I'm not sure if GParted supports this or
> not. Worth checking out, however.
>
> I would personally recommend backing up your data, and reinstalling,
> with LVM on top of your software RAID. You still have the redundancy,
> and you have the awesome flexibility of resizing volumes with great ease.
>

Thanks. But I would have preferred avoiding full reinstall...

I found this tutorial
http://www.howtoforge.com/how-to-resize-raid-partitions-shrink-and-grow-software-raid

I will try first.

--
Erwan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4BF4EB53.9060908@rail.eu.org">http://lists.debian.org/4BF4EB53.9060908@rail.eu.org
 

Thread Tools




All times are GMT. The time now is 12:42 AM.

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