ical Volumes Manager ATOL: Logical Volume Management Marek Grác xgracOf i.muni.cz Red Hat Czech s.r.o. / Faculty of Informatics, Masaryk University Advanced Topics of Linux Administration = Marek Grác xgr ATOL: Logical Volume Management A layer of abstraction that allows easy manipulation of volumes. Including resizing of filesystems. ► Allow reorganization of filesystems across multiple physical devices ►• Devices are designated as Physical Volumes (PV) ►• One or more PV are used to create a Volume Group (VG) ►• PV are defined with Physical Extents of a fixed size ►• Logical Volumes (LV) are created on PV and are composed of Physical Extents ►• Filesystems may be created on Logical Volumes □ g - = -=-00.0 00 ► Create physical volumes ►• pvcreate /dev/sda3 ► Assign physical volumes to volume groups ►• vgcreate vgO /dev/sda3 ► Create logical volumes from volume groups ► Ivcreate -L 256M -n data vgO *■ mke2fs -j /dev/vgO/data ■f)C\Q»' Marek Grác xgr ATOL: Logical Volume Management ► Growing Volumes ►• Ivextend can grow logical volumes ►• resize2fs can grow EXT3 filesystems online vgextend adds new physical volumes to an existing volume group ► Shrinking Volumes ►• Filesystem have to be reduced first ►• Requires a filesystem check and cannot be performed online ►• Ivreduce can then reduce volume ► Volume Groups can be reduced with: ►• pvmove /dev/sda3 *■ vgreduce vgO /dev/sda3 □ g - = Create a physical volume (PV) on loopback device ► Create a volume group (VG) on top of this device ► Create a logical volume (LV) which fills VG completely ► Create a filesystem with ext3 and mount it ► Do not umnount filesystem in next steps when it is not needed •f) Q^O" Marek Grác xgr ATOL: Logical Volume Management ► Create new PV on separate loopback device ► Extend LV with space available on a new PV ► Extend filesystem on our LV so free space will be available for users ► Remove first loopback from the system (emulate removing old disk) •f) Q^O" Marek Grác xgr ATOL: Logical Volume Management ► Themes: ►• Compare software and hardware RAID ►• Compare new filesystems in Linux (ext4, zfs, reiser4, ► Format: ►• Short presentation (15-20 minutes; 5-7 slides) ►• Paper containing comparision (1000 words) •f) Q^O" Marek Grác xgr ATOL: Logical Volume Management