NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Substantial COMPAT_LINUX changes in netbsd-5?



On Jan 15, 2010, at 5:26 PM, Fredrik Pettai wrote:
On Jan 15, 2010, at 4:55 PM, Christos Zoulas wrote:
In article <4B4F9CBC.8080102%nordu.net@localhost>,
Fredrik Pettai  <pettai%nordu.net@localhost> wrote:
On 1/14/10 6:16 PM, Hauke Fath wrote:
All,

after upgrading a few i386 servers to netbsd-5, wip/tsm (5.2.2, now 5.2.5)
terminates with an OOM error:

[...]

I also hit problems running the Veritas Netbackup client for Linux after
upgrading to netbsd-5 (from netbsd-4).

Any idea what changes in COMPAT_LINUX shipped with netbsd-5 might be
responsible?

First, the suse(100)_base package has an "error" then running netbsd-5,
since linking outside the emulation root is not permitted. See:
http://mail-index.netbsd.org/pkgsrc-users/2009/05/26/msg009936.html
The symlink /emul/linux/etc/mtab should point to /proc/mounts instead of /emul/linux/... The NetBackup client use /etc/mtab, which then fails if
it isn't corrected.

Second, the filesystems never worked to backup unless they where mounted
inside the emulation root. So I NFS-mounted them under
/emul/linux/netbackup/... instead.
However, the df command (which Netbackup also uses during backups) shows the real path (which is /usr/pkg/emul/...), so I mimiced the directory tree under /emul/linux/... (usr/pkg/emul/linux), and a netbackup symlink
at the top, pointing back to /netbackup.

After that, we at least got a full backup to work, but the incremental backups still fails. It doesn't feel stable ATM. I just noticed that the
df command seems to get "blocked" during a incremental backup try.

[...]

I think that the namei changes that handle the emulated root could be at
fault here, or NFS. Have you tried using a loopback mount?

No, but I will try that now then.

Hmm...yet another problem?

var + home mounts fine as null mounts, but usr refuses with this error message:

bash-4.0# mount /usr/pkg/emul/linux/netbackup/usr
mount_null: /usr (/usr) and /usr/pkg/emul/linux/netbackup/usr (/usr/ pkg/emul/linux/netbackup/usr) are not distinct paths

Some debug info below:

bash-4.0# df -h
Filesystem        Size       Used      Avail %Cap Mounted on
/dev/sd0a         248M        62M       173M  26% /
/dev/sd0f         7.8G       1.9G       5.4G  26% /var
/dev/sd0e          16G        11G       3.4G  77% /usr
tmpfs             1.0G        20K       1.0G   0% /tmp
/dev/sd0g         239G       125G       102G  54% /home
kernfs            1.0K       1.0K         0B 100% /kern
procfs            4.0K       4.0K         0B 100% /proc
procfs 4.0K 4.0K 0B 100% /usr/pkg/emul/linux/ proc /var 7.8G 1.9G 5.4G 26% /usr/pkg/emul/linux/ netbackup/var /home 239G 125G 102G 54% /usr/pkg/emul/linux/ netbackup/home

bash-4.0# cat /etc/fstab
# NetBSD /etc/fstab
# See /usr/share/examples/fstab/ for more examples.
/dev/sd0a               /       ffs     rw               1 1
/dev/sd0b               none    swap    sw               0 0
tmpfs                   /tmp    tmpfs   rw,-s1024M       0 0
/dev/sd0e               /usr    ffs     rw,log           1 2
/dev/sd0f               /var    ffs     rw,log           1 2
/dev/sd0g               /home   ffs     rw,log           1 2
kernfs          /kern   kernfs  rw
procfs          /proc   procfs  rw
procfs  /emul/linux/proc        procfs  rw,linux
#
#Filesystems to backup (via Nullmounts)
/var /usr/pkg/emul/linux/netbackup/var null rw  0 0
/usr /usr/pkg/emul/linux/netbackup/usr null rw  0 0
/home /usr/pkg/emul/linux/netbackup/home null rw        0 0

bash-4.0# ls -ld /usr/pkg/emul/linux/netbackup/*
drwxr-xr-x 78 root wheel 1536 Aug 26 10:53 /usr/pkg/emul/linux/ netbackup/home drwxr-xr-x 2 root wheel 512 Jan 17 11:08 /usr/pkg/emul/linux/ netbackup/usr drwxr-xr-x 30 root wheel 512 Jan 13 13:39 /usr/pkg/emul/linux/ netbackup/var

.../usr, not working:

bash-4.0# ktruss mount /usr/pkg/emul/linux/netbackup/usr
   841      1 ktruss   emul(netbsd)
   841      1 ktruss   fktrace                     = 0
   841      1 ktruss   fcntl(0x4, 0x3, 0)          = 1
   841      1 ktruss   fcntl(0x4, 0x4, 0x1)        = 0
