Patrick Petit
2006-Sep-21 09:56 UTC
VBD hotplug script not working related to lofiadm misbehavior
Hi, I noticed a relationship between xm create failing to create a domU because of VBD hotplug not working and lofiadm misbehavior. The truss sequence is like this: dom0# truss lofiadm -a /export/xc/xvm/solaris-b44/root.file [....] open64("/export/xc/xvm/solaris-b44/root.file", O_RDONLY) = 3 fstat64(3, 0x08047B60) = 0 close(3) = 0 open("/dev/lofictl", O_RDWR|O_EXCL) = 3 ioctl(3, ((''L''<<16)|(''F''<<8)|1), 0x08047738) = 4 stat64("/dev/lofi/1", 0x08047680) Err#2 ENOENT nanosleep(0x08046E40, 0x08046E48) (sleeping...) nanosleep(0x08046E40, 0x08046E48) = 0 [....] stat64("/dev/lofi/1", 0x08047680) Err#2 ENOENT nanosleep(0x08046E40, 0x08046E48) (sleeping...) [....] Loops in stat64 / sleep until retries count is reached. Indeed, during the loop and from another window dom0# ls /dev/lofi Block Device File # Shows no /dev/lofi/1 symlink is created, but the devices are... dom0# ls -l /devices/pseudo/lofi* brw------- 1 root sys 144, 1 Sep 21 10:34 /devices/pseudo/lofi@0:1 crw------- 1 root sys 144, 1 Sep 21 09:56 /devices/pseudo/lofi@0:1,raw For some reason lofiadm fails to create the symlinks /dev/[r]lofi/1 to /devices/pseudo/lofi@0:1 and, /devices/pseudo/lofi@0:1,raw. Creating them manually would break the loop and make lofiadm -a exit normally... Letting the process exit after retries count is reached, ends up into an inconsistency where pseudo devices are created but not the corresponding /dev/[r]lofi symlinks. Looks like a bug. Has this been detected already? It happens on SunOS matrix-build-2006-07-14 i86xen i386 i86xen - Patrick
Max Zhen
2006-Sep-21 10:23 UTC
Re: VBD hotplug script not working related to lofiadm misbehavior
Patrick Petit wrote:> Hi, > > I noticed a relationship between xm create failing to create a domU > because of VBD hotplug not working and lofiadm misbehavior. > > The truss sequence is like this: > > dom0# truss lofiadm -a /export/xc/xvm/solaris-b44/root.file > [....] > open64("/export/xc/xvm/solaris-b44/root.file", O_RDONLY) = 3 > fstat64(3, 0x08047B60) = 0 > close(3) = 0 > open("/dev/lofictl", O_RDWR|O_EXCL) = 3 > ioctl(3, ((''L''<<16)|(''F''<<8)|1), 0x08047738) = 4 > stat64("/dev/lofi/1", 0x08047680) Err#2 ENOENT > nanosleep(0x08046E40, 0x08046E48) (sleeping...) > nanosleep(0x08046E40, 0x08046E48) = 0 > [....] > stat64("/dev/lofi/1", 0x08047680) Err#2 ENOENT > nanosleep(0x08046E40, 0x08046E48) (sleeping...) > [....] > > > Loops in stat64 / sleep until retries count is reached. > > Indeed, during the loop and from another window > > dom0# ls /dev/lofi > Block Device File > # > > Shows no /dev/lofi/1 symlink is created, but the devices are... > > dom0# ls -l /devices/pseudo/lofi* > brw------- 1 root sys 144, 1 Sep 21 10:34 /devices/pseudo/lofi@0:1 > crw------- 1 root sys 144, 1 Sep 21 09:56 /devices/pseudo/lofi@0:1,raw > > > For some reason lofiadm fails to create the symlinks /dev/[r]lofi/1 to > /devices/pseudo/lofi@0:1 and, > /devices/pseudo/lofi@0:1,raw. Creating them manually would break the > loop and make lofiadm -a exit normally... Letting the process exit > after retries count is reached, ends up into an inconsistency where > pseudo devices are created but not the corresponding /dev/[r]lofi > symlinks. > > Looks like a bug. Has this been detected already?No, at least I haven''t seen this before. The `lofiadm` works fine on my test machine all the time. It just takes the file and creates the correct minor nodes and symbol links for me. I don''t understand why lofiadm fails to create the symbol links for you... Is the devfsadmd still working properly on your machine? Maybe you want to see if devfsadmd is dead, or not... Max> > It happens on SunOS matrix-build-2006-07-14 i86xen i386 i86xen > > - Patrick > ------------------------------------------------------------------------ > > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org >
Patrick Petit
2006-Sep-21 11:23 UTC
Re: VBD hotplug script not working related to lofiadm misbehavior
Max Zhen wrote On 09/21/06 12:23 PM,:> > > Patrick Petit wrote: > >> Hi, >> >> I noticed a relationship between xm create failing to create a domU >> because of VBD hotplug not working and lofiadm misbehavior. >> >> The truss sequence is like this: >> >> dom0# truss lofiadm -a /export/xc/xvm/solaris-b44/root.file >> [....] >> open64("/export/xc/xvm/solaris-b44/root.file", O_RDONLY) = 3 >> fstat64(3, 0x08047B60) = 0 >> close(3) = 0 >> open("/dev/lofictl", O_RDWR|O_EXCL) = 3 >> ioctl(3, ((''L''<<16)|(''F''<<8)|1), 0x08047738) = 4 >> stat64("/dev/lofi/1", 0x08047680) Err#2 ENOENT >> nanosleep(0x08046E40, 0x08046E48) (sleeping...) >> nanosleep(0x08046E40, 0x08046E48) = 0 >> [....] >> stat64("/dev/lofi/1", 0x08047680) Err#2 ENOENT >> nanosleep(0x08046E40, 0x08046E48) (sleeping...) >> [....] >> >> Loops in stat64 / sleep until retries count is reached. >> >> Indeed, during the loop and from another window >> >> dom0# ls /dev/lofi >> Block Device File >> # >> >> Shows no /dev/lofi/1 symlink is created, but the devices are... >> >> dom0# ls -l /devices/pseudo/lofi* >> brw------- 1 root sys 144, 1 Sep 21 10:34 >> /devices/pseudo/lofi@0:1 >> crw------- 1 root sys 144, 1 Sep 21 09:56 >> /devices/pseudo/lofi@0:1,raw >> >> >> For some reason lofiadm fails to create the symlinks /dev/[r]lofi/1 >> to /devices/pseudo/lofi@0:1 and, >> /devices/pseudo/lofi@0:1,raw. Creating them manually would break the >> loop and make lofiadm -a exit normally... Letting the process exit >> after retries count is reached, ends up into an inconsistency where >> pseudo devices are created but not the corresponding /dev/[r]lofi >> symlinks. >> >> Looks like a bug. Has this been detected already? > > No, at least I haven''t seen this before. The `lofiadm` works fine on > my test machine all the time. It just takes the file and creates the > correct minor nodes and symbol links for me. > > I don''t understand why lofiadm fails to create the symbol links for > you... > Is the devfsadmd still working properly on your machine? Maybe you > want to see if devfsadmd is dead, or not...Ok. next it happens I''ll check. Patrick> > Max > >> >> It happens on SunOS matrix-build-2006-07-14 i86xen i386 i86xen >> >> - Patrick >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> xen-discuss mailing list >> xen-discuss@opensolaris.org >> >-- Patrick Petit Sun Microsystems Inc. Labs, CTO - G2 Systems Exp. ICNC Grenoble (http://icncweb.france) Phone: (+33)476 188 232 x38232 180, Avenue de l''Europe Fax: (+33)476 188 282 38334 Saint-Ismier Cedex, France