KVM Virtualization Partition-Based Storage Pool Configuration: Difference between revisions
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
Create a new partition to be exposed as the local storage pool. Use [[fdisk]]. For this example, the partition will be referred to as /dev/sda7. | Create a new partition to be exposed as the local storage pool. Use [[fdisk]]. For this example, the partition will be referred to as /dev/sda7. | ||
Create a file system on the newly allocated partition, as described in [[mkfs.xfs]] or [[mkfs.ext4]]. | Create a file system on the newly allocated partition, as described in [[mkfs.xfs]] or [[mkfs.ext4]]: | ||
<pre> | |||
mkfs.xfs /dev/sda7 | |||
</pre> | |||
Create a new storage pool definition: | |||
<pre> | |||
virsh pool-define-as main-storage-pool - - /dev/sda7 - "/main-storage-pool" | |||
</pre> | |||
More details on the pool-define-as command in {{Internal|Virsh pool-define-as|virsh pool-define-as}} |
Revision as of 15:10, 26 June 2017
External
Internal
Overview
This article explains how to expose a pre-formatted block device partition as storage pool, using virsh.
Do not use this procedure to configure an entire disk as storage pool. Follow this procedure for that Disk-based Storage Pool Configuration.
Procedure
Create a new partition to be exposed as the local storage pool. Use fdisk. For this example, the partition will be referred to as /dev/sda7.
Create a file system on the newly allocated partition, as described in mkfs.xfs or mkfs.ext4:
mkfs.xfs /dev/sda7
Create a new storage pool definition:
virsh pool-define-as main-storage-pool - - /dev/sda7 - "/main-storage-pool"
More details on the pool-define-as command in