841 1 ktruss execve("/home/pettai/bin/mount", 0xbfbfed48, 0xbfbfed54) Err#2 ENOENT 841 1 ktruss execve("/bin/mount", 0xbfbfed48, 0xbfbfed54) Err#2 ENOENT
   841      1 mount    emul(netbsd)
841 1 mount execve("/sbin/mount", 0xbfbfed48, 0xbfbfed54) JUSTRETURN 841 1 mount mmap(0, 0x8000, 0x3, 0x1002, 0xffffffff, 0, 0, 0) = 0xbbbe9000
   841      1 mount    open("/libexec/ld.elf_so", 0, 0) = 3
   841      1 mount    read(0x3, 0xbfbfec34, 0x80) = 55
       "libm.so.0\tmachdep.fpu_present\t1:libm387.so.0,libm.so.0\n"
   841      1 mount    close(0x3)                  = 0
   841      1 mount    open("/etc/ld.so.conf", 0, 0) = 3
   841      1 mount    __fstat30(0x3, 0xbfbfe550)  = 0
841 1 mount mmap(0, 0x1000, 0x1, 0x1, 0x3, 0, 0, 0) = 0xbbbe8000
   841      1 mount    munmap(0xbbbe8000, 0x1000)  = 0
841 1 mount mmap(0, 0xf0000, 0x5, 0x2, 0x3, 0, 0, 0) = 0xbbaf9000 841 1 mount mmap(0xbbbd1000, 0x8000, 0x3, 0x12, 0x3, 0, 0xd7000, 0) = 0xbbbd1000 841 1 mount mmap(0xbbbd9000, 0x10000, 0x3, 0x1012, 0xffffffff, 0, 0, 0) = 0xbbbd9000
   841      1 mount    close(0x3)                  = 0
841 1 mount __sysctl(0xbfbfec78, 0x2, 0xbbbe7960, 0xbfbfec80, 0, 0) = 0
   841      1 mount    __lstat30("/lib/libc.so.12", 0xbfbfe268) = 0
   841      1 mount    __lstat30("/usr", 0xbfbfe268) = 0
   841      1 mount    __lstat30("/usr/pkg", 0xbfbfe268) = 0
   841      1 mount    __lstat30("/usr/pkg/emul", 0xbfbfe268) = 0
   841      1 mount    __lstat30("/usr/pkg/emul/linux", 0xbfbfe268) = 0
841 1 mount __lstat30("/usr/pkg/emul/linux/netbackup", 0xbfbfe268) = 0 841 1 mount open("/usr/pkg/emul/linux/netbackup/usr", 0, 0x1b6) = 3
   841      1 mount    __fstat30(0x3, 0xbfbfdd38)  = 0
841 1 mount __sysctl(0xbfbfd958, 0x2, 0xbbbe0f74, 0xbfbfd960, 0, 0) = 0 841 1 mount __sysctl(0xbfbfd898, 0x2, 0xbbbe7dc0, 0xbfbfd8a0, 0, 0) = 0 841 1 mount readlink("/etc/fstab", 0xbfbfd965, 0x400) Err#2 ENOENT
   841      1 mount    break(0x8100000)            = 0
841 1 mount mmap(0, 0x100000, 0x3, 0x14001002, 0xffffffff, 0, 0, 0) = 0xbb900000
   841      1 mount    read(0x3, 0xbb901000, 0x2000) = 850
"# NetBSD /etc/fstab\n# See /usr/share/examples/fstab/ for more exampl"
   841      1 mount    __lstat30("/etc/malloc.conf", 0xbfbfc938) = 0
   841      1 mount    __lstat30("/usr", 0xbfbfc938) = 0
   841      1 mount    __lstat30("/usr/pkg", 0xbfbfc938) = 0
   841      1 mount    __lstat30("/usr/pkg/emul", 0xbfbfc938) = 0
   841      1 mount    __lstat30("/usr/pkg/emul/linux", 0xbfbfc938) = 0
841 1 mount __lstat30("/usr/pkg/emul/linux/netbackup", 0xbfbfc938) = 0 mount_null: /usr (/usr) and /usr/pkg/emul/linux/netbackup/usr (/usr/ pkg/emul/linux/netbackup/usr) are not distinct paths
   841      1 mount    __vfork14()                 = 2301
   841      1 mount    wait4(0x8fd, 0xbfbfe2b0, 0, 0) = 2301
   841      1 mount    exit(0x1)


.../home, working fine:

bash-4.0# ktruss mount /usr/pkg/emul/linux/netbackup/home
   802      1 ktruss   emul(netbsd)
   802      1 ktruss   fktrace                     = 0
   802      1 ktruss   fcntl(0x4, 0x3, 0)          = 1
   802      1 ktruss   fcntl(0x4, 0x4, 0x1)        = 0
