Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 515293

Summary: RFE: Support formatting of new (ext3/4) filesystems for fs storage pool type
Product: Red Hat Enterprise Linux 6 Reporter: Daniel Berrangé <berrange>
Component: libvirtAssignee: Osier Yang <jyang>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.0CC: cpelland, dallan, dyuan, gren, hbrock, jdenemar, llim, mzhan, rjones, rwu, veillard, whuang, xen-maint, yoyzhang
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.9.9-1.el6 Doc Type: Enhancement
Doc Text:
No ducumentation needed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 06:20:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daniel Berrangé 2009-08-03 15:57:08 UTC
Description of problem:
The 'fs' storage pool type can only mount block devices which have already been formatted with a filesystem. 

The 'build' operation needs to be implemented for this pool type to allowing formatting of new filesystems on a block device.

Version-Release number of selected component (if applicable):
0.7.0

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 RHEL Program Management 2009-08-03 16:19:09 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Dave Allan 2010-05-17 19:22:10 UTC
Moving to 6.1

Comment 7 Osier Yang 2011-01-29 07:08:17 UTC
The patch was pushed into upstream early in Feb, 2010.

commit b738016b78f157be16ed3200fb0e0023e81e2adb
Author: Dave Allan <dallan>
Date:   Wed Feb 24 09:51:34 2010 +0100

    Format FS pools on creation
    
    Create the filesystem on the partition used by the pool
    * configure.ac: check for mkfs availability
    * libvirt.spec.in: add extra require on util-linux for mkfs
    * src/storage/storage_backend_fs.c: run mkfs with the expected
      fs type when creating a filesystem pool

Also checked libvirt RHEL6.1 source code. the patch is there. so move it to POST.

Comment 12 Osier Yang 2011-04-15 02:08:40 UTC
v4 patch sent to upstream.

https://www.redhat.com/archives/libvir-list/2011-April/msg00465.html

Comment 15 Osier Yang 2011-09-02 13:31:42 UTC
Patches committed into upstream:

ddcd5674aa59ab1f818f333090c0e695ffe93b67
27758859c7192603d803fe0733ac9c141304c762
660cb2530f5bf15183475da54980eb260454000a

Comment 17 Huang Wenlong 2012-01-10 06:50:09 UTC
Verify this bug with: 
libvirt-0.9.9-1.el6.x86_64


#virsh pool-dumpxml sda1

<pool type='fs'>
  <name>sda1</name>
  <uuid>335d8d99-e88e-4d28-ec7d-5c6025d16fc2</uuid>
  <capacity>507744256</capacity>
  <allocation>10762240</allocation>
  <available>496982016</available>
  <source>
    <device path='/dev/sda1'/>
    <format type='ext4'/>
  </source>
  <target>
    <path>/var/lib/libvirt/images/sda1</path>
    <permissions>
      <mode>0700</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>

# virsh pool-build sda1 --overwrite 
Pool sda1 built

# virsh pool-start sda1  
Pool sda1 started

# mount
...
/dev/sda1 on /var/lib/libvirt/images/sda1 type ext4 (rw)
...

Comment 18 Osier Yang 2012-05-04 10:46:13 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No ducumentation needed.

Comment 20 errata-xmlrpc 2012-06-20 06:20:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0748.html