Changing The Parameters Of A Logical Volume Group; Renaming Logical Volumes; Removing Logical Volumes - Red Hat ENTERPRISE LINUX 5.1 - LVM ADMINISTRATION Manual

Table of Contents

Advertisement

The following command reduces the size of logical volume lvol1 in volume group vg00 by 3 logical
extents.
lvreduce -l -3 vg00/lvol1

4.4.4. Changing the Parameters of a Logical Volume Group

To change the parameters of a logical volume, use the lvchange command. For a listing of the
parameters you can change, see the lvchange(8) man page.
You can use the lvchange command to activate and deactivate logical volumes. To activate and
deactivate all the logical volumes in a volume group at the same time, use the vgchange command,
Section 4.3.6, "Changing the Parameters of a Volume
as described in
The following command changes the permission on volume lvol1 in volume group vg00 to be read-
only.
lvchange -pr vg00/lvol1

4.4.5. Renaming Logical Volumes

To rename an existing logical volume, use the lvrename command.
Either of the following commands renames logical volume lvold in volume group vg02 to lvnew.
lvrename /dev/vg02/lvold /dev/vg02/lvnew
lvrename vg02 lvold lvnew
For more information on activating logical volumes on individual nodes in a cluster, see
"Activating Logical Volumes on Individual Nodes in a

4.4.6. Removing Logical Volumes

To remove an inactive logical volume, use the lvremove command. You must close a logical volume
with the umount command before it can be removed. In addition, in a clustered environment you must
deactivate a logical volume before it can be removed.
If the logical volume is currently mounted, unmount the volume before removing it.
The following command removes the logical volume /dev/testvg/testlv. from the volume group
testvg. Note that in this case the logical volume has not been deactivated.
[root@tng3-1 lvm]# lvremove /dev/testvg/testlv
Do you really want to remove active logical volume "testlv"? [y/n]: y
Changing the Parameters of a Logical Volume Group
Group".
Cluster".
Section 4.8,
31

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 5.1 - LVM ADMINISTRATION and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Enterprise linux 5.1 cluster logical volume manager

Table of Contents