Activating And Mounting The Original Logical Volume; Removing A Disk From A Logical Volume; Moving Extents To Existing Physical Volumes - Red Hat ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION Manual

Hide thumbs Also See for ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION:
Table of Contents

Advertisement

Chapter 5. LVM Configuration Examples
[root@tng3-1 ~]#
This will destroy any data on /dev/yourvg/yourlv.
Are you sure you want to proceed? [y/n] y
Device:
Blocksize:
Filesystem Size:
Journals:
Resource Groups:
Locking Protocol:
Lock Table:
Syncing...
All Done
[root@tng3-1 ~]# mount /dev/yourvg/yourlv /mnt

5.3.6. Activating and Mounting the Original Logical Volume

Since you had to deactivate the logical volume mylv, you need to activate it again before you can
mount it.
root@tng3-1 ~]# lvchange -a y mylv
[root@tng3-1 ~]# mount /dev/myvg/mylv /mnt
[root@tng3-1 ~]# df
Filesystem
/dev/yourvg/yourlv
/dev/myvg/mylv

5.4. Removing a Disk from a Logical Volume

This example shows how you can remove a disk from an existing logical volume, either to replace the
disk or to use the disk as part of a different volume. In order to remove a disk, you must first move the
extents on the LVM physical volume to a different disk or set of disks.

5.4.1. Moving Extents to Existing Physical Volumes

In this example, the logical volume is distributed across four physical volumes in the volume group
myvg.
[root@tng3-1]# pvs -o+pv_used
PV
VG
/dev/sda1
myvg lvm2 a-
/dev/sdb1
myvg lvm2 a-
60
gfs_mkfs -plock_nolock -j 1 /dev/yourvg/yourlv
/dev/yourvg/yourlv
4096
1277816
1
20
lock_nolock
1K-blocks
24507776
24507776
Fmt
Attr PSize
17.15G 12.15G
17.15G 12.15G
Used Available Use% Mounted on
32
24507744
32
24507744
PFree
Used
5.00G
5.00G
1% /mnt
1% /mnt

Advertisement

Table of Contents
loading

Table of Contents