Moving Extents To A New Disk - Red Hat LVM ADMINISTRATOR FOR RHEL 4.5 Administrator's Manual

Lvm administrator's guide for rhel 4.5
Table of Contents

Advertisement

Chapter 5. LVM Configuration Examples
/dev/sdd1
myvg lvm2 a-
The disk can now be physically removed or allocated to other users.

4.2. Moving Extents to a New Disk

In this example, the logical volume is distributed across three physical volumes in the volume
group
as follows:
myvg
[root@tng3-1]# pvs -o+pv_used
PV
VG
/dev/sda1
myvg lvm2 a-
/dev/sdb1
myvg lvm2 a-
/dev/sdc1
myvg lvm2 a-
We want to move the extents of
4.2.1. Creating the New Physical Volume
Create a new physical volume from
[root@tng3-1 ~]# pvcreate /dev/sdd1
Physical volume "/dev/sdd1" successfully created
4.2.2. Adding the New Physical Volume to the Volume Group
Add
to the existing volume group
/dev/sdd1
[root@tng3-1 ~]# vgextend myvg /dev/sdd1
Volume group "myvg" successfully extended
[root@tng3-1]# pvs -o+pv_used
PV
VG
/dev/sda1
myvg lvm2 a-
/dev/sdb1
myvg lvm2 a-
/dev/sdc1
myvg lvm2 a-
/dev/sdd1
myvg lvm2 a-
4.2.3. Moving the Data
Use the
command to move the data from
pvmove
[root@tng3-1 ~]# pvmove /dev/sdb1 /dev/sdd1
/dev/sdb1: Moved: 10.0%
...
66
17.15G
Fmt
Attr PSize
PFree
17.15G
17.15G 15.15G
17.15G 15.15G
to a new device,
/dev/sdb1
/dev/sdd1
myvg
Fmt
Attr PSize
PFree
17.15G
17.15G 15.15G
17.15G 15.15G
17.15G 17.15G
2.15G
Used
7.15G 10.00G
2.00G
2.00G
/dev/sdd1
.
.
Used
7.15G 10.00G
2.00G
2.00G
0
to
/dev/sdb1
/dev/sdd1
.
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Configuration and administration 4.5

Table of Contents