Manage logical volumes with GUI tools
Fair Serving
LVM GUI
Red Hat originally developed LVM GUI for logical volume management [3] in their products, although other distributions also can use this tool, which integrates the system-config-lvm package from the software repositories of Debian, Ubuntu, ALT Linux, and CentOS [4]. On Fedora, it is only in the repositories up to version 24, but you can add it manually in Fedora 25 and 26.
After installing, the Logical Volume Management (LVM) launcher is available in the System menu tree. It calls up a three-part window (Figure 2) for configuration that shows the physical and logical volume groups in a list on the left, visualizes the different groups in the middle, including their usage data, and presents the properties of the individual volumes on the right.
The volume groups are shown graphically as cylinders, with the corresponding block device shown at the center of the window. The physical devices appear again to the left of the window, giving you an at-a-glance insight into the number of storage devices connected to the system and which logical volumes are available. The logical volume groups can be conventional structures, such as the /root
and /home
directories and the /swap
partition.
Below the centrally arranged graphic, depending on the device selected, you will find several buttons for setting up the LVM system. If other storage devices are attached to the system but are not (yet) part of the drive group you set up, these buttons are listed under the Uninitialized Entities heading in the left window segment. You can integrate any number of block devices into the system; it is important to note that the software does not detect classically partitioned and formatted drives. Instead, it expects a volume prepared as a physical volume.
To integrate a drive (e.g., a hot-swappable hard drive freshly installed in a server) into the LVM system, press Tools | Initialize Block Device and enter the device name in the window that appears. The device then appears on the left side of the program window.
Clicking on the device name and selecting the Add to existing Volume Group button at bottom center adds the device to a volume group. In a separate window, you decide which specific group this should be; then, the bar display immediately jumps to the starting position and displays all the available drives.
To remove a physical volume from a volume group at a later time, click on the corresponding device name in the Physical View section highlighted in red on the left side and select the Remove Volume from Volume Group option at the bottom of the window. The software deletes the device from the group after a security prompt.
New Groups
To add entire volume groups to the system requires that the respective devices are already registered with the system but have not yet been allocated. Click on the respective device on the left and then select the Create new Volume Group option at the bottom of the program window.
In a separate settings window, specify the name of the new group and the maximum number of physical and logical volumes that can join the group – 256 is the default. Also specify the size of the individual memory cells here; this defaults to 4MB per unit (Figure 3). The new group, which you can edit later, then appears in the Physical View and Logical View tabs on the left side of the program window.
Before you can actively integrate the group into your system, though, you still need to define logical volumes and configure them with the appropriate filesystems. To do this, click on the blue-colored Logical View option in the left window segment and the Create New Logical Volume button at the bottom of the window. In the new dialog box, enter the relevant data for the drive to be integrated. While doing so, note that only ext2/3/4 and XFS filesystems are eligible.
If you check the Mount when rebooted option and specify a mount point, the system mounts the corresponding drive transparently in the existing directory tree after rebooting, allowing you to use it as a conventional subdirectory (Figure 4).
If you subsequently want to modify a logical drive, choose it in the Logical View at left, and click the Edit Properties button after you have enabled the volume in question. Next, configure the desired settings in the same dialog box you used to create the volume.
If you want to grab a snapshot of a logical volume to back up the filesystem, choose the Create Snapshot button. Clicking on it calls up a separate settings window, which provides various options for the snapshot. If necessary, you mount the snapshot as an ordinary directory in the filesystem.
Shrinking and Removing
Logical volumes in LVM installations can also be shrunk on the fly, which, among other things, lets you remove volumes from the storage pool. To remove a logical volume from the group, you only need to click it in the left pane and then select the Remove Selected Logical Volume(s) button. The software deletes the device from the group after a security prompt.
This option will not work if the volume already has a snapshot. To delete volume snapshots or snapshots themselves from the group, you need to select both components and then remove both together after the respective safety prompt.
To delete a physical volume from a LVM system, click on the corresponding Physical View on the left side of the application window and click on Remove Selected Physical Volume(s) to delete it from the system. This option proves to be especially useful when replacing mass storage media in a server system or cluster.
Buy this article as PDF
(incl. VAT)