Ubuntu Server Guide Changes, errors and bugs
Logical Volume Manager (LVM)
Download 1.27 Mb. Pdf ko'rish
|
ubuntu-server-guide
- Bu sahifa navigatsiya:
- Installation
Logical Volume Manager (LVM)
Logical Volume Manger, or LVM, allows administrators to create logical volumes out of one or multiple physical hard disks. LVM volumes can be created on both software RAID partitions and standard partitions residing on a single disk. Volumes can also be extended, giving greater flexibility to systems as requirements change. Overview A side effect of LVM’s power and flexibility is a greater degree of complication. Before diving into the LVM installation process, it is best to get familiar with some terms. • Physical Volume (PV): physical hard disk, disk partition or software RAID partition formatted as LVM PV. • Volume Group (VG): is made from one or more physical volumes. A VG can can be extended by adding more PVs. A VG is like a virtual disk drive, from which one or more logical volumes are carved. • Logical Volume (LV): is similar to a partition in a non-LVM system. A LV is formatted with the desired file system (EXT3, XFS, JFS, etc), it is then available for mounting and data storage. Installation As an example this section covers installing Ubuntu Server Edition with /srv mounted on a LVM volume. During the initial install only one Physical Volume (PV) will be part of the Volume Group (VG). Another PV will be added after install to demonstrate how a VG can be extended. There are several installation options for LVM in Guided storage configuration step: • Select “Use an entire disk”, “Set up this disk as an LVM group”, and Done. This option will create a /boot partition in the local disk and the rest of the disk space is allocated to the LVM group. • Select “Use an entire disk”, “Set up this disk as an LVM group”, “Encrypt the LVM group with LUKS”, insert the password (and confirm it), and Done. The output is the same as described above but the LVM group is encrypted. 6 • Select “Custom storage layout”, and Done. At this time the only way to configure a system with both LVM and standard partitions, during installation, is to use this approach. This is the option used in this example. Follow the installation steps until you get to the Storage configuration step, then: Let’s first create a /boot partition in a local disk. Select the hard disk under AVAILABLE DEVICES, and Add GPT Parition. Add the size and format (ext4), then select /boot as mount point. Finally, select Create. The /boot partition will be listed under FILE SYSTEM SUMMARY. Next, create standard swap, and / partitions with whichever filesystem you prefer following the steps above. Now the LVM volume group will be created. Select “Create volume group (LVM)”. Enter a name for the volume group (default is vg0), select the device (LVM physical volume) and the size, and choose “Create”. There is an option to encrypt your volume, if you want it encrypted select “Create encrypted volume” and enter a password (also confirm it). The brand new LVM group (if the default was not changed it is vg0) will be listed as a device in AVAILABLE DEVICES. To create a LVM logical volume select the created LVM volume group and “Create Logical Volume”. Give it a name (default is lv-0), let’s call it lv-srv since this will be used to mount /srv. Insert the size of the volume, your preferred filesytem format, and select /srv as mount point. Choose “Create”. The LVM logical volume mounted at /srv will be listed in the FILESYSTEM SUMMARY. Finally, select “Done”. Then confirm the changes and continue with the rest of the installation. There are some useful utilities to view information about LVM: • pvdisplay: shows information about Physical Volumes. • vgdisplay: shows information about Volume Groups. • lvdisplay: shows information about Logical Volumes. Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling