For easier compatibility format your USB key as FAT32
On 12/14/2010 10:25 AM, Henry Coleman wrote:
Thanks John, this is a really elegant solution.
Plugging in a USB stick however, CLI reports:
*FAT: Unrecognised mount option "relatime" or missing value*
*
*
I checked the link you included but there's nothing obvious that would
give this error.
(My stick is formatted NTFS)
Thanks Henry
On Mon, Dec 13, 2010 at 5:43 PM, John Lange <[email protected]
<mailto:[email protected]>> wrote:
In short; create this file
(*/etc/udev/rules.d/11-backup-auto-mount.rules ) *by copying and
pasting the text between the start and end tags:
--- start ---
**
KERNEL!="sd[a-z][0-9]", GOTO="backup_auto_mount_end"
# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"
# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs",
ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"
# Mount the device
ACTION=="add", RUN+="/bin/mount -o $env{mount_options} /dev/%k
/var/lib/asterisk/backups"
# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l
/var/lib/asterisk/backups"
# Exit
LABEL="backup_auto_mount_end"
--- end ---
You can then insert and remove your key without touching the
system. (I'm making a lot of assumptions about FreePBX that should
be correct, for example that it uses udev).
Lots more suggestions on udev rules here:
https://wiki.archlinux.org/index.php/Udev#Auto_mounting_USB_devices
--
John Lange
www.johnlange.ca <http://www.johnlange.ca>
On Mon, Dec 13, 2010 at 4:05 PM, Henry Coleman
<[email protected] <mailto:[email protected]>> wrote:
Thanks for all the suggestions. So far I think that Doug'
solution looks the most promising, however
it needs automating so that inserting the USB stick will
automatically "mount" the stick and disconnection will
"umount" the stick.
(A sort of plug and play if you will) Restore might work also
based on this principle.
So I'm gonna pick your Linux brains (again) and ask if this
can be done?
Henry
--
/Henry L. Coleman /
/Per: VoIP-PBX.ca
/
/
/
--
Mike Ashton
Quality Track International
Work: +1 647 724 3500 x251
Cell: +1 416 527 4995
QTI CONFIDENTIAL AND PROPRIETARY INFORMATION
The contents of this material are confidential and proprietary to Quality Track
International, Inc.
and may not be reproduced, disclosed, distributed or used without the express
permission of an authorized representative of QTI.
Use for any purpose or in any manner other than that expressly authorized is
prohibited.
If you have received this communication in error, please immediately delete it
and all copies, and promptly notify the sender.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]