LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-21-2012, 01:53 AM   #1
sblinux
LQ Newbie
 
Registered: Mar 2012
Posts: 1

Rep: Reputation: Disabled
Reclaim a disk from the Volume Group


Problem Description: rootvg was extended with a 500GB lun. Although we had allocated only 100GB from it to one of logical volumes. Now we would like to reclaim this 500 GB lun and assign another 100G which could be used for extending the partition.

[root@xyz123 ~]# pvs -o+pv_used
Found duplicate PV ztJsdhgGjliHIjNc8roRb0HmOqzq5jt9: using /dev/sdc1 not /dev/sda1
Found duplicate PV J8TlqfqSR3aeY2gJzkI3SOHbrlv9DoW8: using /dev/sdd1 not /dev/sdb1
PV VG Fmt Attr PSize PFree Used
/dev/cciss/c0d0p2 rootvg lvm2 a- 136.56G 0 136.56G
/dev/sdc1 rootvg lvm2 a- 99.97G 0 99.97G
/dev/sdd1 rootvg lvm2 a- 99.97G 0 99.97G
/dev/sdf1 rootvg lvm2 a- 499.97G 426.53G 73.44G


We would like to reclaim /dev/sdf1

My Action plan is as follows:

1. pvcreate /dev/sdg (To add another 100GB disk)

2. vgextend rootvg /dev/sdg (This will add /dev/sdg in rootvg)

3. pvmove /dev/sdf1 /dev/sdg

4. vgreduce rootvg /dev/sdf1 (to remove the physical volume from the volume group.)


In some posts i have seen someone recommending lvlnboot if we are moving a disk from rootvg. Can someone please look into the action plan and recommend anything needs to be corrected or added in it.

Last edited by sblinux; 03-21-2012 at 01:55 AM.
 
Old 03-21-2012, 07:58 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I think you're going to need pvresize + shrink option http://linux.die.net/man/8/pvresize first.
Here http://linux.die.net/man/8/pvmove it says
Quote:
pvmove allows you to move the allocated physical extents
which I'm pretty sure means all of the allocated extents, used or not ... and sdf1 is 500GB.
These links may also be useful if you haven't already got them
http://tldp.org/HOWTO/LVM-HOWTO/
http://sunoano.name/ws/public_xhtml/lvm.html

However(!) I've never done what you are trying to do, so you may want to wait for someone else to comment before doing anything.
Ideally of course, find spare box that you can play with, create tiny PVs to test and see what happens without a pvresize.

Good luck
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
[SOLVED] Redhat volume group,logical volume group dhairysheel Red Hat 3 08-02-2011 05:07 AM
In rhel 5, is it possible to make a volume group on a mirrored disk? lou248 Linux - Newbie 10 03-31-2009 02:21 AM
LXer: Determining Volume Group Disk Usage On AIX Unix Using Sh And Awk LXer Syndicated Linux News 0 11-11-2008 11:40 AM
LXer: How To Resolve Veritas Disk Group Cluster Volume Management Problems On Linux o LXer Syndicated Linux News 0 09-30-2008 05:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration