Bug 980349 - Failed to create(vol-create) a volume for disk based storage pool with format type bsd/sun
Failed to create(vol-create) a volume for disk based storage pool with format...
Status: CLOSED DEFERRED
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Libvirt Maintainers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-02 02:50 EDT by chhu
Modified: 2016-04-26 11:56 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-10 09:41:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description chhu 2013-07-02 02:50:21 EDT
Description of problem:
Failed to create(vol-create) a volume for disk based storage pool with format type bsd/sun.

Version-Release number of selected component:
libvirt-1.1.0-1.el7.x86_64

How reproducible:
100%

Steps:
1. Define a storage pool with supported format type: bsd, with below xml:
<pool type='disk'>
  <name>sdb</name>
  <source>
    <device path='/dev/sdb'>
    </device>
    <format type='bsd'/>
  </source>
  <target>
    <path>/dev</path>
    <permissions>
      <mode>0700</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>

#virsh pool-define pool.xml
Pool sdb defined from pool.xml

2. pool-build and start the defined storage pool.
#virsh pool-build sdb
error: Failed to build pool sdb
error: Requested operation is not valid: Disk label already present
#virsh pool-build sdb --overwrite
Pool sdb built
#virsh pool-start sdb
Pool sdb started

3. fdisk -l check if the disk is listed
# fdisk -l
......
Disk /dev/sdb: 16.0 GB, 16022241280 bytes, 31293440 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

4. vol-create a new volume met error:
#more vol-partition-test.xml
<volume>
<name>sdb1</name>
<source>
<device path='/dev/sdb'>
</device>
</source>
<capacity unit='G'>10</capacity>
<target>
<path>/dev/sdb1</path>
</target>
</volume>

# virsh vol-create sdb vol-partition-test.xml
error: Failed to create vol from vol-partition-test.xml
error: internal error Child process (/usr/sbin/parted /dev/sdb mkpart --script primary 512B 10737418751B) unexpected exit status 1: /usr/sbin/parted: invalid token: primary
Error: Expecting a file system type.

5. set <format type='sun'/> in step1, and repeated step1-4, met the same error in step4. 

Actual results:
In step4, vol-create the volume failed.

Expected results:
In step4, vol-create the volume /dev/sdb1 successfully.
Comment 3 yangyang 2014-07-29 04:28:09 EDT
I met the same issue while set the pool format 'pc98'.
Failed to create vol in pc98 format disk pool.

# virsh vol-create sdd vol-disk.xml 
error: Failed to create vol from vol-disk.xml
error: internal error: Child process (/usr/sbin/parted /dev/sdd mkpart --script primary 3936256B 1077678079B) unexpected exit status 1: 2014-07-29 08:27:10.879+0000: 13043: debug : virFileClose:90 : Closed fd 27
2014-07-29 08:27:10.879+0000: 13043: debug : virFileClose:90 : Closed fd 29
2014-07-29 08:27:10.879+0000: 13043: debug : virFileClose:90 : Closed fd 23
Error: You requested a partition from 3936kB to 1078MB (sectors 7688..2104839).
The closest location we can manage is 3936kB to 1079MB (sectors 7688..2106511).
Comment 4 Cole Robinson 2016-04-10 09:41:23 EDT
I didn't test whether this works or not, but honestly I don't think anyone cares about those uncommon disk formats, it isn't even worth the effort trying to make them work IMO

Note You need to log in before you can comment on or make changes to this bug.