Well, this all works as we hoped and expected. The "lvreduce" command removes logical extents, and their underlying physical extents, beginning at the highest number and working back. So, the last volume added to the LV is where it starts the reduction. I performed the following steps to remove the last unused volume.
1) lvreduce -v -L -2340M /dev/xsg1/winxs_lv1 2) lvdisplay showed /dev/dasdbk1 was no longer part of the LV: lvdisplay -v /dev/xsg1/winxs_lv1 --- Distribution of logical volume on 13 physical volumes --- PV Name PE on PV reads writes /dev/dasdg1 586 29721947 1976928 /dev/dasdh1 586 7748 137092 /dev/dasdi1 586 531740 35392725 /dev/dasdj1 586 18156627 1374479 /dev/dasdq1 586 3198441 586790 /dev/dasdr1 586 2355021 1577484 /dev/dasds1 586 255422 1344139 /dev/dasdbe1 585 0 0 /dev/dasdbf1 585 0 0 /dev/dasdbg1 585 0 0 /dev/dasdbh1 585 0 0 /dev/dasdbi1 585 0 0 /dev/dasdbj1 585 0 0 3) vgreduce -v xsg1 /dev/dasdbk1 I was then able to assign the removed volume to the VG for which it was originally intended. Remember, in my case the LV was NOT striped and the filesystem was not yet resized so the last volume was totally unused. If the filesystem had been resized, an additional step to shrink the filesystem would have had to be done. Thanks to all who replied... Hank Calzaretta "Hall, Ken (IDS DCS PE)" <[EMAIL PROTECTED]> Sent by: Linux on 390 Port <LINUX-390@VM.MARIST.EDU> 02/07/2005 01:45 PM Please respond to Linux on 390 Port <LINUX-390@VM.MARIST.EDU> To LINUX-390@VM.MARIST.EDU cc Subject Re: lvreduce question I'm pretty sure I tried that, and it didn't work. Striping seemed to be all-or-nothing, but it's been a while and I'm not sure I tried all of the variations. Some versions of the lvextend man page seem to indicate that you can extend an LV by increments equal to the number of stripes, i.e., you can add 5 PV's to an existing LV with 5 stripes, but this runs counter to my experiments where it simply wouldn't work if #PV<>#stripes. I originally assumed that you could simply have any number of stripes as long as that was evenly divisible into the number of PVs, but it didn't work, and it took me a LONG time to get confirmation of that. Should be easy to test, but unfortunately, I don't have a properly configured test system handy. > -----Original Message----- > From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of > Little, Chris > Sent: Monday, February 07, 2005 2:22 PM > To: LINUX-390@VM.MARIST.EDU > Subject: Re: [LINUX-390] lvreduce question > > > The portion of the logical volume that is extended, if I > understand Linux's > LVM correctly is not striped. > > -----Original Message----- > From: Hall, Ken (IDS DCS PE) [mailto:[EMAIL PROTECTED] > Sent: Monday, February 07, 2005 12:54 PM > To: LINUX-390@VM.MARIST.EDU > Subject: Re: lvreduce question > > > If the filesystem is striped, you can't reduce or extend it. > The number of > stripes has to match the number of physical volumes. > > I've done this on Intel with reiser on Fedora Core 3, and it > did work. I > extended the volume with lvextend, did a resize_reiserfs, then used > resize_reiserfs to REDUCE the filesystem to slightly less > than the original > size (for safety). This took longer than I thought it would, > given that > there was no chance that the space being removed had been > used, but the > utility goes through it all anyway. Then I ran lvreduce to reduce the > volume back to the single device boundary, and removed the second PV. > Another run of resize_reiserfs extended the FS back to the > original size. > > It all worked fine, but obviously, YMMV. > > I specifically tried this on a new server before putting it > in production > because I was curious about whether it could > be done. > > You should be able to verify this easily enough. vgdisplay > -v will show the > usage of each PV in the VG. Run the create, extend, and > reduce, and see > what happens. > > > -----Original Message----- > > From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of > > Little, Chris > > Sent: Monday, February 07, 2005 1:33 PM > > To: LINUX-390@VM.MARIST.EDU > > Subject: Re: [LINUX-390] lvreduce question > > > > > > Yes, but because the filesystem has yet to be extended, there > > _should_ be no > > data. > > > > If the logical volume isn't striped, I don't see a problem > > with reducing the > > volume group. > > > > That being said, my recommendation would be to make a backup > > first. There > > is danger in everything. > > > > -----Original Message----- > > From: Post, Mark K [mailto:[EMAIL PROTECTED] > > Sent: Monday, February 07, 2005 12:27 PM > > To: LINUX-390@VM.MARIST.EDU > > Subject: Re: lvreduce question > > > > > > No help, but I've always wondered about this myself. The man > > page says "Be > > careful when reducing a logical volume's size, because data > > in the reduced > > part is lost!!!" which makes me very nervous when even > > thinking about this. > > > > > > Mark Post > > > > -----Original Message----- > > From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On > > Behalf Of Hank > > Calzaretta > > Sent: Monday, February 07, 2005 12:05 PM > > To: LINUX-390@VM.MARIST.EDU > > Subject: lvreduce question > > > > > > Hello, > > > > I needed to expand the size of an LVM filesystem. I > successfully ran > > vgextend and lvextend. I have not yet resized the file > > system. My problem > > is that I added 1 too many volumes to the LV. My question > > is, if I run > > lvreduce, as follows: > > > > lvreduce -L -2340M /dev/xsg1/winxs_lv1 > > > > am I guaranteed that the logical extents at the end of the LV > > are the ones > > that will be removed, i.e. the ones on device "/dev/dasdbk1" > > from the list > > below. Since I haven't yet done a filesystem resize, these > > extents are > > unused. I suspect that is the case but I can't find anything > > in writing to > > verify it. > > > > > > Below is the output of the "lvdisplay -v" command: > > > > > > Thanks, > > Hank Calzaretta > > RR Donnelley Technology Services, Inc. > > > > > > --- Logical volume --- > > LV Name /dev/xsg1/winxs_lv1 > > VG Name xsg1 > > LV Write Access read/write > > LV Status available > > LV # 1 > > # open 1 > > LV Size 32.02 GB > > Current LE 8197 > > Allocated LE 8197 > > Allocation next free > > Read ahead sectors 128 > > Block device 58:1 > > > > --- Distribution of logical volume on 14 physical volumes --- > > PV Name PE on PV reads writes > > /dev/dasdg1 586 24547852 1973778 > > /dev/dasdh1 586 7748 137092 > > /dev/dasdi1 586 500448 34685126 > > /dev/dasdj1 586 15363459 1372778 > > /dev/dasdq1 586 3031687 584205 > > /dev/dasdr1 586 2271945 1515371 > > /dev/dasds1 586 253867 1344031 > > /dev/dasdbe1 585 0 0 > > /dev/dasdbf1 585 0 0 > > /dev/dasdbg1 585 0 0 > > /dev/dasdbh1 585 0 0 > > /dev/dasdbi1 585 0 0 > > /dev/dasdbj1 585 0 0 > > /dev/dasdbk1 585 0 0 > > > > > ---------------------------------------------------------------------- > > For LINUX-390 subscribe / signoff / archive access > > instructions, send email > > to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit > > http://www.marist.edu/htbin/wlvindex?LINUX-390 > > > > > ---------------------------------------------------------------------- > > For LINUX-390 subscribe / signoff / archive access instructions, > > send email to [EMAIL PROTECTED] with the message: INFO > > LINUX-390 or > > visit > > http://www.marist.edu/htbin/wlvindex?LINUX-390 > > > > > ---------------------------------------------------------------------- > > For LINUX-390 subscribe / signoff / archive access instructions, > > send email to [EMAIL PROTECTED] with the message: INFO > > LINUX-390 or visit > > http://www.marist.edu/htbin/wlvindex?LINUX-390 > > > -------------------------------------------------------- > > If you are not an intended recipient of this e-mail, please notify the > sender, delete it and do not read, act upon, print, disclose, > copy, retain > or redistribute it. Click here for important additional terms > relating to > this e-mail. http://www.ml.com/email_terms/ > -------------------------------------------------------- > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to [EMAIL PROTECTED] with the message: INFO > LINUX-390 or > visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to [EMAIL PROTECTED] with the message: INFO > LINUX-390 or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > -------------------------------------------------------- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/ -------------------------------------------------------- ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390