Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
samba get root inode failed Cannot allocate memory
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Sun Sep 04, 2011 12:30 pm    Post subject: samba get root inode failed Cannot allocate memory Reply with quote

Server: Android mobile device, in which I have installed LinuxInstaller: we end up with a chrooted Debian installed via Debootstrap. In the end, we have, vertically:
- Linux kernel
- Android OS
- chroot
- Debian
- samba

Server conf:
Code:

root@DHP-ARMEL:~# cat /etc/samba/smb.conf  | grep -v -e "^;" -e "^#" | uniq

[global]

   workgroup = WORKGROUP
   server string = %h server
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes

[tmp1]
   comment = Temporary file space
   path = /tmp
   read only = no
   public = yes

[tmp2]
   comment = Temporary file space SDC
   path = /mnt/sdcard/
   read only = no
   public = yes

root@DHP-ARMEL:~#


Client conf: Gentoo: /etc/fstab:
Code:

//server/tmp1      /mnt/s1      cifs    rw,noauto,username=user,password=pass       0 0
//server/tmp2   /mnt/s2   cifs    rw,noauto,username=user,password=pass       0 0


syslog on client:
Code:

Sep  4 14:08:10 uranus kernel: CIFS VFS: Send error in QFSAttributeInfo = -13
Sep  4 14:08:10 uranus kernel: CIFS VFS: Send error in QFSUnixInfo = -13
Sep  4 14:08:10 uranus kernel: CIFS VFS: cifs_read_super: get root inode failed


CLI on client:
Code:

uranus ~ # mount /mnt/s2
mount error(12): Cannot allocate memory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
uranus ~ #


Server logs does not say anything relevant. Just auth success, no error anywhere.

Mounting /mnt/s1 works fine.

/mnt/s1 on client points (indirectly) to /tmp on server. This folder is a legacy folder in the chroot, and a normal folder in Android.

/mnt/s2 points to /mnt/sdcard on server. This is the non working stuff, and here is what this folder REALLY is: /mnt/sdcard is, by essence, a normal folder for Debian (inside the chroot). But the content of /mnt/sdcard@Debian is not managed by Debian. Coming backwards ... /mnt/sdcard@Debian is /mnt/chroot/mnt/sdcard@Android ... which, in Android, is a bind mount from /mnt/sdcard@Android. Which in Android is a mount of a block device.

Re-doing the walk from device to samba:
mount in Android:
Code:

/dev/block/vold/179:65 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=101
5,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=r
emount-ro)


then, we bind it to the proper location, in android:
Code:

/dev/block/vold/179:65 on /mnt/chroot/mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)


This mount is done using mount -o bind /src /dst

This folder becomes /mnt/sdcard in Debian, and we can list is nicely. Ls gives expected content ... same as /mnt/chroot/mnt/sdcard in android.

Export of /mnt/sdcard in Android works fine via Samba (using an Android samba server).
Export of /tmp in Debian works fine using Debian Samba (after killing Android Samba of course).
Export of /mnt/sdcard in Debian gives the upper error.

I am not surprised that Samba can not this folder as easily as /tmp : the content comes from a bind, after a block mount. I can understand Samba get's mad in front of this. The error message is completely irrelevant. Client as way enough memory to mount anything: AMD64 with 4G RAM, way enough local storage to store 375 times the Android server ... just keep in mind the fact there is an error, and forget about error message. It's just the kind or issue the software is not designed to deal with, and will prompt out any random stupid and useless message.

The questino is: how do I fix this error ? how to mount this folder ?

Android can not be avoided. Chroot can not be avoided. Debian can not be avoided. Use of Samba in Android shall be stopped; I tried it ... for a try, but it's not reliable, not flexible, and has many bugs (and Samba team does not seem sensible to the bugs I have found, and are unlikely to fix them: server shuts down in various cases where I want to keep it up). Bind-mount can not be avoided.
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
alex260978
n00b
n00b


Joined: 27 Jan 2007
Posts: 22

PostPosted: Tue Sep 06, 2011 4:11 pm    Post subject: Reply with quote

Hi,
you can try to install SMBFS package. Here a brief guide : http://www.debian-administration.org/articles/165
_________________
Bye!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum