theYinYeti Posted May 19, 2009 Report Share Posted May 19, 2009 (edited) I have a very strange problem with a mounted NCP share (remote Novell clustered volume). Directories are there, but not files! I mount the share with autofs, but the same happens with mount, or directly with ncpmount. Example mount command: mount -t ncp -o tcp,ipserver=SERVER,volume=VOL,multiple,uid=501,gid=500,filemode=0664,dirmode=07 75,passwd=PW,codepage=cp850,iocharset=utf8 SERVER/USER test/ (all parts in capitals were substituted). A “find -noleaf ! -type d†in test/ returns nothing. Stranger still: I can create and delete a file but I don't see it happen! Example: I ran “touch test/SOME/DIR/test_fileâ€, and a coworker on Windows could see the file, but I could not! And I ran “rm -f test/SOME/DIR/test_file†and my co-worker reported to me that the file disappeared! Neither command gave any error. Yves. [edit]Corrected typo: “find†returns nothing when looking for non-directories.[/edit] Edited September 4, 2009 by theYinYeti Quote Link to comment Share on other sites More sharing options...
isadora Posted May 19, 2009 Report Share Posted May 19, 2009 I have a very strange problem with a mounted NCP share (remote Novell clustered volume).Directories are there, but not files! I mount the share with autofs, but the same happens with mount, or directly with ncpmount. Example mount command: mount -t ncp -o tcp,ipserver=SERVER,volume=VOL,multiple,uid=501,gid=500,filemode=0664,dirmode=07 75,passwd=PW,codepage=cp850,iocharset=utf8 SERVER/USER test/ (all parts in capitals were substituted). A “find -noleaf -type d†in test/ returns nothing. Stranger still: I can create and delete a file but I don't see it happen! Example: I ran “touch test/SOME/DIR/test_fileâ€, and a coworker on Windows could see the file, but I could not! And I ran “rm -f test/SOME/DIR/test_file†and my co-worker reported to me that the file disappeared! Neither command gave any error. Yves. Looks like some authorisation-issue. Like, are there browse-rights or something in Novell? Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted May 20, 2009 Author Report Share Posted May 20, 2009 (edited) I don't know if that's any help, but here's some more information. Where I work, we were previously using Novell from server NV1, and now data is being moved to clustered volumes on server NV2. On Windows boot, here's the current login log: Contexte actuel : CO.NTE.XT Utilisateur : USER Contexte : CO.NTE.XT Arborescence actuelle : TREE Vous êtes attaché au serveur NV1. Nous sommes aujourd'hui Mercredi 20 Mai 2009 BIENVENUE SUR LE SERVEUR NV1 Votre identification est 001F160E9D36 Authentification sur le serveur NV2. Unité P : = NV2\DATA: \ Authentification sur le serveur NV3. LOGIN-LGNWNT32.DLL-430 : impossible de terminer l'opération d'assignation d'unités. [U:=NV3/USR:] le code d'erreur était 8804. S1: = Z:. [NV1_SYS.:PUBLIC \] Unité Q : = NV1_SYS.:PUBLIC\ Unité R : = NV2\DATA:SUB\DIR \ Les unités C,D correspondent à un disque local. Unité F : = NV1_SYS.:\ Unité P : = NV2\DATA: \ Unité Q : = NV1_SYS.:PUBLIC\ Unité R : = NV2\DATA:SUB\DIR \ L'unité X correspond à un disque local. ----- Unités de recherche ----- S1: = C:\Applications\Java\jdk16\bin S2: = C:\WINDOWS\system32 S3: = C:\WINDOWS S4: = C:\WINDOWS\System32\Wbem S5: = C:\WINDOWS\system32\nls S6: = C:\WINDOWS\system32\nls\FRANCAIS S7: = Y:. [NV1_SYS.:PUBLIC \] S8: = Z:. [NV1_SYS.:PUBLIC \] And here's exactly the contents of my /etc/autofs/auto.ncpfs file: NV2 -fstype=ncpfs,tcp,ipserver=NV2,volume=data,multiple,uid=501,gid=500,filemode=0664 ,dirmode=0775,passwd=PW,codepage=cp850,iocharset=utf8 :NV2/USER.CO.NTE.XT NV1 -fstype=ncpfs,multiple,uid=501,gid=500,filemode=0664,dirmode=0775,passwd=PW ,codepage=cp850,iocharset=utf8 :NV1/USER.CO.NTE.XT Also, this line is ran on boot by /etc/rc.d/rc.local: “ipx_configure --auto_interface=on --auto_primary=on†NV1 works OK. NV2 does not: I see directories, but no files, although I have access to them. For example, I could open a PDF file I knew was there (gnome-open /path/to/file.pdf), even though I could not see the file! As told before, I can also (blindly) create and delete files. Yves. Edited June 15, 2009 by theYinYeti Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted May 25, 2009 Author Report Share Posted May 25, 2009 I corrected a typo in the first post. Still no idea? The access from Linux seems to match that from windows, but maybe my second post will help someone spot a permission issue, a difference somewhere that could explain the strange behaviour… Yves. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted May 25, 2009 Report Share Posted May 25, 2009 I only notice a difference in your fstype part of your line - I'm assuming there's a reason why it is different to that of NV1 which is working? If not, maybe make it the same as NV1 and see if it works any better? I don't have access to a Novell machine right now, so can't test it. Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted May 26, 2009 Author Report Share Posted May 26, 2009 (edited) Thank you for answering Ian :) There is indeed a reason for the two lines to be different. On the IP side, both machines are seen: [yves@work ~]$ ping N1 PING N1.workdomain (x.x.x.x1) 56(84) bytes of data. 64 bytes from N1.workdomain (x.x.x.x1): icmp_seq=1 ttl=128 time=1.42 ms 64 bytes from N1.workdomain (x.x.x.x1): icmp_seq=2 ttl=128 time=0.389 ms ^C --- N1.workdomain ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1923ms rtt min/avg/max/mdev = 0.389/0.908/1.428/0.520 ms [yves@work ~]$ ping N2 PING N2.workdomain (x.x.x.x2) 56(84) bytes of data. 64 bytes from x.x.x.x2: icmp_seq=1 ttl=64 time=0.378 ms 64 bytes from x.x.x.x2: icmp_seq=2 ttl=64 time=0.396 ms ^C --- N2.workdomain ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1505ms rtt min/avg/max/mdev = 0.378/0.387/0.396/0.009 ms Now, I notice that ping “64 bytes…†lines look different for the second server. I don't know if there's any meaning to this. On the NCP side of things, though, N2 is unknown, which is no surprise because I've read that clustered volumes only work in IP mode because they use a capability of IP that the Novell protocol does not have: [root@work ~]# slist Known NetWare File Servers Network Node Address -------------------------------------------------------------------------- N1 0534FA74 000000000001 NA 0B6DB224 000000000001 NB 00008657 000000000001 So, for N2, I have to use the “tcp†and “ipserver†mount options, which give the IP sub-protocol to use and the DNS mapping for the given Novell logical name. For the record, here's the output of mount without those options: [root@work ~]# mount -t ncp -o volume=data,multiple,uid=501,gid=500,filemode=0664,dirmode=0775,passwd=PW,codepa ge=cp850,iocharset=utf8 N2/USER.CO.NTE.XT test/ mount.ncp: Server not found (0x8847) when trying to find N2 As for the “volume=†mount option, it is because I've read that this option is mandatory for clustered volumes, unless you want to see the administration volume (or something like that; I'm far from an expert in this area); for non-clustered volumes, ncpfs' default without this option is to mount all volumes (as sub-directories) under a single mount-point. And indeed, until I added this option, the contents of N2's mount point would remain “_admin/†and “sys/â€, which has nothing to do with the contents I need. Yves. Edited June 15, 2009 by theYinYeti Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted June 15, 2009 Author Report Share Posted June 15, 2009 (edited) Trying to solve this by myself, I tried and logged to the Novell machines in a way as close as possible to what Windows PCs do. I tried to mimick what a Windows user sees on their Novell login window, as well as the sequence of operations : first login, then map the drives. So I tried this : ncplogin -T TREE -X CO.NTE.XT -E -U USER.CO.NTE.XT -u 501 -g 500 -P PW -f 0664 -d 0775 -y utf8 -p cp850 -i 3 ncpmap -S NV2 -A NV2 -o tcp -X CO.NTE.XT -E -V DATA -f 0664 -d 0775 -y utf8 -p cp850 -i 2 -a and this : ncplogin -S NV2 -A NV2 -o tcp -X CO.NTE.XT -E -U USER.CO.NTE.XT -u 501 -g 500 -P PW -f 0664 -d 0775 -y utf8 -p cp850 ncpmap -S NV2 -A NV2 -o tcp -X CO.NTE.XT -E -V DATA -f 0664 -d 0775 -y utf8 -p cp850 -i 2 -a Both sets “workedâ€, although the first set of commands does not anymore… I suppose I was lucky, and “ncplogin -T†only worked because I had connected before ; now I get “failed:Cannot attach to tree TREE. Err:Server not found (0x8847)â€. Anyway, whatever the commands I use, I still get the same result : I can browse directories, create, open and delete files, BUT I cannot browse files (see them in Nautilus or command-line)… And ncpfs hasn't got a web site, and wasn't updated since 2005. This is getting depressing. Yves. Edited June 15, 2009 by theYinYeti Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted September 4, 2009 Author Report Share Posted September 4, 2009 I've got a quite stable setup now. Unfortunately, I was unable to do anything using ncpfs. Only the official Novell client for Linux seems able to connect to this clustered Novell volume correctly! And I was not able to use this client with Mandriva. The setup is such: — A very minimal trimmed-down opensuse virtual machine in VirtualBox (64MB RAM, 2MB VideoRAM, 3GB HardDisk, NAT, 800x600x32, IceWM). — In this opensuse, the display manager is disabled, and IceWM is started directly as the single existing user (“yvesâ€) from the /etc/inittab file, along with ncl_autologin. — In the XML file for this virtual machine (~/.VirtualBox/Machines/opensuse/opensuse.xml), inside the XPath “/VirtualBox/Machine/ExtraDataâ€, I added this for redirecting ports from the host to the guest: <ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/smb/HostPort" value="1445"/> <ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/smb/GuestPort" value="1445"/> <ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/smb/Protocol" value="TCP"/> <ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/smbu/HostPort" value="1445"/> <ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/smbu/GuestPort" value="1445"/> <ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/smbu/Protocol" value="UDP"/> — In the opensuse guest, I setup Samba this way: [global] security = SHARE smb ports = 1445 map to guest = Bad User guest account = yves log file = /var/log/samba/%m.log max log size = 50 unix extensions = No socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 load printers = No local master = No dns proxy = No wins proxy = No wins support = No veto files = /.unison/ [novell] comment = Novell mounts path = /var/opt/novell/nclmnt/yves force user = yves guest only = Yes guest ok = Yes case sensitive = Yes hide dot files = No read only = No delete readonly = Yes — On the Mandriva host, I use autofs, and this line connects to the virtual machine's Novell share (adapt options to your situation): suse_novell -fstype=cifs,port=1445,uid=500,gid=500,noperm,noacl,nounix,iocharset=utf8 ://localhost/Novell There only remained to automate things, so : — I created the following script, auto-started by Gnome (but I also have an icon on the panel for restarting it in case of problem): #!/bin/bash opensuseFile=~/.VirtualBox/Machines/opensuse/opensuse.xml uuid=sed -n '/<Machine/{s/^.*uuid="{\([^"]*\)}".*$/\1/p;Q}' "$opensuseFile" if /sbin/ifconfig | grep -F adr:160.14. &>/dev/null; then if ! pidof VirtualBox &>/dev/null; then VirtualBox & sleep 3s fi if VBoxManage list runningvms | grep -Fx "$uuid" &>/dev/null; then VBoxManage controlvm opensuse poweroff sleep 2s fi VBoxManage startvm opensuse sleep 3s sed -n 's~^.*<ExtraDataItem name="\(VBoxInternal/[^"]*\)" value="\([^"]*\)"/>.*$~\1 \2~p' "$opensuseFile" \ | while read var val; do VBoxManage setextradata opensuse "$var" "$val" done sleep 120s # Enter password on ncl_autologin prompt; don't forget key releases. # See: http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html VBoxManage controlvm opensuse keyboardputscancode xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx fi & — I created the following script, for which I have a launcher on the panel, to stop the PC: #!/bin/bash sudo /sbin/service autofs stop sleep 3s if pidof VirtualBox &>/dev/null; then # Ctrl+Echap VBoxManage controlvm opensuse keyboardputscancode 1d 01 81 9d sleep 1s # Up VBoxManage controlvm opensuse keyboardputscancode e0 48 e0 c8 sleep 1s # Right VBoxManage controlvm opensuse keyboardputscancode e0 4d e0 cd sleep 1s # Down, Down, Down VBoxManage controlvm opensuse keyboardputscancode e0 50 e0 d0 VBoxManage controlvm opensuse keyboardputscancode e0 50 e0 d0 VBoxManage controlvm opensuse keyboardputscancode e0 50 e0 d0 sleep 1s # Enter ("Stop computer" in IceWM) VBoxManage controlvm opensuse keyboardputscancode 1c 9c while [ $(VBoxManage list runningvms 2>/dev/null | tail --lines +5 | wc -l) -gt 0 ]; do sleep 1s; done killall VirtualBox fi halt — Which in turn needed that I gave myself the right to stop autofs; this is done in visudo by specifying this line (a more specific right can be written but this was enough for me): yves localhost=(root) NOPASSWD: /sbin/service Maybe this will help someone with a similar need… This is far from perfect, and I wish Novell would stop doing SuSe-only “driversâ€. Yves. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.