Installation guide

Chapter 26. Storage pools
204
<device path='/dev/sdb'/>
The device parameter with the path attribute specifies the device path of the storage
device. This example uses the device /dev/sdb .
<target> <path>/dev</path>
The file system target parameter with the path sub-parameter determines the location on
the host file system to attach volumes created with this this storage pool.
For example, sdb1, sdb2, sdb3. Using /dev/, as in the example below, means volumes
created from this storage pool can be accessed as /dev/sdb1, /dev/sdb2, /dev/sdb3.
<format type='gpt'/>
The format parameter specifies the partition table type. his example uses the gpt in the
example below, to match the GPT disk label type created in the previous step.
Create the XML file for the storage pool device with a text editor.
Example 26.1. Dedicated storage device storage pool
<pool type='disk'>
<name>guest_images_disk</name>
<source>
<device path='/dev/sdb'/>
<format type='gpt'/>
</source>
<target>
<path>/dev</path>
</target>
</pool>
3. Attach the device
Add the storage pool definition using the virsh pool-define command with the XML
configuration file created in the previous step.
# virsh pool-define ~/guest_images_disk.xml
Pool guest_images_disk defined from /root/guest_images_disk.xml
# virsh pool-list --all
Name State Autostart
-----------------------------------------
default active yes
guest_images_disk inactive no
4. Start the storage pool
Start the storage pool with the virsh pool-start command. Verify the pool is started with the
virsh pool-list --all command.
# virsh pool-start guest_images_disk
Pool guest_images_disk started
# virsh pool-list --all
Name State Autostart
-----------------------------------------
default active yes
guest_images_disk active no