Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
restarting samba for just one share possible ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 365

PostPosted: Fri Sep 19, 2014 8:19 am    Post subject: restarting samba for just one share possible ? Reply with quote

When I boot my system, I share some drives to my network.
Apart from this, I have an encrypted filesystem that I have to unlock manually and then share. the decrypted filesystem is accessible through /mnt/decrypted.

So after I start, samba is just sharing /mnt/decrypted, which is an empty directory.
Then I decrypt => decrypt encrypted_FS /mnt/decrypted

When I ls /mnt/decrypted locally, I see the decrypted files. When I look at the samba share, I still see the empty directory.
In order to make the decrypted files available, I need to 'refresh' the samba share /mnt/decrypted. Actually, this means release the link that samba has to the lower lying /mnt/decrypted and relink to the system that is mounted on top of it.

However, the only way I found to do this is to restart samba completely /etc/init.d/samba restart.
Restarting samba also means all other shares are temporarily interrupted, possibly breaking the connections of other users.
So my question is if there is a way for samba to 'restart' a single share, something like 'samba --reload /mnt/decrypted'.

Alternatively, would there be a way to specify a samba share in such a way that samba automatically displays the topmost mounted filesystem of a certain directory ?
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 731
Location: DC Burbs

PostPosted: Sun Oct 05, 2014 7:28 pm    Post subject: Reply with quote

It's a bit of work each time, but you could comment out the share in the smb.conf file each time before you reboot. Then do you decrypt/mount, uncomment and then do an "/etc/init.d/samba reload". That should start the share without booting off existing share users.
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 731
Location: DC Burbs

PostPosted: Sun Oct 05, 2014 7:31 pm    Post subject: Reply with quote

Also if you look into using swat to do your samba admin from a web client, you should be able to do all of this from it. I never use it because it can tend to clobber manual settings that I have to do when dealing with life as an active directory domain member.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum