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.
Description of problem:
virsh pool-create-as do not remount the target dir which is mounted for another device firstly.
Version-Release number of selected component (if applicable):
libvirt-0.9.10-21.el6.x86_64
qemu-kvm-0.12.1.2-2.295.el6.x86_64
# uname -a
Linux jwu.redhat.com 2.6.32-278.el6.x86_64 #1 SMP Fri Jun 1 14:17:12 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
How reproducible:
always
Steps to Reproduce:
1. Make sure the dir "/mnt" on the host is mounted for another device firstly, just like
#mount /dev/sda7 /mnt
#mount
/dev/sda7 on /mnt type ext4 (rw)
.....
2. create a netfs pool and make sure the target is "/mnt", just like
#virsh pool-create-as pool-nfs --type netfs --source-host 10.66.6.23 --source-path /tmp/libvirt --target /mnt/
Pool pool-nfs created
3. check the status of pool-nfs, it is active.
# virsh pool-list --all
Name State Autostart
-----------------------------------------
pool-nfs active no
....
# virsh pool-dumpxml pool-nfs
<pool type='netfs'>
<name>pool-nfs</name>
<uuid>a303f2e6-e4ef-c354-d4a0-d71664be5fc5</uuid>
<capacity unit='bytes'>61926887424</capacity>
<allocation unit='bytes'>39120146432</allocation>
<available unit='bytes'>22806740992</available>
<source>
<host name='10.66.6.23'/>
<dir path='/tmp/libvirt'/>
<format type='auto'/>
</source>
<target>
<path>/mnt</path>
<permissions>
<mode>0700</mode>
<owner>-1</owner>
<group>-1</group>
</permissions>
</target>
</pool>
4. check the host, the /mnt is not remounted for netfs, it is still mount for /dev/sda7
#mount
/dev/sda7 on /mnt type ext4 (rw)
.....
Actual results:
As above.
Expected results:
The /mnt should be remounted for netfs, just like:
#mount
/dev/sda7 on /mnt type ext4 (rw)
10.66.6.23:/tmp/libvirt on /mnt type nfs (rw,vers=4,addr=10.66.6.23,clientaddr=10.66.71.235)
Additional info:
1. after step 4,pool-destroy will umount the existing nfs which is not related to the fs pool.
# virsh pool-destroy pool-nfs
Pool pool-nfs destroyed
# mount
no "/dev/sda7 on /mnt type ext4 (rw)" exist.
2. If the /mnt is not mounted for another device firstly, virsh pool-create-as works well.
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-2013-0276.html
Comment 9yalzhang@redhat.com
2016-06-30 06:28:25 UTC
Hi Osier,
The performance of libvirt 1.2.17 is the same.
But after update libvirt to 1.3.5 currently, the performance changed.
Not sure if there is any risk.
Please help to check,thank you very much!
Description of problem:
when create the netfs pool, virsh pool-create-as will remount the target dir which is mounted for another device firstly.
And umount the origin one. After destroy the pool, the local dir will mount again.
Version-Release number of selected component (if applicable):
libvirt-1.3.5-1.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1.
# mount /dev/sda3 /mnt
2. Write something in the /dev/sda3
# ls /mnt
test test1 lost+found
# mount
....
/dev/sda3 946M 2.5M 878M 1% /mnt
3. Create a netfs pool mount on /mnt, it will succeed, which is different from before.
# virsh pool-create-as netfs --type netfs --source-host 10.66.5.0 --source-path /tmp/nfs --target /mnt
Pool netfs created
# mount
......
/dev/sda3 on /mnt type ext4 (rw,relatime,seclabel,data=ordered)
10.66.5.0:/tmp/nfs on /mnt type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.66.5.194,local_lock=none,addr=10.66.5.0)
# ls /mnt
aaa.img al rhel6u1-fv-nfs-pool.raw
# df -a
......
/dev/sda3 - - - - /mnt
10.66.5.0:/tmp/nfs 419225600 59729920 359495680 15% /mnt
4.
# virsh destroy netfs
Pool netfs destroyed
# df -a
/dev/sda3 967864 2472 899008 1% /mnt
# ls /mnt
test test1 lost+found
Comment 10yalzhang@redhat.com
2016-07-20 04:54:43 UTC
It is a kernel feature change.
# mount /dev/sda3 /mnt
# touch /mnt/sda3
# mount /dev/sda4 /mnt ===> the mount will succeed
# touch /mnt/sda4
# mount ====> list historical mounted info
......
/dev/sda3 on /mnt type ext4 (rw,relatime,seclabel,data=ordered)
/dev/sda4 on /mnt type ext4 (rw,relatime,seclabel,data=ordered)
# df -lh ====> list current mounted info
Filesystem Size Used Avail Use% Mounted on
.....
/dev/sda4 17G 45M 16G 1% /mnt
# umount /mnt ===>/dev/sda4 will be umounted, and /dev/sda3 will recover
# df -lh
Filesystem Size Used Avail Use% Mounted on
......
/dev/sda3 9.1G 37M 8.6G 1% /mnt
# ll /mnt
total 16
drwx------. 2 root root 16384 Jul 20 12:39 lost+found
-rw-r--r--. 1 root root 0 Jul 20 12:49 sda3
Description of problem: virsh pool-create-as do not remount the target dir which is mounted for another device firstly. Version-Release number of selected component (if applicable): libvirt-0.9.10-21.el6.x86_64 qemu-kvm-0.12.1.2-2.295.el6.x86_64 # uname -a Linux jwu.redhat.com 2.6.32-278.el6.x86_64 #1 SMP Fri Jun 1 14:17:12 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux How reproducible: always Steps to Reproduce: 1. Make sure the dir "/mnt" on the host is mounted for another device firstly, just like #mount /dev/sda7 /mnt #mount /dev/sda7 on /mnt type ext4 (rw) ..... 2. create a netfs pool and make sure the target is "/mnt", just like #virsh pool-create-as pool-nfs --type netfs --source-host 10.66.6.23 --source-path /tmp/libvirt --target /mnt/ Pool pool-nfs created 3. check the status of pool-nfs, it is active. # virsh pool-list --all Name State Autostart ----------------------------------------- pool-nfs active no .... # virsh pool-dumpxml pool-nfs <pool type='netfs'> <name>pool-nfs</name> <uuid>a303f2e6-e4ef-c354-d4a0-d71664be5fc5</uuid> <capacity unit='bytes'>61926887424</capacity> <allocation unit='bytes'>39120146432</allocation> <available unit='bytes'>22806740992</available> <source> <host name='10.66.6.23'/> <dir path='/tmp/libvirt'/> <format type='auto'/> </source> <target> <path>/mnt</path> <permissions> <mode>0700</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> 4. check the host, the /mnt is not remounted for netfs, it is still mount for /dev/sda7 #mount /dev/sda7 on /mnt type ext4 (rw) ..... Actual results: As above. Expected results: The /mnt should be remounted for netfs, just like: #mount /dev/sda7 on /mnt type ext4 (rw) 10.66.6.23:/tmp/libvirt on /mnt type nfs (rw,vers=4,addr=10.66.6.23,clientaddr=10.66.71.235) Additional info: 1. after step 4,pool-destroy will umount the existing nfs which is not related to the fs pool. # virsh pool-destroy pool-nfs Pool pool-nfs destroyed # mount no "/dev/sda7 on /mnt type ext4 (rw)" exist. 2. If the /mnt is not mounted for another device firstly, virsh pool-create-as works well.