nfs mounted /tmp vs disk mounted /tmp

Mike Tancsa mike at sentex.net
Tue Mar 3 21:54:22 UTC 2015


While trying to test in the lab a migration of disks from an old pci-x 
arcmrs array to a pcie card, I ran into an odd problem with the cli and 
raid management daemon.  I would start up the programs and they would 
immediately exit

Looking at the truss output, it seemed to bork soon after it tried to 
create a file in /tmp. Testing all the same hardware, but then booting 
from a disk, it worked.  Back to netboot, but this time with /tmp 
mounted via tmpfs, it also worked.  So it seems there is something about 
having tmp mounted via nfs that causes the program to die.  The issue 
seems to be the setting of locks. I am curious, is this something that 
can be worked around in nfs, or due to the nature of nfs, this is not 
possible ?  I think I saw this same issue with virtual box in a netboot 
environment 
(https://lists.freebsd.org/pipermail/freebsd-emulation/2014-July/011693.html)

....  nfs mounted /tmp
mknod("/dev/arcmsr0",020666,-6368)               = 0 (0x0)
open("/dev/arcmsr0",O_RDWR,00)                   = 3 (0x3)
ioctl(3,0xc4244e06 { IORW 0x4e('N'), 6, 1060 },0xffffe3e0) = 0 (0x0)
open("/tmp/arcmsr0",O_RDWR|O_CREAT,00)           = 4 (0x4)
getpid()                                         = 795 (0x31b)
fcntl(4,F_SETLKW,0x7ffffffcde10)                 ERR#45 'Operation not 
supported'

vs

tmpfs mounted /tmp

mknod("/dev/arcmsr0",020666,-6368)               = 0 (0x0)
open("/dev/arcmsr0",O_RDWR,00)                   = 3 (0x3)
ioctl(3,0xc4244e06 { IORW 0x4e('N'), 6, 1060 },0xffffe3e0) = 0 (0x0)
open("/tmp/arcmsr0",O_RDWR|O_CREAT,00)           = 4 (0x4)
getpid()                                         = 853 (0x355)
fcntl(4,F_SETLKW,0x7ffffffcde10)                 = 0 (0x0)

	---Mike


-- 
-------------------
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, mike at sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/
-------------- next part --------------
 
With /tmp mounted via nfs

truss ./areca-cli 
__sysctl(0x7fffffffe610,0x2,0x6516c8,0x7fffffffe608,0x0,0x0) = 0 (0x0)
readlink("/etc/malloc.conf",0x7fffffffe630,1024) ERR#2 'No such file or directory'
issetugid(0x50badf,0x7fffffffe630,0xffffffffffffffff,0x0,0x0,0x0) = 0 (0x0)
break(0x700000)                                  = 0 (0x0)
__sysctl(0x7fffffffe8f0,0x2,0x7fffffffe90c,0x7fffffffe900,0x0,0x0) = 0 (0x0)
mmap(0x0,1048576,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366095360 (0x800610000)
mmap(0x800710000,983040,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34367143936 (0x800710000)
munmap(0x800610000,983040)                       = 0 (0x0)
sysarch(0x81,0x7fffffffeaf0,0x0,0x0,0x10,0x800700068) = 0 (0x0)
getpid()                                         = 795 (0x31b)
__sysctl(0x7fffffffea70,0x2,0x65de10,0x7fffffffea78,0x0,0x0) = 0 (0x0)
__sysctl(0x7fffffffea00,0x2,0x7fffffffe990,0x7fffffffe9f8,0x50b398,0xd) = 0 (0x0)
__sysctl(0x7fffffffe990,0x3,0x64f1a8,0x7fffffffea78,0x0,0x0) = 0 (0x0)
__sysctl(0x7fffffffea30,0x2,0x65b358,0x7fffffffea28,0x0,0x0) = 0 (0x0)
thr_self(0x8007041c0,0x0,0x0,0x0,0x188,0x800700080) = 0 (0x0)
mmap(0x7fffffbfe000,4096,PROT_NONE,MAP_ANON,-1,0x0) = 140737484152832 (0x7fffffbfe000)
thr_set_name(0x18711,0x50b3e0,0x400000,0x1000,0xffffffff,0x0) = 0 (0x0)
rtprio_thread(0x0,0x18711,0x7fffffffea20,0x1000,0xffffffff,0x0) = 0 (0x0)
sysarch(0x81,0x7fffffffea40,0x7fffffffea80,0x208,0xffffffff,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigaction(32,{ 0x4b51f0 SA_RESTART|SA_SIGINFO ss_t },0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)                 = 0 (0x0)
__sysctl(0x7fffffffeac0,0x2,0x6518e0,0x7fffffffeab8,0x0,0x0) = 0 (0x0)
unlink("/dev/arcmsr0")                           = 0 (0x0)
unlink("/dev/arcmsr1")                           ERR#2 'No such file or directory'
unlink("/dev/arcmsr2")                           ERR#2 'No such file or directory'
unlink("/dev/arcmsr3")                           ERR#2 'No such file or directory'
mknod("/dev/arcmsr0",020666,-6368)               = 0 (0x0)
open("/dev/arcmsr0",O_RDWR,00)                   = 3 (0x3)
ioctl(3,0xc4244e06 { IORW 0x4e('N'), 6, 1060 },0xffffe3e0) = 0 (0x0)
open("/tmp/arcmsr0",O_RDWR|O_CREAT,00)           = 4 (0x4)
getpid()                                         = 795 (0x31b)
fcntl(4,F_SETLKW,0x7ffffffcde10)                 ERR#45 'Operation not supported'
stat("/usr/share/nls/C/libc.cat",0x7ffffffcd8c0) ERR#2 'No such file or directory'
stat("/usr/share/nls/libc/C",0x7ffffffcd8c0)     ERR#2 'No such file or directory'
stat("/usr/local/share/nls/C/libc.cat",0x7ffffffcd8c0) ERR#2 'No such file or directory'
stat("/usr/local/share/nls/libc/C",0x7ffffffcd8c0) ERR#2 'No such file or directory'
process exit, rval = 1


with /tmp mounted with tmpfs

root at areca_test:~ # truss ./areca-cli
__sysctl(0x7fffffffe610,0x2,0x6516c8,0x7fffffffe608,0x0,0x0) = 0 (0x0)
readlink("/etc/malloc.conf",0x7fffffffe630,1024) ERR#2 'No such file or directory'
issetugid(0x50badf,0x7fffffffe630,0xffffffffffffffff,0x0,0x0,0x0) = 0 (0x0)
break(0x700000)                                  = 0 (0x0)
__sysctl(0x7fffffffe8f0,0x2,0x7fffffffe90c,0x7fffffffe900,0x0,0x0) = 0 (0x0)
mmap(0x0,1048576,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366095360 (0x800610000)
mmap(0x800710000,983040,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34367143936 (0x800710000)
munmap(0x800610000,983040)                       = 0 (0x0)
sysarch(0x81,0x7fffffffeaf0,0x0,0x0,0x10,0x800700068) = 0 (0x0)
getpid()                                         = 853 (0x355)
__sysctl(0x7fffffffea70,0x2,0x65de10,0x7fffffffea78,0x0,0x0) = 0 (0x0)
__sysctl(0x7fffffffea00,0x2,0x7fffffffe990,0x7fffffffe9f8,0x50b398,0xd) = 0 (0x0)
__sysctl(0x7fffffffe990,0x3,0x64f1a8,0x7fffffffea78,0x0,0x0) = 0 (0x0)
__sysctl(0x7fffffffea30,0x2,0x65b358,0x7fffffffea28,0x0,0x0) = 0 (0x0)
thr_self(0x8007041c0,0x0,0x0,0x0,0x188,0x800700080) = 0 (0x0)
mmap(0x7fffffbfe000,4096,PROT_NONE,MAP_ANON,-1,0x0) = 140737484152832 (0x7fffffbfe000)
thr_set_name(0x186ec,0x50b3e0,0x400000,0x1000,0xffffffff,0x0) = 0 (0x0)
rtprio_thread(0x0,0x186ec,0x7fffffffea20,0x1000,0xffffffff,0x0) = 0 (0x0)
sysarch(0x81,0x7fffffffea40,0x7fffffffea80,0x208,0xffffffff,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigaction(32,{ 0x4b51f0 SA_RESTART|SA_SIGINFO ss_t },0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)                 = 0 (0x0)
__sysctl(0x7fffffffeac0,0x2,0x6518e0,0x7fffffffeab8,0x0,0x0) = 0 (0x0)
unlink("/dev/arcmsr0")                           = 0 (0x0)
unlink("/dev/arcmsr1")                           ERR#2 'No such file or directory'
unlink("/dev/arcmsr2")                           ERR#2 'No such file or directory'
unlink("/dev/arcmsr3")                           ERR#2 'No such file or directory'
mknod("/dev/arcmsr0",020666,-6368)               = 0 (0x0)
open("/dev/arcmsr0",O_RDWR,00)                   = 3 (0x3)
ioctl(3,0xc4244e06 { IORW 0x4e('N'), 6, 1060 },0xffffe3e0) = 0 (0x0)
open("/tmp/arcmsr0",O_RDWR|O_CREAT,00)           = 4 (0x4)
getpid()                                         = 853 (0x355)
fcntl(4,F_SETLKW,0x7ffffffcde10)                 = 0 (0x0)
ioctl(3,0xc4244e04 { IORW 0x4e('N'), 4, 1060 },0xfffcd9d0) = 0 (0x0)
ioctl(3,0xc4244e03 { IORW 0x4e('N'), 3, 1060 },0xfffcd9d0) = 0 (0x0)
ioctl(3,0xc4244e02 { IORW 0x4e('N'), 2, 1060 },0xfffcd9f0) = 0 (0x0)
ioctl(3,0xc4244e01 { IORW 0x4e('N'), 1, 1060 },0xfffcd9f0) = 0 (0x0)
nanosleep({0.010000000 })                        = 0 (0x0)
ioctl(3,0xc4244e01 { IORW 0x4e('N'), 1, 1060 },0xfffcd9f0) = 0 (0x0)
nanosleep({0.010000000 })                        = 0 (0x0)
ioctl(3,0xc4244e01 { IORW 0x4e('N'), 1, 1060 },0xfffcd9f0) = 0 (0x0)
nanosleep({0.010000000 })                        = 0 (0x0)
ioctl(3,0xc4244e01 { IORW 0x4e('N'), 1, 1060 },0xfffcd9f0) = 0 (0x0)
nanosleep({0.010000000 })                        = 0 (0x0)
ioctl(3,0xc4244e01 { IORW 0x4e('N'), 1, 1060 },0xfffcd9f0) = 0 (0x0)
nanosleep({0.010000000 })                        = 0 (0x0)
ioctl(3,0xc4244e01 { IORW 0x4e('N'), 1, 1060 },0xfffcd9f0) = 0 (0x0)
nanosleep({0.010000000 })                        = 0 (0x0)
ioctl(3,0xc4244e01 { IORW 0x4e('N'), 1, 1060 },0xfffcd9f0) = 0 (0x0)
nanosleep({0.010000000 })                        = 0 (0x0)
ioctl(3,0xc4244e01 { IORW 0x4e('N'), 1, 1060 },0xfffcd9f0) = 0 (0x0)
nanosleep({0.010000000 })                        = 0 (0x0)
ioctl(3,0xc4244e01 { IORW 0x4e('N'), 1, 1060 },0xfffcd9f0) = 0 (0x0)
nanosleep({0.010000000 })                        = 0 (0x0)
ioctl(3,0xc4244e01 { IORW 0x4e('N'), 1, 1060 },0xfffcd9f0) = 0 (0x0)



More information about the freebsd-questions mailing list