[Samba] Linux SMB Server: Put Multiple Devices into One Share?

Jeremy Allison jra at samba.org
Thu Feb 13 22:14:35 UTC 2020

On Thu, Feb 13, 2020 at 04:45:16PM -0500, Hal Vaughan via samba wrote:
> I haven’t used Samba for over a decade and, from what I remember, I don’t think this is possible.  Whenever I search for "two mount points" or "multiple mount points," I get hits for "multiple users," but not for mount points.
> I have the following directories I want to share through Samba:
> /share1/DVR
> /share1/Audio
> /share2/Video
> /share2/Backups
> /share1 is on /dev/sdb
> /share2 is on /dev/sdc
> Due to the amount of data on each one and the size of the devices, I can’t put all the shares on one device.
> I want to have one mount point, media, and it would have:
> /medium/DVR
> /medium/Audio
> /medium/Video
> /medium/Backups
> If I remember, from years ago, this is not possible and any use of "two" or "multiple" in any searches regarding Samba always give me hits about users, not shares.  (Or questions about how to mount shares on client machines.)
> Is there any way I can combine directories on two separate volumes on a Debian Linux system into one mount point as an SMB share?

Can't you use a bind-mount to do this ?

mkdir /medium/DVR
mkdir /medium/Audio
mkdir /medium/Video
mkdir /medium/Backups
mount --bind /share1/DVR medium/DVR
mount --bind /share1/Audio medium/Audio
mount --bind /share2/Video medium/Video
mount --bind /share2/Backups medium/Backups

then export /medium via Samba as normal.

I haven't tested this... :-).

More information about the samba mailing list