Installation guide

Partition-based storage pools
209
The storage pool is now created, close the Host Details window.
26.1.2.2. Creating a partition-based storage pool using virsh
This section covers creating a partition-based storage pool with the virsh command.
Security warning
Do not use this procedure to assign an entire disk as a storage pool (for example, /dev/sdb).
Guests should not be given write access to whole disks or block devices. Only use this method to
assign partitions (for example, /dev/sdb1) to storage pools.
Procedure 26.2. Creating pre-formatted block device storage pools using virsh
1. Create the storage pool definition
Use the virsh pool-define-as command to create a new storage pool definition. There are
three options that must be provided to define a pre-formatted disk as a storage pool:
Partition name
The name parameter determines the name of the storage pool. This example uses the name
guest_images_fs in the example below.
device
The device parameter with the path attribute specifies the device path of the storage
device. This example uses the partition /dev/sdc1 .
mountpoint
The mountpoint on the local file system where the formatted device will be mounted. If the
mount point directory does not exist, the virsh command can create the directory.