Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it OK to have samba shares that overlap, like the following:

[whole-drive]
  path = /mnt/myusbdrive
  ...

[music]
  path = /mnt/myusbdrive/music
  ...

[movies]
  path = /mnt/myusbdrive/movies
  ...

I have a mounted external HDD with music and movies, plus a whole bunch of other stuff like backups. I want to expose the music and movies directories as separate samba shares (probably with guest access), so that they're uncluttered with all the other stuff; and I want to expose the entire drive as a separate samba share (with higher permissions) for doing more administrative things across the drive.

Does Samba behave well with this configuration? I'm wondering if I'd end up with problems like phantom writes if the same file is accessed at the same time across two different shares.

[Edit] Do I need to do anything with oplocks?

Details:

  • OS: Debian GNU/Linux wheezy/sid on Raspberry Pi
  • HDD: NTFS, mounted as ntfs-3g.
  • Samba: version 3.6.6
share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

This is a method of operation that native Windows machines have supported since the WinNT days. Samba should have no problems with it.

share|improve this answer
    
I don't totally understand the reference to Windows as I'm hosting this on Linux. –  Toaomalkster Dec 7 '12 at 3:04
1  
@Toaomalkster The point being that the reference system, Windows, that Samba emulates considers this perfectly supported behavior so it is highly likely that Samba considers it fully supported as well. –  sysadmin1138 Dec 7 '12 at 3:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.