Re: Mounting drive - still having problems

2008-06-01 Thread Paul Gear
David Ryder wrote:
 ...
 Are you saying that autofs (when installed and configured) will mount a
 drive in a desired location when a program needs it and unmount after a
 user-defined period of inactivity?

That's exactly right.

 ...
 As a simple example of a use, when Simple Backups (sbackups package)
 looks for the drive in a particular folder, will it mount it? My feeling
 is that it will not because if the drive is not mounted it sbackups
 creates a folder itself. Hence my predicament. The drive has to be
 mounted in different places at different times and doesn't that bring me
 back to cron jobs and scripts?

If sbackups checks for the directory's existence before creating it,
then autofs will mount it and the check will succeed.

This is really not that hard a problem (many people have solved it many
times before), and if you haven't got it working after this time, you
probably have been looking at it too closely and are missing something
simple.  Find a friend to sit with you and work on it - sometimes an
extra pair of eyes is all that is needed to give you a fresh perspective.

Paul


smime.p7s
Description: S/MIME Cryptographic Signature
-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au


Re: Mounting drive - still having problems

2008-06-01 Thread Paul Gear
David Ryder wrote:
 ...
 Please forgive me still asking for help trying to get this to work - I
 don't understand why not despite manuals and this list's help. The drive
 just does not mount this way. I need to be able to use different mount
 points at different non-clashing times.

Here is an autofs configuration that should work in your situation
(assuming the variables you mentioned in your previous post).

Add to /etc/auto.master:

   /backup  /etc/auto.backup --timeout=10

In /etc/auto.backup, put:

  hardy-backups -fstype=ntfs-3g :/dev/disk/by-label/hardy-backups

Then restart autofs and cd to /backup/hardy-backups.

Paul


smime.p7s
Description: S/MIME Cryptographic Signature
-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au


Mounting drive - still having problems

2008-05-30 Thread David Ryder
Hi,
Please forgive me still asking for help trying to get this to work - I
don't understand why not despite manuals and this list's help. The drive
just does not mount this way. I need to be able to use different mount
points at different non-clashing times.

HARDY
AIM: through cron, use scripts to load one drive in different folders at
different times - for valid business reasons.

EXISTING FOLDERS IN /media FOR MOUNTING POINTS
/media/backhardy32

FSTAB:
not in fstab, not wanted in fstab

SUDOERS FILE: (BLANK LINES DELETED TO SAVE SPACE IN EMAIL)
# /etc/sudoers
# This file MUST be edited with the 'visudo' command as root.
# See the man page for details on how to write a sudoers file.
Defaults env_reset
# Uncomment to allow members of group sudo to not need a password
# %sudo ALL=NOPASSWD: ALL
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
david ALL = NOPASSWD: /bin/mount, /bin/umount

CRON FILE:
/etc/cron.d file called 'david':
00 04 * * * /home/david/my-cron-jobs/mount-hardy32-backups.sh
30 05 * * * /home/david/my-cron-jobs/unmount-hardy32-backups.sh
(tested with times 00 09 and 00 10 respectively so I was awake and could
see if it worked!)

FILES IN /home/david/my-cron-jobs:

mount-hardy32-backups.sh:
#!/bin/sh
sudo mount /media/backhardy32

unmount-hardy32-backups.sh:
#!/bin/sh
sudo umount /media/backhardy32


From my previous email, other suggestion as well as sudoers, were tried
but mounting/unmounting did not work manually. sudoers was edited
correctly (after learning curve! :-)  )

Many thanks everybody - help is really appreciated.

David


-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au