Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
12.2. Partition-based Storage Pools
This section covers using a pre-formatted block device, a partition, as a storage pool.
For the following examples, a host physical machine has a 500GB hard drive (
/dev/sdc) partitioned into one 500GB, ext4 formatted partition (
/dev/sdc1). We set up a storage pool for it using the procedure below.
12.2.1. Creating a Partition-based Storage Pool Using virt-manager
This procedure creates a new storage pool using a partition of a storage device.
Procedure 12.1. Creating a partition-based storage pool with virt-manager
Open the storage pool settings
- In the
virt-managergraphical interface, select the host physical machine from the main window.Open the Edit menu and select Connection Details
Figure 12.1. Connection Details
- Click on the Storage tab of the Connection Details window.
Figure 12.2. Storage tab
Create the new storage pool
Add a new pool (part 1)Press the + button (the add pool button). The Add a New Storage Pool wizard appears.Choose a Name for the storage pool. This example uses the name guest_images_fs. Change the Type to
fs: Pre-Formatted Block Device.
Figure 12.3. Storage pool name and typePress the Forward button to continue.
Add a new pool (part 2)Change the Target Path, Format, and Source Path fields.
Figure 12.4. Storage pool path and format
Verify the details and press the Finish button to create the storage pool.
- Target Path
- Enter the location to mount the source device for the storage pool in the Target Path field. If the location does not already exist,
virt-managerwill create the directory.
- Select a format from the Format list. The device is formatted with the selected format.This example uses the ext4 file system, the default Red Hat Enterprise Linux file system.
- Source Path
- Enter the device in the
Source Pathfield.This example uses the /dev/sdc1 device.
Verify the new storage poolThe new storage pool appears in the storage list on the left after a few seconds. Verify the size is reported as expected, 458.20 GB Free in this example. Verify the State field reports the new storage pool as Active.Select the storage pool. In the Autostart field, click the On Boot check box. This will make sure the storage device starts whenever the
Figure 12.5. Storage list confirmationThe storage pool is now created, close the Connection Details window.