0

I followed Red Hat's doc (to the letter) on adding a disk-based storage pool for my libvirt/kvm server. Here's what I see:

[root@kvm ~]# virsh pool-info guest_image_disk
Name:           guest_image_disk
UUID:           5d30a266-2d80-43a8-b6bd-b682eb19a043
State:          running
Persistent:     yes
Autostart:      yes
Capacity:       232.89 GiB
Allocation:     0.00 B
Available:      232.89 GiB

The doc didn't say anything about setting up a partition on the disk; it only says the disk needs a gpt label so I made sure it had one.

The Red Hat page shows this as the xml example file:

<pool type='disk'>
  <name>guest_images_disk</name>
  <source>
    <device path='/dev/sdb'/>
    <format type='gpt'/>
  </source>
  <target>
    <path>/dev</path>
  </target>
</pool>

The confusing part is the path. On my Ubuntu libvirt/kvm machine I used a directory-based volume, so it's a pathname:

<path>/store0/libvirt/pools/default</path>

There is no (or I can't find any) Creating a disk based storage pool using virsh for Red Hat 7 so perhaps that's the problem. I'm running CentOS 7. If I use /var/lib/libvirt/images/sdb as the path, virsh pool-define is happy with that but I'm left wondering whether the pool disk is mounted there. Is that a mount point or no?

7
  • virsh vol-create-as default vol0 232G resulted in this: [root@kvm ~]# virsh pool-info default Name: default UUID: 13df371e-8bc1-49c1-ad54-596cdbd15190 State: running Persistent: yes Autostart: no Capacity: 232.89 GiB Allocation: 464.00 GiB Available: 16777215.77 TiB
    – mr.zog
    May 3, 2015 at 19:59
  • Your pool looks fine. What is the problem you are having? May 3, 2015 at 20:11
  • I can't see where it's attached/imported/mounted in the file system. Did you notice I have 16777215.77 TiB available in my comment? That's impossible.
    – mr.zog
    May 3, 2015 at 20:52
  • Again, my problem with the document is this. In the example .xml the <target><path> variable has "/dev" in it. I just added a disk to my Ubuntu machine using virt-manager and it required me to use a fs pathname.
    – mr.zog
    May 3, 2015 at 20:57
  • What does the Ubuntu setup have to do with anything? May 3, 2015 at 20:59

0

You must log in to answer this question.

Browse other questions tagged .