Escolar Documentos
Profissional Documentos
Cultura Documentos
LVM partitions must be of type 8e (Linux LVM.) We are going to use fdisk to define three (3) new
partitions on available disks installed in our server.
1. Lets begin by taking a look at our current disks and their associated partitions (you must be root)
Physical volumes are the disk resources used to create the LVM. The volumes are
usually simple disk partitions (i.e. /dev/sda1, /dev/sda2 etc) or they can be Linux software
RAID volumes (i.e. /dev/md0, /dev/md1 etc.) It is important to note that LVM does not
provide data protection or redundancy such as RAID, so additional measures should be
taken to ensure fault tolerance is built into the LVM volumes.
1. Check to see what (if any) physical volumes (PV's) already exist on the system
[root@Linux01 ~]#
2.
We already have one PV created on our system (this is in use by our OS) which is
a member of Volume Group VolGroup00.
3. Create 3 new physical volumes (PV's) from /dev/sdb1, /dev/sdc1 and /dev/sdd1
1. Lets begin by taking a look at the Volume Groups the are already present on the
system
2. Create a new Volume Group with the name TCPDumpVolGRP using /dev/sdb1,
/dev/sdc1 and /dev/sdd1 with a physical extent size of 32 MB
[root@Linux01 ~]# vgcreate TCPDumpVolGRP /dev/sdb1 /dev/sdc1 /dev/sdd1 -s
32M
Volume group "TCPDumpVolGRP" successfully created
[root@Linux01 ~]#
3. Verfiy the Volume Group was created successfully
[root@Linu01 ~]# vgdisplay
--- Volume group ---
VG Name TCPDumpVolGRP
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 3
Act PV 3
VG Size 11.91 GB
PE Size 32.00 MB
Total PE 381
Alloc PE / Size 0/0
Free PE / Size 381 / 11.91 GB
9fWFIS-vDlg-xOW6-Xmb8-Tkrg-GPZw-
VG UUID
ZnUZwh
We will now create another LV, but this time specifying the total size of the LV. Lets
begin:
Lets take one last look at our TCPDumpVolGRP Volume Group before we move on.
You'll notice in the following output that our physical extents allocation has increased
and the number of free extents has decreased. These numbers will correlate with the LV's
that we created above: 128 extents + 100 extents = 228 total extents in use
Format LV 4GLV
1.
2. Mount LV TCPDumpLV on the mount point of /TCPDumpLV
Nice work, you are now ready to use your new LV. However, before we finish up, we
need to add the new LV to our fstab so that it will auto mount on reboot.
1. Using your favorite editor, add the following to your /etc/fstab file