Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Question about shrinking a reiserfs partition on LVM2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
lothar
Tux's lil' helper
Tux's lil' helper


Joined: 10 Mar 2004
Posts: 87
Location: Norway

PostPosted: Mon Jul 14, 2008 3:10 pm    Post subject: Question about shrinking a reiserfs partition on LVM2 Reply with quote

Hi.
I've got a 750GB HD that I'd like to remove from one LVM Volume Group and add to my raid5 array.

What do I need to do first?
First resize (shrink) the filesystem with resize_reiserfs, then shrink the LV with lvextend, and finally use pvmove to move all data from the HD to free space in the Volume Group?
Just want to be on the safe side, so I thought I'd ask before I do it.

I've got a raid5 array consisting of 4x750GB disks, now I should be able to add the disk with this commands:
Code:
mdadm --add /dev/md3 /dev/sdx1
mdadm --grow /dev/md3 -n 5


Does this look right?
This raid5 array is quite important, so I don't want to loose data.
If this is unsafe to do I just have to live with the 4x750 array I've got today.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Mon Jul 14, 2008 4:30 pm    Post subject: Reply with quote

http://tldp.org/HOWTO/LVM-HOWTO/removeadisk.html

If you need to shrink it first, yes, you first shrink the filesystem, then you shrink the partition. For growing it would be the other way around, first grow the partition, then grow the filesystem.

If you shrink the partition before shrinking the filesystem, you cut off the end of the filesystem. If you grow the filesystem before growing the partition, you grow into nowhere.

Not sure about the commands you need for adding to raid - I don't use raid.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum