Hal Vaughan
2020-Feb-13 21:45 UTC
[Samba] Linux SMB Server: Put Multiple Devices into One Share?
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? Hal
Jeremy Allison
2020-Feb-13 22:14 UTC
[Samba] Linux SMB Server: Put Multiple Devices into One Share?
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... :-).
Matt Savin
2020-Feb-13 22:40 UTC
[Samba] Linux SMB Server: Put Multiple Devices into One Share?
Hello Jeremy, I think you missed a "/" in: mount --bind /share1/DVR /medium/DVR mount --bind /share1/Audio /medium/Audio mount --bind /share2/Video /medium/Video mount --bind /share2/Backups /medium/Backups BR, Matt On Thu, Feb 13, 2020 at 5:15 PM Jeremy Allison via samba < samba at lists.samba.org> wrote:> 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... :-). > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >
Possibly Parallel Threads
- Linux SMB Server: Put Multiple Devices into One Share?
- Linux SMB Server: Put Multiple Devices into One Share?
- W95/98 connect to any SMB share as another user? (SAMBA dige
- Samba-created files with POSIX ACLs gaining execute bit
- msdfs not working on netbios aliases?