Re: [Samba] Make CIFS look like NFS
Edward Ned Harvey wrote: I'm trying to run an IMAP mail server (Dovecot) in a virtual machine. However, I do not want the messages stored within the virtual disk. So - the question was how the virtual machine could access those files. Dovecot has been setup and tested with NFS. However, when I asked The best answer to this question is exactly what you're doing - testing it will give you results probably more convincing than anything anyone could say to you. That being said ... NFS is a more native network filesystem for unix machines, so it really only makes sense to use samba if you have some compelling reason not to use NFS. Do you have some reason NFS would be bad in this case? I had tried NFS previously - and didn't enjoy it. I had numerous lockups. Samba appeared to provide a much more fault-tolerant environment. I will admit it's possible there were physical connectivity issues that have since been corrected. There are many differences between samba and nfs, however, there are only two that I think are likely to be true roadblocks for you. File permissions ... In samba you can configure the umask to be whatever you like, but you can't do it on a file-by-file basis. So you're missing granularity there if you need it. And in samba, certain characters (most notably the ':' colon character) are not valid. For Maildir support, the colon character is a necessity (at least under Dovecot). It'd be neat if Samba had an option to allow non-Windows legal characters in filenames. However, Dovecot has another format (dbox) that uses standard characters, so that gets around the filename issue. There may be some difference in the way file locking is handled. This would only matter if you had more than one system accessing the same files at the same time - but I don't think that's the case for you, huh. Because it's an imap server, and you're not going to run two separate imap servers on the same directory. The issue you mentioned with missing tmp files ... sounds bogus to me. I can't think of any way samba could cause that, unless it's just a side-effect of one of the aforementioned possible roadblocks. What I saw happening was temp files would be created, but not deleted - and they had what looked like Samba-specific names (I haven't tried this is a month, sorry I'm not more specific). The files could not be deleted unless I broke the connection. I'm assuming that Dovecot was trying some kind of file-locking request that works on local or NFS files - but seems to break horribly under CIFS. That's really what I'm asking about I guess - what difference is there in how CIFS implements various filelock and fsync options compared with NFS (and there must be something, otherwise I wouldn't have had the problems). -- Daniel -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
RE: [Samba] Make CIFS look like NFS
NFS is a more native network filesystem for unix machines, so it really only makes sense to use samba if you have some compelling reason not to use NFS. Do you have some reason NFS would be bad in this case? I had tried NFS previously - and didn't enjoy it. I had numerous lockups. Samba appeared to provide a much more fault-tolerant environment. I will admit it's possible there were physical connectivity issues that have since been corrected. That sheds a whole new light on it - you're definitely going about this wrong, if you are doing unix-to-unix filesharing and you expect cifs to be better than nfs... You should instead concentrate your effort on configuring NFS right. If it's configured right, NFS is the more resilient protocol. You can even reboot the NFS server in the middle of file operations, and there will be no problem (just a delay) on the client. The reason to use samba is primarily sharing with windows, but to a lesser extent, some other OSes. Samba is after all, reverse-engineered Microsoft cifs. MS created it, and the only reason anyone else uses it is for the sake of MS compatibility. Assuming you're on Linux, I'll suggest the following NFS options in your exports file, and then I think I better butt-out, because this is a samba mailing list: man exports # On a server that has a caching raid controller card, you want sync,no_wdelay # On a server that has a simple disk, you want async (no_wdelay has no effect, so you can omit it.) /share 10.1.100.0/23(sync,no_wdelay,rw,no_root_squash) And I'll suggest the following options on the nfs client: Use automount. Assuming automount 5 you can use auto.direct as below, otherwise create an automount directory as expected in automount 4. /etc/auto.master /- /etc/auto.direct --timeout=1200 /etc/auto.direct /share -fstype=nfs,rw,hard,intr,posix fileserver:/share If you take my advice here, you'll have a NFS hard mount on the client (therefore resilient) combined with interruptable auto dismount (therefore self healing). This is the config that I deploy to all the locations where I do their IT, because after zillions of hours of manual reading, testing and usage - it's a tried tested rock solid config for linux-to-linux filesharing. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Make CIFS look like NFS
On Mon, Jun 08, 2009 at 06:00:52PM -0400, Edward Ned Harvey wrote: NFS is a more native network filesystem for unix machines, so it really only makes sense to use samba if you have some compelling reason not to use NFS. Do you have some reason NFS would be bad in this case? I had tried NFS previously - and didn't enjoy it. I had numerous lockups. Samba appeared to provide a much more fault-tolerant environment. I will admit it's possible there were physical connectivity issues that have since been corrected. That sheds a whole new light on it - you're definitely going about this wrong, if you are doing unix-to-unix filesharing and you expect cifs to be better than nfs... You should instead concentrate your effort on configuring NFS right. If it's configured right, NFS is the more resilient protocol. You can even reboot the NFS server in the middle of file operations, and there will be no problem (just a delay) on the client. The same is true of a Samba server, as the clients are usually coded to do reconnects correctly (remember they originally were designed to work only with Windows servers :-). Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
RE: [Samba] Make CIFS look like NFS
protocol. You can even reboot the NFS server in the middle of file operations, and there will be no problem (just a delay) on the client. The same is true of a Samba server, as the clients are usually coded to do reconnects correctly (remember they originally were designed to work only with Windows servers :-). If you're saying that linux cifs clients will gracefully handle server reboots (or interruptions) I believe you - I've never had any reason to do such a thing myself - But I know I've had within the last year, windows xp clients connected via cifs and linux clients connected via nfs to a server which spontaneously rebooted, and all the XP clients were disconnected (some had to reboot to restore connection, while most just needed to manually disconnect/reconnect) and the linux clients all paused for a little while and continued as if nothing happened. Maybe it wasn't nfs vs cifs which saved the day on the linux clients - maybe it was linux vs windows that made the difference. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
RE: [Samba] Make CIFS look like NFS
I'm trying to run an IMAP mail server (Dovecot) in a virtual machine. However, I do not want the messages stored within the virtual disk. So - the question was how the virtual machine could access those files. Dovecot has been setup and tested with NFS. However, when I asked The best answer to this question is exactly what you're doing - testing it will give you results probably more convincing than anything anyone could say to you. That being said ... NFS is a more native network filesystem for unix machines, so it really only makes sense to use samba if you have some compelling reason not to use NFS. Do you have some reason NFS would be bad in this case? There are many differences between samba and nfs, however, there are only two that I think are likely to be true roadblocks for you. File permissions ... In samba you can configure the umask to be whatever you like, but you can't do it on a file-by-file basis. So you're missing granularity there if you need it. And in samba, certain characters (most notably the ':' colon character) are not valid. There may be some difference in the way file locking is handled. This would only matter if you had more than one system accessing the same files at the same time - but I don't think that's the case for you, huh. Because it's an imap server, and you're not going to run two separate imap servers on the same directory. The issue you mentioned with missing tmp files ... sounds bogus to me. I can't think of any way samba could cause that, unless it's just a side-effect of one of the aforementioned possible roadblocks. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Make CIFS look like NFS
Hello, And if you want some unix-like features on top, make sure unix extensions is set to yes. But be careful with that and test it beforehand on all systems (different operating systems I mean). It can sometimes break little things for Mac/Win. Regards, Michal 2009/6/3 Brian Krusic br...@krusic.com: You can have an NFS mount on your Nix box like /JOBS/stuff and a CIFS mount on XP like \\JOBS\stuff. In this case, JOBS is the Samba server name. This is how I maintain the same paths in scripts on diff platforms. Al you have to ensure is that your app will obey UNC paths so that a drive letter is never saved out in the file. - Brian On Jun 3, 2009, at 11:38 AM, Daniel L. Miller wrote: Is it possible to make CIFS look like NFS via some configuration/mount options? What I mean is, from a client point of view, will the mounted share behave EXACTLY like NFS will? -- Daniel -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Make CIFS look like NFS
Michal Dobroczynski wrote: Hi Daniel, Can you specify what NFS features are important to you in such case? (in other words please define look like NFS) Regards, Michal Oh - you want me to be specific? What fun would that be? ;-) Ok, specifics... I'm trying to run an IMAP mail server (Dovecot) in a virtual machine. However, I do not want the messages stored within the virtual disk. So - the question was how the virtual machine could access those files. Dovecot has been setup and tested with NFS. However, when I asked about compatibility with CIFS, I was told it would probably not work. Testing on my own showed that in fact that this resulted in problems - it appeared temp files would be created and never deleted. I tried a few different smb.conf mount parameters that SEEMED appropriate - but wasn't able to get it to work. So... I guess my specific question would be how can I setup CIFS so Dovecot will work with it as happily as it does with NFS? -- Daniel -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Make CIFS look like NFS
Hello, Thanks for the details - they really change completely the whole background ;) Anyway, there's not much I can help in such situation - but see my comments below. Maybe they will help (convince?) in some way. 2009/6/4 Daniel L. Miller dmil...@amfes.com: Michal Dobroczynski wrote: Hi Daniel, Can you specify what NFS features are important to you in such case? (in other words please define look like NFS) Regards, Michal Oh - you want me to be specific? What fun would that be? ;-) Ok, specifics... I'm trying to run an IMAP mail server (Dovecot) in a virtual machine. However, I do not want the messages stored within the virtual disk. So - the question was how the virtual machine could access those files. Dovecot has been setup and tested with NFS. However, when I asked about compatibility with CIFS, I was told it would probably not work. Testing on my own showed that in fact that this resulted in problems - it appeared temp files would be created and never deleted. I tried a few different smb.conf mount parameters that SEEMED appropriate - but wasn't able to get it to work. So... I am not aware of possible issues (fs calls circus) apart from using : in file names: smb: \mico\ put test:test putting file test:test as \mico\test:test (0,0 kb/s) (average 0,0 kb/s) smb: \mico\ ls . D0 Thu Jun 4 19:48:34 2009 .. D0 Thu Jun 4 19:48:29 2009 TLNVL5~P 0 Thu Jun 4 19:48:40 2009 I guess my specific question would be how can I setup CIFS so Dovecot will work with it as happily as it does with NFS? I think you will have to change your requirements and consider NFS instead of CIFS :( Regards, Michal -- Daniel -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Make CIFS look like NFS
Is it possible to make CIFS look like NFS via some configuration/mount options? What I mean is, from a client point of view, will the mounted share behave EXACTLY like NFS will? -- Daniel -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Make CIFS look like NFS
Hi Daniel, Can you specify what NFS features are important to you in such case? (in other words please define look like NFS) Regards, Michal 2009/6/3 Daniel L. Miller dmil...@amfes.com: Is it possible to make CIFS look like NFS via some configuration/mount options? What I mean is, from a client point of view, will the mounted share behave EXACTLY like NFS will? -- Daniel -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Make CIFS look like NFS
You can have an NFS mount on your Nix box like /JOBS/stuff and a CIFS mount on XP like \\JOBS\stuff. In this case, JOBS is the Samba server name. This is how I maintain the same paths in scripts on diff platforms. Al you have to ensure is that your app will obey UNC paths so that a drive letter is never saved out in the file. - Brian On Jun 3, 2009, at 11:38 AM, Daniel L. Miller wrote: Is it possible to make CIFS look like NFS via some configuration/ mount options? What I mean is, from a client point of view, will the mounted share behave EXACTLY like NFS will? -- Daniel -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba