Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Increasing the size of an LV to removing and adding
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
maiku
Guru
Guru


Joined: 24 Mar 2004
Posts: 575
Location: Long Island, NY

PostPosted: Sat Sep 12, 2015 8:11 pm    Post subject: Increasing the size of an LV to removing and adding Reply with quote

I have a logical volume that is about 5 TB and has two physical volumes in it. I want to remove one physical volume that is 1 TB and replace it with another volume that is 1.5 TB to give me slightly more space. There is enough free space in the actual volume to do this. The volume volume is also encrypted and then formatted ext4.

Can I do the following without losing any data?

1) Unmount the current volume.
2) Stop the volume group with "vgchange -an vg"
3) Add the new physical volume.
4) Remove the old physical volume.
5) Resize openluks.
6) Resize ext4.

Do I have the order correct order that will save my data? Will adding a new physical volume and removing the old physical volume relocate the data as necessary for me or will I have to do that myself?
_________________
Michael A. Leonetti
As warm as green tea
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43783
Location: 56N 3W

PostPosted: Sat Sep 12, 2015 9:27 pm    Post subject: Reply with quote

maiku,

Don't even think about it until you have recovered your raid set.
When you do this data will be moved around and the failing drives may be pushed over the edge.

PM me if this post is based on a false assumption and I'll delete it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1764

PostPosted: Sun Sep 13, 2015 7:45 am    Post subject: Reply with quote

THere is a tool pvmove and vgreduce that allow you to migrate data from one physical drive to another and then remove that first drive from group. And you can even do that online (At cost of performance reduction dependent on your use pattern)
Never tried resizing LUKS, but it should be easy and safe, and since it's based on device mapper, I'd expect it to work online as well.
Resizing EXT3 and 4 works fine, extending it is save and very quick, you can even do that to a filesystem in use.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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