Documente Academic
Documente Profesional
Documente Cultură
Logical Volume Manager is a disk management subsystem that allows you to manage
physical disks as logical volumes.
A volume is a device used for a filesystem, swap or raw data. Without LVM a volume would
Volume
be a disk partition or the whole disk
Physical A physical volume is the disk itself. An entire disk must be initialised if it is to be used by
Volume LVM.
Volume A volume Group is a collection of volumes that are managaed by LVM. Each disk must only
Group belong to one group however a volume group many contain many disks.
This is the space that is defined within a volume group. The volume group is divided into
Logical smaller logical volumes which in turn become the filesystems. A volume group may contain
Volume one or many logical volumes. Logical volumes can be grown or shrunk. A logical volume is a
set of logical extents
A physical extent is a set of contiguous disk blocks on a physical volume. The default size of
Physical
an extent is 4MB but this can be adjusted when initialising the disk. Normally a physical
Extent
extent will have a one to one relationship with logical extents.
Logical A logical volume is a set of logical extents. Logical extents and pyhsical extents are the same
Extent size in a volume. A logical extent is a direct mapping to a pyhsical extent.
This file has in it the device file associated with each disk in a volume group. /sbin/lvmrc
/etc/lvmtab starts each volume group by reading the contents of this file at boot time.This file can be
rebuilt using the command vgscan. The file is a binary file and can be read using Strings.
Physical Volume Links (PV Links) provide dual SCSI or FL links to the same disk. This
PV Links
basically means multipathing to a disk.
Contains a list of other disks in the volume group and whether or not
LIF Directory*
they are bootable
PVRA Contains imports PV-related information such as:
PV ID number
VG ID number
PE Size
PV size
bad block directory
Disk Mirroring
when set means that mirrored copies of a logical extent can share the same physical volume.
n
This means that your original and mirrored data may be on the same physical disk
when set means that mirrored copies of a logical extent cannot share the same physical
y
volume. This means that your original and mirrored data will not share the physical disk
Mirrored data will not be on the same physical volume group (PVG) as the original data.
g
This policay is called a PVG-strict allocation policy.
Allows you to change a physical volume is some way. for an example you can allow or
pvchange
disallow adding extents to this physical volume.
pvcreate Is used to create a physical volume that will be part of a volume group.
pvdisplay shows information about a physical volumes you specify
pvmove you can move extents from one physical volume to other physical volumes.
mknod this command is used to create th major/minors numbers of a volume group
Volume Group Commands
pvcreate /dev/rdsk/c0t1d0
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
Create a new volume group, logical
vgcreate /dev/vg01 /dev/dsk/c0t1d0
volume and filesystem
lvcreate -L 2000 /dev/vg01
newfs -F vxfs -o largefiles /dev/vg01/rlvol1
mkdir /ora_data01
mount /dev/vg01/lvol1 /ora_data01
lvcreate -i 3 -I 32 -L 24 -n lvol1 /dev/vg01
setboot -a 8/8.6.0
replace a non-mirrored disk lvreduce -m 0 -A n /dev/vg01/lvol1 /dev/dsk/cxtxdx
vgreduce vg01 /de/dsk/cxtxdx
or
pvchange -a N /dev/dsk/cxtxdx (if you have online replacement disks)
Notes:
Make sure you have /etc/lvmconf/vgXX.conf
vgcfgbackup is run automatically
Defective disk was not mirrored before it failed
vgcfgrestore -n /devvgXX /dev/rdsk/cxtxdx
vgchange -a y /dev/vgXX
vgsync /dev/vgXX
replace a mirrored disk
Notes:
Defective disk was mirrored before it failed
vgcfgrestore -n /dev/vg00 /dev/rdsk/cxtxdx
vgchange -a y /dev/vg00
vgsync /dev/vg00
mkboot /dev/rdsk/cxtxdx
mkboot -a "hpux -lq" /dev/rdsk/cxtxdx
replace mirrored boot disk
shutdown -r -y 0
Notes:
Confirm that you have /etc/lvmconf/vg00.conf
Defective disk was mirrored before it failed
System One:
vgchange -a n /dev/vg01
vgexport -v -m /tmp/mapfile -s /dev/vg01
rcp /tmp/mapfile <system 2>:/tmp/mapfile
System two:
export and import a volume group
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0xyy0000
vgimport -v -m /tmp/mapfile -s /dev/vg01
vgchange -a y /dev/vg01
mkdir /ora_data01
mount /dev/vg01/ora_data01 /ora_data01
extend VxFS file ssytem using lvextend -L 800 /dev/vg01/lvol1
onlineJFS fsadm -F vxfs -b 800M /ora_data01
change a logical volume to support
fsadm -F vxfs -o largefiles /dev/vg01/rlvol1
largefiles
display the boot area lifls -Clv /dev/dsk/c0t6d0
display boot information lvlnboot -v /dev/vg00
display all disks in the system ioscan -funC disk
lvchange -C y /dev/vg00/dump (makes it contiguous)
make a dump device
lvlnboot -d /dev/vg00/dump
display dump devices lvlnboot -v