Andrzej Szeszo
2008-Jul-07 08:28 UTC
snv_91 dom0 and problems with the file:/ based storage in domUs
Hi all, Quick one - is it a known problem on snv_91 that file:/ based disk devices don''t work? Is there any other workaround than running ''lofiadm -a'' on the disk files and using phy:/dev/lofi/* in the domU config files? Regards, Andrzej This message posted from opensolaris.org
Max Zhen
2008-Jul-07 08:58 UTC
Re: snv_91 dom0 and problems with the file:/ based storage in domUs
It should work. What kind of problem did you see? Max Andrzej Szeszo wrote:> Hi all, > > Quick one - is it a known problem on snv_91 that file:/ based disk devices don''t work? Is there any other workaround than running ''lofiadm -a'' on the disk files and using phy:/dev/lofi/* in the domU config files? > > Regards, > > Andrzej > > > This message posted from opensolaris.org > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org >
Andrzej Szeszo
2008-Jul-07 09:58 UTC
Re: snv_91 dom0 and problems with the file:/ based storage in domUs
Yeah, it should work. It was working fine on snv_86 dom0. This works: # lofiadm Block Device File Options /dev/lofi/1 /export/disk.img - # cat /export/home/aszeszo/os name = "opensolaris" vcpus = 1 memory = "512" #disk = [''file:/export/disk.img,0,w''] disk = [''phy:/dev/lofi/1,0,w''] vif = [''''] It doesn''t work with the below: # lofiadm Block Device File Options # cat /export/home/aszeszo/os name = "opensolaris" vcpus = 1 memory = "512" disk = [''file:/export/disk.img,0,w''] #disk = [''phy:/dev/lofi/1,0,w''] vif = [''''] I am seeing this message in the logs: May 7 10:56:24 v-aszeszo xdb: [ID 269379 kern.warning] WARNING: xdb@6,0: Failed to create lofi dev for /export/disk.img I am seeing the same behaviour with other disk/iso images as well. Regards, Andrzej This message posted from opensolaris.org
Max Zhen
2008-Jul-07 10:55 UTC
Re: snv_91 dom0 and problems with the file:/ based storage in domUs
Andrzej Szeszo wrote:> Yeah, it should work. It was working fine on snv_86 dom0. > > This works: > # lofiadm > Block Device File Options > /dev/lofi/1 /export/disk.img - > # cat /export/home/aszeszo/os > name = "opensolaris" > vcpus = 1 > memory = "512" > #disk = [''file:/export/disk.img,0,w''] > disk = [''phy:/dev/lofi/1,0,w''] > vif = [''''] > > It doesn''t work with the below: > # lofiadm > Block Device File Options > # cat /export/home/aszeszo/os > name = "opensolaris" > vcpus = 1 > memory = "512" > disk = [''file:/export/disk.img,0,w''] > #disk = [''phy:/dev/lofi/1,0,w''] > vif = [''''] > > I am seeing this message in the logs: > May 7 10:56:24 v-aszeszo xdb: [ID 269379 kern.warning] WARNING: xdb@6,0: Failed to create lofi dev for /export/disk.img >Hmm...xdb will call lofi_ioctl() to create the lofi device. So, lofi_ioctl() could be failing... Could you run below dtrace command to find out what is the return value of lofi_ioctl(): #dtrace -n fbt:lofi:lofi_ioctl:return''{trace(arg1)}'' You need to first run above command, then start your domain. Thanks, Max> I am seeing the same behaviour with other disk/iso images as well. > > Regards, > > Andrzej > > > This message posted from opensolaris.org > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org >
Andrzej Szeszo
2008-Jul-07 11:59 UTC
Re: snv_91 dom0 and problems with the file:/ based storage in domUs
This is what see after starting the domU: [root@xvm0 ~]# dtrace -n fbt:lofi:lofi_ioctl:return''{trace(arg1)}'' dtrace: description ''fbt:lofi:lofi_ioctl:return'' matched 1 probe CPU ID FUNCTION:NAME 0 49267 lofi_ioctl:return 22 Thanks, Andrzej This message posted from opensolaris.org
Max Zhen
2008-Jul-07 13:55 UTC
Re: snv_91 dom0 and problems with the file:/ based storage in domUs
Andrzej Szeszo wrote:> This is what see after starting the domU: > > [root@xvm0 ~]# dtrace -n fbt:lofi:lofi_ioctl:return''{trace(arg1)}'' > dtrace: description ''fbt:lofi:lofi_ioctl:return'' matched 1 probe > CPU ID FUNCTION:NAME > 0 49267 lofi_ioctl:return 22 >OK, lofi_ioctl did fail with EINVAL(22). Then, let''s probe a little bit more. Please run below dtrace script and send out the output: ------------------------------- #! /usr/sbin/dtrace -Fs fbt:lofi:lofi_ioctl:entry { self->mark = 1; } fbt:lofi:lofi_ioctl:return { self->mark = 0; exit(0); } fbt:lofi::entry / self->mark == 1 / { } fbt:lofi::return / self->mark == 1 / { trace(arg1); } ------------------------------- Again, you need to start this script first, then try to create your domU. Thanks, Max> > Thanks, > > Andrzej > > > This message posted from opensolaris.org > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org >
Andrzej Szeszo
2008-Jul-07 14:17 UTC
Re: snv_91 dom0 and problems with the file:/ based storage in domUs
Here is the output: -bash-3.2# ./aa.d dtrace: script ''./aa.d'' matched 100 probes CPU FUNCTION 0 -> lofi_ioctl 0 -> lofi_map_file 0 -> copy_in_lofi_ioctl 0 <- copy_in_lofi_ioctl 3698379008 0 -> valid_filename 0 <- valid_filename 0 0 -> free_lofi_ioctl 0 <- free_lofi_ioctl 94347 0 <- lofi_map_file 22 0 <- lofi_ioctl The file I''m trying to use as a disk image is stored on the local ZFS filesystem at /export/disk.img. Regards, Andrzej This message posted from opensolaris.org
John Levon
2008-Jul-07 15:16 UTC
Re: snv_91 dom0 and problems with the file:/ based storage in domUs
On Mon, Jul 07, 2008 at 07:17:26AM -0700, Andrzej Szeszo wrote:> -bash-3.2# ./aa.d > dtrace: script ''./aa.d'' matched 100 probes > CPU FUNCTION > 0 -> lofi_ioctl > 0 -> lofi_map_file > 0 -> copy_in_lofi_ioctl > 0 <- copy_in_lofi_ioctl 3698379008 > 0 -> valid_filename > 0 <- valid_filename 0 > 0 -> free_lofi_ioctl > 0 <- free_lofi_ioctl 94347 > 0 <- lofi_map_file 22 > 0 <- lofi_ioctl > > The file I''m trying to use as a disk image is stored on the local ZFS filesystem at /export/disk.img.My crystal ball tells me you''re using OpenSolaris. It''s shipping a version of the lofi driver that isn''t updated correctly (I thought that was an internal problem only, but apparently not). If you download SXCE and replace /kernel/drv/[amd64/]/lofi from that media, it should work Can you file a bug on defect.opensolaris.org? regards john
Andrzej Szeszo
2008-Jul-07 16:14 UTC
Re: snv_91 dom0 and problems with the file:/ based storage in domUs
Hi John, Your crystal ball is right. I''m using OpenSolaris. I always though that the bits in SXCE and OpenSolaris were the same and the difference was only in the packaging. file:/ backed disks work just fine with the lofi driver from SXCE. I''ll file a bug soon. Thanks a lot! Andrzej This message posted from opensolaris.org
John Levon
2008-Jul-07 16:30 UTC
Re: snv_91 dom0 and problems with the file:/ based storage in domUs
On Mon, Jul 07, 2008 at 09:14:18AM -0700, Andrzej Szeszo wrote:> Your crystal ball is right. I''m using OpenSolaris. I always though > that the bits in SXCE and OpenSolaris were the same and the difference > was only in the packaging.This is in fact mostly the case. However, OpenSolaris has some customisations. lofi was one of the original ones so they could do compressed lofi. That''s in Nevada now, so it''s not really necessary for them to use their own version, so I think it''s an oversight. regards, john
Greg
2008-Jul-14 02:49 UTC
Re: snv_91 dom0 and problems with the file:/ based storage in domUs
I had the same issue. To anyone else facing this and not having a running SXCE install close by, download the first CD of SXCE snv_93 and loopback mount the iso. Then you can copy the lofi driver from <iso mnt>/Product/SUNWckr/reloc/kernel/drv/amd64/lofi. HTH, Greg. This message posted from opensolaris.org