802 1 ktruss execve("/home/pettai/bin/mount", 0xbfbfed44, 0xbfbfed50) Err#2 ENOENT 802 1 ktruss execve("/bin/mount", 0xbfbfed44, 0xbfbfed50) Err#2 ENOENT
   802      1 mount    emul(netbsd)
802 1 mount execve("/sbin/mount", 0xbfbfed44, 0xbfbfed50) JUSTRETURN 802 1 mount mmap(0, 0x8000, 0x3, 0x1002, 0xffffffff, 0, 0, 0) = 0xbbbe9000
   802      1 mount    open("/libexec/ld.elf_so", 0, 0) = 3
   802      1 mount    read(0x3, 0xbfbfec34, 0x80) = 55
       "libm.so.0\tmachdep.fpu_present\t1:libm387.so.0,libm.so.0\n"
   802      1 mount    close(0x3)                  = 0
   802      1 mount    open("/etc/ld.so.conf", 0, 0) = 3
   802      1 mount    __fstat30(0x3, 0xbfbfe550)  = 0
802 1 mount mmap(0, 0x1000, 0x1, 0x1, 0x3, 0, 0, 0) = 0xbbbe8000
   802      1 mount    munmap(0xbbbe8000, 0x1000)  = 0
802 1 mount mmap(0, 0xf0000, 0x5, 0x2, 0x3, 0, 0, 0) = 0xbbaf9000 802 1 mount mmap(0xbbbd1000, 0x8000, 0x3, 0x12, 0x3, 0, 0xd7000, 0) = 0xbbbd1000 802 1 mount mmap(0xbbbd9000, 0x10000, 0x3, 0x1012, 0xffffffff, 0, 0, 0) = 0xbbbd9000
   802      1 mount    close(0x3)                  = 0
802 1 mount __sysctl(0xbfbfec78, 0x2, 0xbbbe7960, 0xbfbfec80, 0, 0) = 0
   802      1 mount    __lstat30("/lib/libc.so.12", 0xbfbfe268) = 0
   802      1 mount    __lstat30("/usr", 0xbfbfe268) = 0
   802      1 mount    __lstat30("/usr/pkg", 0xbfbfe268) = 0
   802      1 mount    __lstat30("/usr/pkg/emul", 0xbfbfe268) = 0
   802      1 mount    __lstat30("/usr/pkg/emul/linux", 0xbfbfe268) = 0
802 1 mount __lstat30("/usr/pkg/emul/linux/netbackup", 0xbfbfe268) = 0 802 1 mount open("/usr/pkg/emul/linux/netbackup/home", 0, 0x1b6) = 3
   802      1 mount    __fstat30(0x3, 0xbfbfdd38)  = 0
802 1 mount __sysctl(0xbfbfd958, 0x2, 0xbbbe0f74, 0xbfbfd960, 0, 0) = 0 802 1 mount __sysctl(0xbfbfd898, 0x2, 0xbbbe7dc0, 0xbfbfd8a0, 0, 0) = 0 802 1 mount readlink("/etc/fstab", 0xbfbfd965, 0x400) Err#2 ENOENT
   802      1 mount    break(0x8100000)            = 0
802 1 mount mmap(0, 0x100000, 0x3, 0x14001002, 0xffffffff, 0, 0, 0) = 0xbb900000
   802      1 mount    read(0x3, 0xbb901000, 0x2000) = 850
"# NetBSD /etc/fstab\n# See /usr/share/examples/fstab/ for more exampl"
   802      1 mount    __lstat30("/etc/malloc.conf", 0xbfbfc938) = 0
   802      1 mount    __lstat30("/usr", 0xbfbfc938) = 0
   802      1 mount    __lstat30("/usr/pkg", 0xbfbfc938) = 0
   802      1 mount    __lstat30("/usr/pkg/emul", 0xbfbfc938) = 0
   802      1 mount    __lstat30("/usr/pkg/emul/linux", 0xbfbfc938) = 0
802 1 mount __lstat30("/usr/pkg/emul/linux/netbackup", 0xbfbfc938) = 0
   802      1 mount    __vfork14()                 = 1127
   802      1 mount    wait4(0x467, 0xbfbfe2b0, 0, 0) = 1127
   802      1 mount    getuid()                    = 0
802 1 mount open("/usr/pkg/emul/linux/netbackup/home", 0, 0x1b6) = 5
   802      1 mount    __fstat30(0x5, 0xbfbfdd38)  = 0
   802      1 mount    read(0x5, 0xbb903000, 0x4000) = 4
       "207\n"
   802      1 mount    kill(0xcf, 0x1)             = 0
   802      1 mount    close(0x5)                  = 0
   802      1 mount    exit(0)

Any Ideas to why?

Regards,
/P


Home | Main Index | Thread Index | Old Index