Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
I've been experimenting with partitioning disks recently (nearly losing my music collection in the process) and I've noticed that when I mount other drives, I lose Samba access completely. This is a bit of a shame.
It turns out that /bin/smbcom crashes if it can't read a file called .smb.ses on any drive listed in /etc/mtab.
To help me discover what's gone wrong, I've built strace (see attachment) with the help of gentoo.
The solution to the problem seems to be to copy .smb.ses from /mnt/HD_a2 to your other drives and edit it.
So, for /mnt/HD_a3 mounted on /dev/sda3, my file contains the following:
#version = 1.04 [ HDD_b ] comment = path = /mnt/HD_a3 valid users = read only = no guest ok = yes
I can then see the partition as HDD_b in Windows.
Offline
You may also mount second partition as a /mnt/HD_a2/otherpartition, then you don't need to mess with samba
Offline
Agreed, but if you then plug in a USB card reader, for example, smbcom will run, it will fail to find .smb.ses in /mnt/HD_a2/otherpartition, crash and leave an empty smb.conf file (I forgot to mention that bit). You then lose Samba access to everything, not just your new partitions.
Offline
Sorry to bring back an old topic but this smbcom thing...
I'm using a DNS-323 so things might be slightly different but I'm guessing it works the same.
smbcom on my system is just a symlink to /sys/crfs/samba/smbcom
lrwxr-xr-x 1 root root 22 Feb 8 19:22 smbcom -> /sys/crfs/samba/smbcom
What if you got rid of that symlink and created a script to parse the mount table and if the .smb.ses file doesn't exist, create it. And then of course, call smbcom after the script finishes creating .smb.ses files.
I found the same issue with smbcom on my DNS-323 when I was doing some mount --bind operations. It would segfault when it hit one it didn't like, but it wouldn't corrupt my samba configuration file.
Just a thought.
Last edited by tobyg (2007-02-09 19:44:28)
Offline