fix free of event channel in blkfront
PATCH 1/1 fix free of event channel in blkfront
Hi All,
We tested the xm block-attach/detach command.
It repeats block-attach/detach command for DomU and pv-on-hvm on HVM Domain. (block-attach -> block-detach -> block-attach -> block-detach -> ...)
The block-attach command failed when repeating 256 times. It is because the channel had not been freed in blkfront. Therefore, it remain using the event channel.
This patch is corrected to free the event channel in blkfront.
Thanks
--
Takanori Kasai
# HG changeset patch
# User [email protected]
# Node ID 70a31395fe9ea036ac887818489d0d057f4f8d22 # Parent 159ae46d5e7fdf63a1cc21b3d0f634d85bf2703f fix free of event channel in blkfront
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c +2 -0
@@ -384,6 +384,8 @@ static int blkfront_remove(struct xenbusDPRINTK ("blkfront_remove: %s removed\n" , dev->nodename); +xenbus_free_evtchn (dev, info->evtchn); +blkif_free (info,0 );kfree (info);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 6 lines
We tested the xm block-attach/detach command.
It repeats block-attach/detach command for DomU and pv-on-hvm on HVM Domain. (block-attach -> block-detach -> block-attach -> block-detach -> ...)The block-attach command failed when repeating 256 times.
I can't reproduce this - just tested 500 or so attach/detach pairs in a tight loop and worked for me. However I was using a regular domU - is it pv-on-hvm only? Can you give a more detailed repro case (or a script)?
cheers,
S.
Hi Steven,
Quoted 7 lines
Quoted 5 lines
We tested the xm block-attach/detach command.
It repeats block-attach/detach command for DomU and pv-on-hvm on HVM Domain. (block-attach -> block-detach -> block-attach -> block-detach -> ...)The block-attach command failed when repeating 256 times.
I can't reproduce this - just tested 500 or so attach/detach pairs in a tight loop and worked for me. However I was using a regular domU - is it pv-on-hvm only? Can you give a more detailed repro case (or a script)?
We tested only pv-on-hvm. The script used when testing is appended.
We will confirm it again with latest xen-unstable.hg.
Thanks,
--
Takanori Kasai
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi Steven,
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
We tested the xm block-attach/detach command.
It repeats block-attach/detach command for DomU and pv-on-hvm on HVM Domain. (block-attach -> block-detach -> block-attach -> block-detach -> ...)The block-attach command failed when repeating 256 times.
Quoted 7 lines
Quoted 4 lines
I can't reproduce this - just tested 500 or so attach/detach pairs in a tight loop and worked for me. However I was using a regular domU - is it pv-on-hvm only? Can you give a more detailed repro case (or a script)?
We tested only pv-on-hvm.
The script used when testing is appended.
Sorry, the appended script was for network.
It tested in the following scripts.
-------------------------------------------------
#!/bin/sh
DomainID=25
DevID=8448
Count=0
while :
do
echo "##### block-attach ##### $Count"
xm block-attach $DomainID phy:/dev/sdc1 hde w
sleep 1
xm block-list $DomainID
sleep 1
echo "##### block-detach #####"
xm block-detach $DomainID $DevID
Count=expr $Count + 1
#DevID=expr $DevID + 1
sleep 1
xm block-list $DomainID
sleep 1
done
exit 0
-------------------------------------------------
Quoted 1 line
We will confirm it again with latest xen-unstable.hg.
I confirmed it with up-to-date xen-unstable.hg. (cs 13282)
It did not reproduce it in DomU.
Because VBD was not able to be used, pv-on-hvm was not able to confirm it. The following errors occur.
# insmod xen-vbd.ko xen-vbd: Unknown symbol irq_to_evtchn_port insmod: error inserting 'xen-vbd.ko': -1 Unknown symbol in module
When reproducing it with pv-on-hvm, evtchn had not been liberated as follows.
# xm block-attach <DomID> file:/test.img hde w
# xm block-list <DomID>
Vdev BE handle state evt-ch ring-ref BE-path
2049 0 0 4 6 8 /local/domain/0/backend/vbd/6/2049
8448 0 0 4 7 306 /local/domain/0/backend/vbd/6/8448
# xm block-detach <DomID> 8448
# xm block-list <DomID>
Vdev BE handle state evt-ch ring-ref BE-path
2049 0 0 4 6 8 /local/domain/0/backend/vbd/6/2049
# xm block-attach <DomID> file:/test.img hde w
# xm block-list <DomID>
Vdev BE handle state evt-ch ring-ref BE-path
2049 0 0 4 6 8 /local/domain/0/backend/vbd/6/2049
8448 0 0 4 8 306 /local/domain/0/backend/vbd/6/8448
^^^<= not 7If the evtchn number is liberated, it is sure to become the same number. The evtchn number keeps increase if it repeats.
I will confirm whether to be liberated as follows and correctly.
・xen-unstable.hg : cs 13192
Revert cset 13181:f087c013cf12 since the event channel is already unbound
via
blkif_free() -> unbind_from_irqhandler() -> unbind_from_irq()
Thanks,
--
Takanori Kasai
Hi Steven,
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 5 lines
We tested the xm block-attach/detach command.
It repeats block-attach/detach command for DomU and pv-on-hvm on HVM Domain. (block-attach -> block-detach -> block-attach -> block-detach -> ...)The block-attach command failed when repeating 256 times.
I can't reproduce this - just tested 500 or so attach/detach pairs in a tight loop and worked for me. However I was using a regular domU - is it pv-on-hvm only? Can you give a more detailed repro case (or a script)?
It already seems to have been corrected.
・xen-unstable.hg : cs 13198
[PV-ON-HVM] Update evtchn interface to match new PV Linux interfaces.
----------------------------------------------------------------------------------------------------
unmodified_drivers/linux-2.6/platform-pci/evtchn.c +0 -0
@@ -118,8 +144,12 @@ void unbind_from_irqhandler(unsigned int
mask_evtchn(evtchn); evtchns[evtchn].handler = NULL;
+
+ if (evtchns[evtchn].close) {
+ struct evtchn_close close = { .port = evtchn };
+ HYPERVISOR_event_channel_op(EVTCHNOP_close, &close);
+ }
}
-EXPORT_SYMBOL(unbind_from_irqhandler);
void notify_remote_via_irq(int irq)
----------------------------------------------------------------------------------------------------
However, the following problems remain.
I think that it operates if the following problems can be solved.
It is necessary to correct pv-on-hvm according to the following corrections.
・xen-unstable.hg : cs 13197
[LINUX] Extend the event-channel interfaces to provide helper methods
Quoted 9 lines
I confirmed it with up-to-date xen-unstable.hg. (cs 13282)
It did not reproduce it in DomU.
Because VBD was not able to be used, pv-on-hvm was not able to confirm it. The following errors occur.# insmod xen-vbd.ko xen-vbd: Unknown symbol irq_to_evtchn_port insmod: error inserting 'xen-vbd.ko': -1 Unknown symbol in module
Thanks,
--
Takanori Kasai
Hi
I am using the xen-3.0.3 on paravirtualVM
and I try to use xm block-attach dom6 /vm1/tp.img sda2 w It seems to be ok, no error ,
but in the dom6 there is no sda2
and xm block-detach dom6 2050,it does not work and xm block-list dom6 as follows ,
[root@= dev]# xm block-list dom6
Vdev BE handle state evt-ch ring-ref BE-path 2049 0 0 4 7 8 /local/domain/0/backend/vbd/127/2049 2050 0 0 3 8 665 /local/domain/0/backend/vbd/127/2050
I am confused about the function of these commands and how to use these commands correctly
could you give me a help
Thanks in advance
Quoted 100 lines · Kasai Takanori
Hi Steven,
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
We tested the xm block-attach/detach command.
It repeats block-attach/detach command for DomU and pv-on-hvm on HVM Domain.
(block-attach -> block-detach -> block-attach -> block-detach -> ...)The block-attach command failed when repeating 256 times.
Quoted 7 lines
Quoted 4 lines
I can't reproduce this - just tested 500 or so attach/detach pairs in a tight loop and worked for me. However I was using a regular domU - is it pv-on-hvm only? Can you give a more detailed repro case (or a script)?
We tested only pv-on-hvm.
The script used when testing is appended.Sorry, the appended script was for network. It tested in the following scripts.
-------------------------------------------------
#!/bin/sh
DomainID=25
DevID=8448
Count=0while :
do
echo "##### block-attach ##### $Count"
xm block-attach $DomainID phy:/dev/sdc1 hde w sleep 1
xm block-list $DomainID
sleep 1
echo "##### block-detach #####"
xm block-detach $DomainID $DevID Count=expr $Count + 1
#DevID=expr $DevID + 1
sleep 1
xm block-list $DomainID
sleep 1
done
exit 0
-------------------------------------------------Quoted 1 line
We will confirm it again with latest xen-unstable.hg.
I confirmed it with up-to-date xen-unstable.hg. (cs 13282)
It did not reproduce it in DomU.
Because VBD was not able to be used, pv-on-hvm was not able to confirm it.
The following errors occur.# insmod xen-vbd.ko xen-vbd: Unknown symbol irq_to_evtchn_port insmod: error inserting 'xen-vbd.ko': -1 Unknown symbol in moduleWhen reproducing it with pv-on-hvm, evtchn had not been liberated as follows.
# xm block-attach <DomID> file:/test.img hde w # xm block-list <DomID> Vdev BE handle state evt-ch ring-ref BE-path 2049 0 0 4 6 8 /local/domain/0/backend/vbd/6/2049 8448 0 0 4 7 306 /local/domain/0/backend/vbd/6/8448 # xm block-detach <DomID> 8448 # xm block-list <DomID> Vdev BE handle state evt-ch ring-ref BE-path 2049 0 0 4 6 8 /local/domain/0/backend/vbd/6/2049 # xm block-attach <DomID> file:/test.img hde w # xm block-list <DomID> Vdev BE handle state evt-ch ring-ref BE-path 2049 0 0 4 6 8 /local/domain/0/backend/vbd/6/2049 8448 0 0 4 8 306 /local/domain/0/backend/vbd/6/8448 ^^^<= not 7If the evtchn number is liberated, it is sure to become the same number. The evtchn number keeps increase if it repeats.
I will confirm whether to be liberated as follows and correctly.・xen-unstable.hg : cs 13192
Revert cset 13181:f087c013cf12 since the event channel is already unbound viablkif_free()->unbind_from_irqhandler()->unbind_from_irq()Thanks,
Signature · 7 lines
Takanori Kasai _______________________________________________ Xen-devel mailing list [email protected] http://lists.xensource.com/xen-devel
Hi
Quoted 6 lines
I am using the xen-3.0.3 on paravirtualVM
and I try to use xm block-attach dom6 /vm1/tp.img sda2 w It seems to be ok, no error ,
but in the dom6 there is no sda2
and xm block-detach dom6 2050,it does not work and xm block-list dom6 as follows ,
The block-attach command seems to have failed because your use is wrong.
# xm block-attach dom6 /vm1/tp.img sda2 w
^^^^^^^^^^^
When backend device is a file, it is necessary to specify file.
Moreover, when it is a physical device, it is necessary to specify phy.The example is as follows.
# xm block-attach dom6 file:/vm1/tp.img sda2 w # xm block-attach dom6 phy:/dev/sdb sda2 w
The block-detach command works correctly, if the block-attach command succeeds.
Best Regards,
--
Takanori Kasai
Thank you for reply
I try to do it under your guide as follows
# xm block-attach dom6 file:/vm1/template/tp.img sdb2 w [root@genode012 vmcserver]# xm block-list dom1 Vdev BE handle state evt-ch ring-ref BE-path 2049 0 0 4 7 8 /local/domain/0/backend/vbd/102/2049 2050 0 0 4 8 815 /local/domain/0/backend/vbd/102/2050
and xm block-detach can work
but xm console dom1, then there is not the new disk in dom1 what is wrong with it?
that is the log in /var/log/xen/xend.log as follows:
[2007-02-01 14:08:47 xend 6460] DEBUG (DevController:110) DevController:
writing {'backend-id': '0', 'virtual-device': '2050''
, 'device-type': 'disk', 'state': '1', 'backend':
'/local/domain/0/backend/vbd/102/2050'} to /local/domain/102/device/vbd/2055 0.
[2007-02-01 14:08:47 xend 6460] DEBUG (DevController:112) DevController:
writing {'domain': 'dom1', 'frontend': '/local/domaii n/102/device/vbd/2050', 'dev': 'sda2', 'state': '1', 'params':
'/vm1/template/tp1.img', 'mode': 'w', 'online': '1', 'frontendd -id': '102', 'type': 'file'} to /local/domain/0/backend/vbd/102/2050. [2007-02-01 14:08:47 xend 6460] DEBUG (DevController:149) Waiting for 2050. [2007-02-01 14:08:47 xend 6460] DEBUG (DevController:464) hotplugStatusCallback /local/domain/0/backend/vbd/102/2050/hotplug-- status.
[2007-02-01 14:08:47 xend 6460] DEBUG (DevController:464) hotplugStatusCallback /local/domain/0/backend/vbd/102/2050/hotplug-- status.
[2007-02-01 14:08:47 xend 6460] DEBUG (DevController:478) hotplugStatusCallback 1.
could you give me help
Thanks in advance
Quoted 34 lines · Kasai Takanori
Hi
Quoted 6 lines
I am using the xen-3.0.3 on paravirtualVM
and I try to use xm block-attach dom6 /vm1/tp.img sda2 w It seems to be ok, no error ,
but in the dom6 there is no sda2
and xm block-detach dom6 2050,it does not work and xm block-list dom6 as follows ,The block-attach command seems to have failed because your use is wrong.
# xm block-attach dom6 /vm1/tp.img sda2 w ^^^^^^^^^^^ When backend device is a file, it is necessary to specify file. Moreover, when it is a physical device, it is necessary to specify phy.The example is as follows.
# xm block-attach dom6 file:/vm1/tp.img sda2 w # xm block-attach dom6 phy:/dev/sdb sda2 wThe block-detach command works correctly, if the block-attach command succeeds.
Best Regards,
Signature · 7 lines
Takanori Kasai _______________________________________________ Xen-devel mailing list [email protected] http://lists.xensource.com/xen-devel
Hi
Quoted 10 lines
I try to do it under your guide as follows
# xm block-attach dom6 file:/vm1/template/tp.img sdb2 w [root@genode012 vmcserver]# xm block-list dom1 Vdev BE handle state evt-ch ring-ref BE-path 2049 0 0 4 7 8 /local/domain/0/backend/vbd/102/2049 2050 0 0 4 8 815 /local/domain/0/backend/vbd/102/2050and xm block-detach can work
but xm console dom1, then there is not the new disk in dom1 what is wrong with it?
Perhaps, it seems that xm block-attach/detach can work. Does the specified file have the partition? (/vm1/template/tp.img)
Please attach to sdb if there is a partition. dom0# xm block-attach dom6 file:/vm1/template/tp.img sdb w
It is recognized with dom1 as follows.(3 partitions) dom1# cat /proc/diskstats
8 16 sdb 78 353 927 632 8 1 18 4 0 360 636 8 17 sdb1 173 346 9 18 8 18 sdb2 185 185 0 0 8 19 sdb3 47 188 0 0 dom1# mount /dev/sdb3 /mnt dom1# ls /mnt bin dev home lost+found misc net proc sbin srv tmp var boot etc lib media mnt opt root selinux sys usr
However, if SCSI driver can work on dom1, it is not possible to attach to sdx.
It is because VBD overlaps with SCSI driver's majors number. In that case, please attach to xvda. dom0# xm block-attach dom6 file:/vm1/template/tp.img xvda w
Best Regards,
--
Takanori Kasai
Thank you for reply
I boot the VM with a img file and the conf file is as follows
kernel = "/boot/vmlinuz-2.6.16-xenU"
memory = 256
name = "dom3"
vcpus = 1
vif = [ '' ]
disk = [ 'file:/vm/dom3.img,sda1,w' ]
netmask = "255.255.0.0"
gateway = "192.168.150.1"
hostname = "office2"
ip = "192.168.104.5"
root = "/dev/sda1 ro"
extra = "4"
and if I want to attach another img file to the VM ,then
the VM boot img must have many partitions such as sda ,sda1, sda2 when the img file is made and
xm block-attach file:/vm1/template/another.img sda1 w
then in the VM ,mount the sda1,and access it
I am not for sure whether I understand your mean
or do you mean that the another img file with I want to attach to the VM needs have many partitions?
could you make me clear about it
Thank you in advance
Quoted 49 lines · Kasai Takanori
Hi
Quoted 10 lines
I try to do it under your guide as follows
# xm block-attach dom6 file:/vm1/template/tp.img sdb2 w [root@genode012 vmcserver]# xm block-list dom1 Vdev BE handle state evt-ch ring-ref BE-path 2049 0 0 4 7 8 /local/domain/0/backend/vbd/102/2049 2050 0 0 4 8 815 /local/domain/0/backend/vbd/102/2050and xm block-detach can work
but xm console dom1, then there is not the new disk in dom1 what is wrong with it?Perhaps, it seems that xm block-attach/detach can work. Does the specified file have the partition? (/vm1/template/tp.img)
Please attach to sdb if there is a partition. dom0# xm block-attach dom6 file:/vm1/template/tp.img sdb w
It is recognized with dom1 as follows.(3 partitions) dom1# cat
/proc/diskstats
8 16 sdb 78 353 927 632 8 1 18 4 0 360 636
8 17 sdb1 173 346 9 18
8 18 sdb2 185 185 0 0
8 19 sdb3 47 188 0 0
dom1# mount/dev/sdb3/mnt
dom1# ls /mnt
bin dev home lost+found misc net proc sbin srv tmp var boot etc lib media mnt opt root selinux sys usrHowever, if SCSI driver can work on dom1, it is not possible to attach to sdx.
It is because VBD overlaps with SCSI driver's majors number. In that case, please attach to xvda.
dom0# xm block-attach dom6 file:/vm1/template/tp.img xvda wBest Regards,
Signature · 8 lines
Takanori Kasai _______________________________________________ Xen-devel mailing list [email protected] http://lists.xensource.com/xen-devel
Hi,
Quoted 4 lines
I boot the VM with a img file and the conf file is as follows
...
disk = [ 'file:/vm/dom3.img,sda1,w' ]
Quoted 8 lines
and if I want to attach another img file to the VM ,then
the VM boot img must have many partitions such as sda ,sda1, sda2 when the img file is made and
xm block-attach file:/vm1/template/another.img sda1 w
then in the VM ,mount the sda1,and access it
I am not for sure whether I understand your mean
or do you mean that the another img file with I want to attach to the VM needs have many partitions?
The boot image when starting has already been allocated to sda1. (BackDev: file:/vm/dom3.img)
Therefore, it is not possible to attach to sda1 by block-attach command. Please do not overlap with FrontEnd device that has already been used.
It is recognized as follows if there is a partition in the attached file.
# xm block-attach file:/vm1/template/another.img sdb w
another.img file (BackDev) | GuestOS(FrontDev)
-------------------------------------------------------
3 partitions(1,2,3) | sdb, sdb1, sdb2, sdb3 1 partitions(1) | sdb, sdb1
※ 1 -> sdb1, 2 -> sdb2, 3->sdb3
It is possible to recognized as follows if there is no partition in attached file.
# xm block-attach file:/vm1/template/another.img sdb1 w
Best Regards,
--
Takanori Kasai
Thank you for your detail reply
Now I boot the VM with the conf file
...
disk = [ 'file:/vm/dom3.img,sda1,w' ]
...
and then commit the commands as follows
[root@genode012 vmcserver]# xm block-attach dom3 file:/vm1/template/tp1.img sda2 w [root@genode012 vmcserver]# xm block-list dom3
Vdev BE handle state evt-ch ring-ref BE-path
2049 0 0 4 6 8 /local/domain/0/backend/vbd/107/2049
2050 0 0 4 8 534 /local/domain/0/backend/vbd/107/2050
[root@genode012 vmcserver]# xm console dom3
[root@office2 ~]# cat /proc/diskstats
1 0 ram0 0 0 0 0 0 0 0 0 0 0 0
1 1 ram1 0 0 0 0 0 0 0 0 0 0 0
1 2 ram2 0 0 0 0 0 0 0 0 0 0 0
1 3 ram3 0 0 0 0 0 0 0 0 0 0 0
1 4 ram4 0 0 0 0 0 0 0 0 0 0 0
1 5 ram5 0 0 0 0 0 0 0 0 0 0 0
1 6 ram6 0 0 0 0 0 0 0 0 0 0 0
1 7 ram7 0 0 0 0 0 0 0 0 0 0 0
1 8 ram8 0 0 0 0 0 0 0 0 0 0 0
1 9 ram9 0 0 0 0 0 0 0 0 0 0 0
1 10 ram10 0 0 0 0 0 0 0 0 0 0 0
1 11 ram11 0 0 0 0 0 0 0 0 0 0 0
1 12 ram12 0 0 0 0 0 0 0 0 0 0 0
1 13 ram13 0 0 0 0 0 0 0 0 0 0 0
1 14 ram14 0 0 0 0 0 0 0 0 0 0 0
1 15 ram15 0 0 0 0 0 0 0 0 0 0 0
8 1 sda1 1837 184 60546 3330 1034 1155 17512 16510 0 2290 19840 9 0 md0 0 0 0 0 0 0 0 0 0 0 0
8 2 sda2 0 0 0 0 0 0 0 0 0 0 0
[root@office2 ~]# df -h
Filesystem 瀹归噺 宸茬敤 鍙敤 宸茬敤% 鎸傝浇鐐?/dev/sda1 5.8G 4.0G 1.5G 73% /
none 128M 0 128M 0% /dev/shm
[root@office2 ~]#
what do I do wrong? How should I make it ?
I am really confused with it
Quoted 46 lines · Kasai Takanori
Hi,
Quoted 4 lines
I boot the VM with a img file and the conf file is as follows
...
disk = [ 'file:/vm/dom3.img,sda1,w' ]Quoted 8 lines
and if I want to attach another img file to the VM ,then
the VM boot img must have many partitions such as sda ,sda1, sda2 when the img file is made and
xm block-attach file:/vm1/template/another.img sda1 w
then in the VM ,mount the sda1,and access it
I am not for sure whether I understand your mean
or do you mean that the another img file with I want to attach to the VM needs have many partitions?The boot image when starting has already been allocated to sda1. (BackDev: file:/vm/dom3.img)
Therefore, it is not possible to attach to sda1 by block-attach command. Please do not overlap with FrontEnd device that has already been used.It is recognized as follows if there is a partition in the attached file.
# xm block-attach file:/vm1/template/another.img sdb wanother.img file (BackDev) | GuestOS(FrontDev)
-------------------------------------------------------
3partitions(1,2,3)| sdb, sdb1, sdb2, sdb3
1 partitions(1) | sdb, sdb1
※ 1 -> sdb1, 2 -> sdb2, 3->sdb3It is possible to recognized as follows if there is no partition in attached file.
# xm block-attach file:/vm1/template/another.img sdb1 wBest Regards,
Signature · 8 lines
Takanori Kasai _______________________________________________ Xen-devel mailing list [email protected] http://lists.xensource.com/xen-devel
Hi,
Quoted 13 lines
Now I boot the VM with the conf file
...
disk = [ 'file:/vm/dom3.img,sda1,w' ]
...
and then commit the commands as follows[root@genode012 vmcserver]# xm block-attach dom3 file:/vm1/template/tp1.img sda2 w [root@genode012 vmcserver]# xm block-list dom3
Vdev BE handle state evt-ch ring-ref BE-path
2049 0 0 4 6 8 /local/domain/0/backend/vbd/107/2049
2050 0 0 4 8 534 /local/domain/0/backend/vbd/107/2050
[root@genode012 vmcserver]# xm console dom3
Quoted 4 lines
[root@office2 ~]# cat
/proc/diskstats
...8 2 sda2 0 0 0 0 0 0 0 0 0 0 0
The block-attach command seems to have succeeded.
It can be confirmed that sda2 is attached.
It can confirm the content if the mount is done.
# mount /dev/sda2 /mnt # ls /mnt
Quoted 6 lines
[root@office2 ~]# df -h
Filesystem/dev/sda15.8G 4.0G 1.5G 73% /
none 128M 0 128M 0%/dev/shmwhat do I do wrong? How should I make it ?
I am really confused with it
If the mount is done, it comes to see it.
If it is recognized when starting, the block-attach command should not be used. Then, it is necessary to define two disks by configuration file. When starting, automatic mount will be able to be done if it set to /etc/fstab as well as Native Linux.
Best Regards,
--
Takanori Kasai
Thank you for your patient and detail guide
It works as you said
there is something wrong with the img file which I want to attach to the VM Now it works well
Thanks again
Quoted 56 lines · Kasai Takanori
Hi,
Quoted 14 lines
Now I boot the VM with the conf file
...
disk = [ 'file:/vm/dom3.img,sda1,w' ]
...
and then commit the commands as follows[root@genode012 vmcserver]# xm block-attach dom3 file:/vm1/template/tp1.img sda2 w [root@genode012 vmcserver]# xm block-list dom3 Vdev BE handle state evt-ch ring-ref BE-path 2049 0 0 4 6 8 /local/domain/0/backend/vbd/107/2049 2050 0 0 4 8 534 /local/domain/0/backend/vbd/107/2050 [root@genode012 vmcserver]# xm console dom3
Quoted 4 lines
[root@office2 ~]# cat
/proc/diskstats
...8 2 sda2 0 0 0 0 0 0 0 0 0 0 0
The block-attach command seems to have succeeded.
It can be confirmed that sda2 is attached.It can confirm the content if the mount is done.
# mount /dev/sda2 /mnt # ls /mntQuoted 6 lines
[root@office2 ~]# df -h
Filesystem/dev/sda15.8G 4.0G 1.5G 73% / none 128M 0 128M 0%/dev/shmwhat do I do wrong? How should I make it ?
I am really confused with itIf the mount is done, it comes to see it.
If it is recognized when starting, the block-attach command should not be used.
Then, it is necessary to define two disks by configuration file. When starting, automatic mount will be able to be done if it set to/etc/fstab
as well as Native Linux.Best Regards,
Signature · 7 lines
Takanori Kasai _______________________________________________ Xen-devel mailing list [email protected] http://lists.xensource.com/xen-devel
hi
I try to understand the code relative to blk-attach
it seems like that device_creat()->createdevice()->addStoreEntries() ,add store entry into xenstore
then backend and frontend will watch and do several related work to real add-device in backend and frontend ,is it right? and xenstore have watches to check the related entry ,is it right?
I am confused ,which code or function to the real adding work I guess there is somekind watches which do it ,but I cannot find that fucntions
I am confused about it
could you help me
Thanks in advance
Quoted 56 lines · Kasai Takanori
Hi,
Quoted 14 lines
Now I boot the VM with the conf file
...
disk = [ 'file:/vm/dom3.img,sda1,w' ]
...
and then commit the commands as follows[root@genode012 vmcserver]# xm block-attach dom3 file:/vm1/template/tp1.img sda2 w [root@genode012 vmcserver]# xm block-list dom3 Vdev BE handle state evt-ch ring-ref BE-path 2049 0 0 4 6 8 /local/domain/0/backend/vbd/107/2049 2050 0 0 4 8 534 /local/domain/0/backend/vbd/107/2050 [root@genode012 vmcserver]# xm console dom3
Quoted 4 lines
[root@office2 ~]# cat
/proc/diskstats
...8 2 sda2 0 0 0 0 0 0 0 0 0 0 0
The block-attach command seems to have succeeded.
It can be confirmed that sda2 is attached.It can confirm the content if the mount is done.
# mount /dev/sda2 /mnt # ls /mntQuoted 6 lines
[root@office2 ~]# df -h
Filesystem/dev/sda15.8G 4.0G 1.5G 73% / none 128M 0 128M 0%/dev/shmwhat do I do wrong? How should I make it ?
I am really confused with itIf the mount is done, it comes to see it.
If it is recognized when starting, the block-attach command should not be used.
Then, it is necessary to define two disks by configuration file. When starting, automatic mount will be able to be done if it set to/etc/fstab
as well as Native Linux.Best Regards,
Signature · 7 lines
Takanori Kasai _______________________________________________ Xen-devel mailing list [email protected] http://lists.xensource.com/xen-devel