Hi. My SWAP on all domUs is not working. On dom0 I have logical volume (LVM) created and formated for swap. I can enable this volume under dom0 as a swap (tested). On domUs I am unable to enable it. I have swap support compiled in kernel. My fstab is properly configured. Can someone advice? Jiri _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, 2007-02-26 at 00:20 +1100, kanour-xen wrote:> Hi. > My SWAP on all domUs is not working. > > On dom0 I have logical volume (LVM) created and formated for swap. I can > enable this volume under dom0 as a swap (tested). > On domUs I am unable to enable it. I have swap support compiled in kernel. > My fstab is properly configured. > > Can someone advice? > > Jiri >what does swapon (swap device) in the dom-u tell you? Anything out to stderr or syslog? Or is it just politely ignoring the device? Is the swap FS itself present in the guest in /dev, and does mkswap have any problems preparing it? Best, --Tim> _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tim Post wrote:> On Mon, 2007-02-26 at 00:20 +1100, kanour-xen wrote: >> Hi. >> My SWAP on all domUs is not working. >> >> On dom0 I have logical volume (LVM) created and formated for swap. I >> can enable this volume under dom0 as a swap (tested). >> On domUs I am unable to enable it. I have swap support compiled in >> kernel. My fstab is properly configured. >> >> Can someone advice? >> >> Jiri >> > > what does swapon (swap device) in the dom-u tell you? Anything out to > stderr or syslog? Or is it just politely ignoring the device? > > Is the swap FS itself present in the guest in /dev, and does mkswap > have any problems preparing it?Why are you bothering with LVM in a DomU? Seriously? Since you can do the LVM handling in Dom0, and simply use primary partitions for DomU? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 2/25/07, kanour-xen <xen@kanour.com> wrote:> Hi. > My SWAP on all domUs is not working. > > On dom0 I have logical volume (LVM) created and formated for swap. I can > enable this volume under dom0 as a swap (tested). > On domUs I am unable to enable it. I have swap support compiled in kernel. > My fstab is properly configured. > > Can someone advice? > > Jiri > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >Hi Jiri, I had a similar problem, but was using a primary swap partition for swap. What worked for me was to use an interactive "xm block-attach . . ." command - the arguments were similar to those used in the "disk" command (for the swap) in the configuration file. The swap file worked on the next domU boot and has worked every time since. I haven''t yet discovered where this configuration is stored. Regards, Stephen. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sun, 25 Feb 2007, Stephen Morris wrote:> On 2/25/07, kanour-xen <xen@kanour.com> wrote: >> Hi. >> My SWAP on all domUs is not working. >> >> On dom0 I have logical volume (LVM) created and formated for swap. I can >> enable this volume under dom0 as a swap (tested). >> On domUs I am unable to enable it. I have swap support compiled in kernel. >> My fstab is properly configured. >> >> Can someone advice? >> >> Jiri >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users >> > > Hi Jiri, > > I had a similar problem, but was using a primary swap partition for > swap. What worked for me was to use an interactive "xm block-attach . > . ." command - the > arguments were similar to those used in the "disk" command (for the > swap) in the configuration file. The swap file worked on the next domU > boot and has worked every time since. I haven''t yet discovered where > this configuration is stored.Xen seems (i''m NOT a developer) to have a storage system/daemon for config info like this... there should be a xenstored process in dom0 which handles it. You can query it via the xenstore* commands. And of block-attach is helping, then block-list may provide usefull info too. xm block-list DOMID ... but I''m not sure if it gets its info from xenstore or parts of it come from the hypervisor. -Tom _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sun, 25 Feb 2007 16:09:14 -0800 (PST), Tom Brown <tbrown@baremetal.com> wrote:> On Sun, 25 Feb 2007, Stephen Morris wrote: > >> On 2/25/07, kanour-xen <xen@kanour.com> wrote: >>> Hi. >>> My SWAP on all domUs is not working. >>> >>> On dom0 I have logical volume (LVM) created and formated for swap. I > can >>> enable this volume under dom0 as a swap (tested). >>> On domUs I am unable to enable it. I have swap support compiled in > kernel. >>> My fstab is properly configured. >>> >>> Can someone advice? >>> >>> Jiri >>> >>> _______________________________________________ >>> Xen-users mailing list >>> Xen-users@lists.xensource.com >>> http://lists.xensource.com/xen-users >>> >> >> Hi Jiri, >> >> I had a similar problem, but was using a primary swap partition for >> swap. What worked for me was to use an interactive "xm block-attach . >> . ." command - the >> arguments were similar to those used in the "disk" command (for the >> swap) in the configuration file. The swap file worked on the next domU >> boot and has worked every time since. I haven''t yet discovered where >> this configuration is stored. > > Xen seems (i''m NOT a developer) to have a storage system/daemon for config > info like this... there should be a xenstored process in dom0 which > handles it. You can query it via the xenstore* commands. And of > block-attach is helping, then block-list may provide usefull info too. > > xm block-list DOMID > > ... but I''m not sure if it gets its info from xenstore or parts of it come > from the hypervisor. > > -Tom > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-usersHi Guys. Still nothing. I have tried everything. But I found out that /dev/hda1 or /dev/hda2 don''t exist in domU. Any advice? Just make things clear: - dom0 amd64 debian etch - domU amd64 debian etch - domU disk config: disk=[''phy:/dev/vm_vg/monit1_root,hda1,w'', ''phy:/dev/vm_vg/monit1_swap,hda2,w''] - !!!! domU does not have /dev/hda1 /dev/hda2 in /dev directory Some other commands on domU (monit1): /etc/fstab /dev/sda1 / ext3 defaults 1 2 /dev/sda2 none swap sw 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 monit1:~# cat /proc/partitions major minor #blocks name 3 2 512000 hda2 3 1 2097152 hda1 monit1:~# mkswap /dev/hda2 /dev/hda2: No such file or directory Any advice? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> - domU disk config: > disk=[''phy:/dev/vm_vg/monit1_root,hda1,w'', > ''phy:/dev/vm_vg/monit1_swap,hda2,w'']you''ve exported hda1 and hda2> - !!!! domU does not have /dev/hda1 /dev/hda2 in /dev directory> Some other commands on domU (monit1): > /etc/fstab > /dev/sda1 / ext3 defaults 1 2 > /dev/sda2 none swap sw 0 0... and told it to look for sda1 and sda2 (sda does not match hda) pick one, I don''t think it matters which. try swapon /dev/hda2 and see if _that_ works :) then again it may fail due to the missing /dev/hda2 file. -Tom _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tom Brown wrote:>> - domU disk config: >> disk=[''phy:/dev/vm_vg/monit1_root,hda1,w'', >> ''phy:/dev/vm_vg/monit1_swap,hda2,w''] > > you''ve exported hda1 and hda2 > >> - !!!! domU does not have /dev/hda1 /dev/hda2 in /dev directory > > >> Some other commands on domU (monit1): >> /etc/fstab >> /dev/sda1 / ext3 defaults 1 2 >> /dev/sda2 none swap sw 0 0 > > ... and told it to look for sda1 and sda2 > > (sda does not match hda) > > pick one, I don''t think it matters which. > > try swapon /dev/hda2 and see if _that_ works :) > > then again it may fail due to the missing /dev/hda2 file. > > -Tom > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >Sorry, That was just typo. I have both /dev/hda. I was trying hda and even sda. Both do not work. It is strength that domUs do not have it in /dev. Thanks for another advice. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tom Brown wrote:> On Mon, 26 Feb 2007, kanour-xen wrote: > >> Tom Brown wrote: >>> > - domU disk config: >>> > disk=[''phy:/dev/vm_vg/monit1_root,hda1,w'', >>> > ''phy:/dev/vm_vg/monit1_swap,hda2,w''] >>> >>> you''ve exported hda1 and hda2 >>> >>> > - !!!! domU does not have /dev/hda1 /dev/hda2 in /dev directory >>> >>> >>> > Some other commands on domU (monit1): >>> > /etc/fstab >>> > /dev/sda1 / ext3 defaults 1 2 >>> > /dev/sda2 none swap sw 0 0 >>> >>> ... and told it to look for sda1 and sda2 >>> >>> (sda does not match hda) >>> >>> pick one, I don''t think it matters which. >>> >>> try swapon /dev/hda2 and see if _that_ works :) >>> >>> then again it may fail due to the missing /dev/hda2 file. >>> >>> -Tom >>> >> Sorry, That was just typo. I have both /dev/hda. >> >> I was trying hda and even sda. Both do not work. It is strength that >> domUs do not have it in /dev. >> >> Thanks for another advice. > > ok, what do you see in /sys/block in the domU? > > e.g. > > [root@pd3 ~]# ls /sys/block/ > loop0/ loop3/ loop6/ ram1/ ram12/ ram15/ ram4/ ram7/ sda1/ > loop1/ loop4/ loop7/ ram10/ ram13/ ram2/ ram5/ ram8/ sdb1/ > loop2/ loop5/ ram0/ ram11/ ram14/ ram3/ ram6/ ram9/ sdc1/ > > and in dom0 I have > > [root@xen5 ~]# xm list | grep pallad > palladium 8 2048 2 ------ 5410190.9 > > [root@xen5 ~]# xm block-list 8 > (2049 ((virtual-device 2049) (backend-id 0) (state 4) (backend > /local/domain/0/backend/vbd/8/2049) (ring-ref 8) (event-channel 9))) > (2065 ((virtual-device 2065) (backend-id 0) (state 4) (backend > /local/domain/0/backend/vbd/8/2065) (ring-ref 9) (event-channel 10))) > (2081 ((virtual-device 2081) (backend-id 0) (state 4) (backend > /local/domain/0/backend/vbd/8/2081) (ring-ref 10) (event-channel 11))) > > it may look a _lot_ different on your box, this is a xen 3.0.0 box :( > and it''s different on my 3.0.3 boxes > > but the /sys/block output should show whether or not your domU has the > extra device, and the block-list should show whether or not your dom0 > is trying to export the extra device. > > -Tom > >Hi Tom. Here is what you wanted. domU monit1:~# ll /sys/block/ total 0 drwxr-xr-x 21 root root 0 2007-02-26 06:55 . drwxr-xr-x 11 root root 0 2007-02-26 06:55 .. drwxr-xr-x 3 root root 0 2007-02-26 06:55 hda1 drwxr-xr-x 3 root root 0 2007-02-26 06:55 hda2 drwxr-xr-x 3 root root 0 2007-02-26 06:55 md0 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram0 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram1 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram10 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram11 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram12 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram13 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram14 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram15 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram2 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram3 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram4 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram5 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram6 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram7 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram8 drwxr-xr-x 2 root root 0 2007-02-26 06:55 ram9 dom0 dom0:~# xm list | grep monit1 monit1 18 256 1 -b---- 4.4 dom0:~# xm block-list monit1 Vdev BE handle state evt-ch ring-ref BE-path 769 0 0 4 6 8 /local/domain/0/backend/vbd/18/769 770 0 0 4 7 9 /local/domain/0/backend/vbd/18/770 What do you think? Is there anything else what I can check? I installed xen 3.0.4_1 I have no udev installed on both dom0 and domU (on my running 2nd machine xen 3.0.1 on i386 I have not udev neither). Jiri _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Hi Tom. Here is what you wanted. > domU > monit1:~# ll /sys/block/ > total 0 > drwxr-xr-x 21 root root 0 2007-02-26 06:55 . > drwxr-xr-x 11 root root 0 2007-02-26 06:55 .. > drwxr-xr-x 3 root root 0 2007-02-26 06:55 hda1 > drwxr-xr-x 3 root root 0 2007-02-26 06:55 hda2<snip> ok, you have the devices (both hda1 and hda2), which means this basically has nothing to do with xen.> What do you think? Is there anything else what I can check? > I installed xen 3.0.4_1 > I have no udev installed on both dom0 and domU (on my running 2nd machine xenIf you don''t use udev to create device files on the fly, and you don''t have the device file, then you are responsible for creating it... (you need to make the device node for /dev/hda2) cd /dev/ MAKEDEV hda2 that should take care of it. if it chokes, try MAKEDEV hda ... which should create a file for hda and something like 16 partitions hopefully that is the source of your problem and the fix. Alternatively mknod /dev/hda2 b 3 2 should also do the trick, but MAKEDEV is a better generic solution. -Tom _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users