I'm running Samba with automount to automatically mount CDs in a server. These CDs need to be changed periodically, so I wanted to use automount so that they could be changed by the users fairly easily. We use logon scripts to map the CDs to drive letters when users logon. Unfortunately, it seems that having a drive mapped is treated like the drive is being used, so as long as there is someone logged into the system, automount will not unmount the drive. The only way we can change the CDs is to have everyone log out, wait for the timeout (or unmount it manually), change the CDs and have everyone log back in. Does anyone have a better way (one that will work)? Trey Nolen
On Sat, 16 Nov 2002, Trey Nolen wrote:> I'm running Samba with automount to automatically mount CDs in a server. > These CDs need to be changed periodically, so I wanted to use automount so > that they could be changed by the users fairly easily. We use logon scripts > to map the CDs to drive letters when users logon. Unfortunately, it seems > that having a drive mapped is treated like the drive is being used, so as > long as there is someone logged into the system, automount will not unmount > the drive. The only way we can change the CDs is to have everyone log out, > wait for the timeout (or unmount it manually), change the CDs and have > everyone log back in. Does anyone have a better way (one that will work)?The only way I've found around this is to add deadtime = 1 to the [global] section of smb.conf. This drops connections after a minute. Then there's the automount timeout to add to this. The downside is that all connections to the server are broken, so users see red crosses against all their timed-out mapped drives when browsing. There's probably a performance hit in having to re-establish connections as well, so I put our automounted drives on a separate server. Tim Allen
Hi,> I'm running Samba with automount to automatically mount CDs in a > server. These CDs need to be changed periodically, so I wanted to use > automount so that they could be changed by the users fairly easily. > We use logon scripts to map the CDs to drive letters when users > logon. Unfortunately, it seems that having a drive mapped is treated > like the drive is being used, so as long as there is someone logged > into the system, automount will not unmount the drive. The only way > we can change the CDs is to have everyone log out, wait for the > timeout (or unmount it manually), change the CDs and have everyone > log back in. Does anyone have a better way (one that will work)?Don't use the automounter. Instead write a small shell (or perl) skript that mounts and unmounts the cds (and kills everything that would prevent you from unmounting). When it works, make it suid root. Christopher
On Sat, 2002-11-16 at 11:10, Trey Nolen wrote:> I'm running Samba with automount to automatically mount CDs in a server. > These CDs need to be changed periodically, so I wanted to use automount so > that they could be changed by the users fairly easily. We use logon scripts > to map the CDs to drive letters when users logon. Unfortunately, it seems > that having a drive mapped is treated like the drive is being used, so as > long as there is someone logged into the system, automount will not unmount > the drive. The only way we can change the CDs is to have everyone log out, > wait for the timeout (or unmount it manually), change the CDs and have > everyone log back in. Does anyone have a better way (one that will work)? > > Trey Nolen > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/sambaread up on the root pre-exec and post-exec commands. When someone access a share that points to a cd-rom drive, pre-exec can mount it (actually it can run anything you want), and when they leave the share, it can un-mount it. In other words, you can have it mounted only while someone is actively accessing it. Good Luck, Christopher