We're using a Samba machine as an SMB <-> NFS gateway. I.E. actual file shares are via nfs, and Windows clients make requests via Samba. There are virtual directories set up on the Samba machine for automounted nfs shares. (There are a number of nfs servers, and there are a couple of virtual directories where many of these shares show up.) Those virtual directories are being shared as samba shares. This is the only way we've found so far to share everything in these virtual directories easily. (Too many subdirectories to make individual shares). The problem is that when things are shared in this way, drive mounts on the Windows clients show that the share has no drive space left, and 20 MB total space. This makes sense, because the directory being used for automounting is a virtual directory, which has 0 bytes free. Note: a samba share of a directory _under_ the virtual directory where things are automounted does not have the problem and reports the correct amount of free space from the nfs server. User directories work fine because the CIFS homes share causes the user's home directory to automatically come up as a separate share, which alleviates the problem in that instance. A "workaround" which is useful, but not perfect, is to make a new directory on the local machine which is writable which contains links to the subdirectories of the virtual directory where nfs automounts reside. Sharing this directory then shows the free space available on the Samba machine, rather than of the nfs shares. This alleviates the client machines being shown that there are 0 bytes available for the shares. It also requires making links for every subdirectory in the automounted nfs shares, and having to maintain that list. Example for clarification purposes - /drive is one of the directories used for automount nfs shares. /drive/space1 is one of the directories that can be automounted /drive_links is a directory of links to subdirectories under /drive, and space1 is a link in this directory pointing to /drive/space1. smb.conf: ----------- <a bunch of settings I'm leaving out> [drive] path = /drive read only = No [drivelinks] path = /drive_links read only = No [space1] path = /drive/space1 read only = No In this example, after mounting the drives on the client, the [drive] share shows 0 bytes available, the [space1] share shows the available free space of the NFS share, and [drivelinks]/space1 shows the available free space of the partition on the Samba machine where the /drive_links directory resides. If anyone has come across with a solution for sharing an NFS automount directory that's a little more elegant than this I would really like to know. Thanks - Chris Chris Knadle cknadle@aeroflex.com
I have automounts for my shares. Under windows 98 it shows the proper free space once you do a map. It is very similiar your part of the conf file. You might need to check how your automounts are working. Chris Knadle wrote:> We're using a Samba machine as an SMB <-> NFS gateway. I.E. >actual file shares are via nfs, and Windows clients make requests via Samba. > > There are virtual directories set up on the Samba machine for automounted >nfs shares. (There are a number of nfs servers, and there are a couple of >virtual directories where many of these shares show up.) Those virtual >directories are being shared as samba shares. This is the only way we've >found so far to share everything in these virtual directories easily. (Too >many subdirectories to make individual shares). > > The problem is that when things are shared in this way, drive mounts on >the Windows clients show that the share has no drive space left, and 20 MB >total space. This makes sense, because the directory being used for >automounting is a virtual directory, which has 0 bytes free. > > Note: a samba share of a directory _under_ the virtual directory where >things are automounted does not have the problem and reports the correct >amount of free space from the nfs server. > User directories work fine because the CIFS homes share causes the user's >home directory to automatically come up as a separate share, which alleviates >the problem in that instance. > > A "workaround" which is useful, but not perfect, is to make a new >directory on the local machine which is writable which contains links to the >subdirectories of the virtual directory where nfs automounts reside. Sharing >this directory then shows the free space available on the Samba machine, >rather than of the nfs shares. This alleviates the client machines being >shown that there are 0 bytes available for the shares. It also requires >making links for every subdirectory in the automounted nfs shares, and having >to maintain that list. > > Example for clarification purposes - > /drive is one of the directories used for automount nfs shares. > /drive/space1 is one of the directories that can be automounted > /drive_links is a directory of links to subdirectories under /drive, > and space1 is a link in this directory pointing to /drive/space1. > smb.conf: > ----------- > <a bunch of settings I'm leaving out> > [drive] > path = /drive > read only = No > [drivelinks] > path = /drive_links > read only = No > [space1] > path = /drive/space1 > read only = No > > In this example, after mounting the drives on the client, the [drive] share >shows 0 bytes available, the [space1] share shows the available free space of >the NFS share, and [drivelinks]/space1 shows the available free space of >the partition on the Samba machine where the /drive_links directory resides. > > > If anyone has come across with a solution for sharing an NFS automount >directory that's a little more elegant than this I would really like to know. > > Thanks > > - Chris > >Chris Knadle >cknadle@aeroflex.com >-- Joseph Loo jloo@acm.org
Hey, Joseph.> I don't know what OS you are using, I prefer to use home directories but > I tried one set at /opt/applix (automounted to the opt) drive and > mounted unde winnt as \\mfg\win_c. Worked perfectly fine with the size.Win 95, 98, ME, 2000, XP. All behave the same way on this. Check your /opt directory on your system. My guess is that it should look something like the following: drwxr-xr-x 2 root wheel 0 May 1 10:10 opt This means that the virtual directory where you're mounting your nfs shares does not have any space available. When you try to share this directory with samba, everything under it will show 0 space free. Try this: make a new share on your system, which looks like this: [win_test] path = /opt read only = Yes guest ok = Yes browseable = Yes After mounting a _directory_ under [win_test] on a client, and looking at the properties, you'll probably see that the share has 0 space. ;-) What you've got below works _because_ the actual share is _not_ of the /opt directory directly.> > [win_c] > path = /opt/applix > read only = Yes > guest ok = Yes > browsabel = yes > > auto.opt > > applix mfg:/export/home/opt/& > local mfg:/export/home/opt/& > netscape mfg:/export/home/opt/& > netscape-6 mfg:/export/home/opt/& > oracle mfg:/export/home/opt/& > staroffice mfg:/export/home/opt/staroffice/5.2 > > auto.master > > /home /etc/auto.home > /misc /etc/auto.misc --timeout=60 > /opt /etc/auto.opt --timeout=60