On Tue, Aug 12, 2008 at 11:58:07PM -0400, Cole Robinson wrote:
Daniel P. Berrange wrote:
>
> This isn't correct because the target path is not guarenteed to point to
> the master device name /dev/sda1. The user could have configured it to
> use a stable path such as /dev/disk/by-uuid/4cb23887-0d02-4e4c-bc95-7599c85afc1a
>
>
Hmm, I couldn't actually get /dev/disk/by-uuid to work. Seems like the
vol populating code for disks doesn't take into account the the pools
target path, and just uses the real partition path.
Yes it does - this is what the virStorageBackendStablePath() method call
does. What I expect is going on is that you merely created a bunch of
partitions, but don't have any filesystems formatted in them. The UUID
stuff is actually the UUID of the filesystem. If you try with a target
path of /dev/disk/by-path you'll probably have more luck. If it can't
find a stable path under the target you give, it automatically falls
back to the generic /dev/sdXX path.
The following config should show it in action
<pool type='disk'>
<name>mydisk</name>
<source>
<device path='/dev/sda'>
</device>
</source>
<target>
<path>/dev/disk/by-path</path>
</target>
</pool>
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|