Skip to contentSkip to conversation

Easy way to expend to the maximum length???

linux-lvm Heinz Mauelshagen 1 participant 1 message May 11, 1999

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines

Is there an easy way to expand to the maximum length of a lv? I used lvexpand until it wouldn't allow me to continue, but I figure there has to be an easy way to simple expand to maximum.

Sorry, no direct support for that with LVM commands today.

But if you have next free allocation policy (as oposed to contiguous/striped etc.), you can solve your need by

lvextend -l+vgdisplay YourVG|awk '{if(/^Free PE/){print $3}}' \
/dev/YourVG/YourLV

If you put it into a script and do some parameter magic to parse the VG name etc. -> that's it.

Have to implement an option for that in lvextend ;*)

Regards,
Heinz
--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement C/S Deutsche Telekom AG
Entwicklungszentrum Darmstadt
Heinz Mauelshagen Otto-Roehm-Strasse 71c
Senior Systems Engineer Postfach 10 05 41

                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-