[Samba] Samba 3 dynamically enable or disable share
Mauricio Alvarez
maurialvarez303 at rocketmail.com
Mon Apr 29 08:05:29 MDT 2013
Michael,
I really don't want to repartition--again! But yes, your idea is intresting.
If there really isn't any other option (really? no-one has ever had this problem in the past?), I was thinking of something like this:
* Inside each disk, at the root level, create a single directory, call it ROOTDIR01 for DISK1, ROOTDIR02 for disk2 etc.
* Modify the entries in smb.conf like so:
[STORAGE01]
path = /mnt/DISK1/ROOTDIR01
Guest OK = false
...
etc...
so, if no disk is mounted, we have only /mnt/DISK1 but no ROOTDIR01. If the disk is mounted, the ROOTDIR01 is then visible and gets shared as [STORAGE01]
Also, the clients see [STORAGE01] as their root dir, ignoring the ROOTDIR01 sub-level
This is very crude, I wonder if it might work.
> Wouldn't it be very simple to just create a VERY small partition (e.g. 10MB) on the main drive
> (the one that your system disk is on), and mount it on e.g. /mnt.
>
> Then, even if one of your disks can't mount for some reason, only this very small partition will
> fill up => no problem for the rest of the system.
>
> You would still have to configure your other machines to handle disk full failures and maybe
> subsequently try another share...
>
>
>
>Michael
>
>
>
More information about the samba
mailing list