Just to make sure that we are on the same page, the Distro is PBX in a flash (PIAF) Centos 5.2, Asterisk 1.6, Freepbx 2.7
On Tue, Dec 14, 2010 at 1:01 PM, Henry Coleman <[email protected]>wrote: > Hi all I have commented out the line as suggested.(tried fixing the typo, > didn't make any difference) > Initially, hot plugging the USB will display the USB file system however on > unplugging the stick > the old file system will not return unless I reboot (with the stick > removed). > I tried to save a file on the USB drive which should create a directory and > file: > ie. <var/lib/asterisk/backups/*usb*/date_and_time filename.tgz> but this > didn't create a directory or a file. > > The good news is that I does auto mount ... > > Henry > > > On Tue, Dec 14, 2010 at 12:33 PM, John Lange <[email protected]> wrote: > >> I don't think reformatting your usb key will solve that mount error. I >> don't have access to a freepbx system verify this but my guess is the >> version of "mount" is too old to support relatime. >> >> Regardless, you can safely delete this whole section: >> >> >> # Global mount options >> ACTION=="add", ENV{mount_options}="relatime" >> >> "relatime" & "noatime" are tweaks to the mounting that prevent linux from >> updating the "atime" of the file. It dramatically cuts down on file system >> access which not only improves performance but also lengthens the life of >> storage that has a maximum re-write lifetime. >> >> This is --way-- off topic but if you are interested in performance >> tweaking of linux file systems you can experiment with mounting your devices >> with the "noatime" option. However, it can cause problems with certain >> programs that require accurate "atime" information so use with caution. >> >> By the way, if you needed to reformat the key you can format fat32 (vfat) >> on Linux: >> >> # mkfs -t vfat /dev/sdb1 >> >> Or if you don't need to plug this usb into a Windows machine you can just >> format the key with ext3. >> >> >> -- >> John Lange >> www.johnlange.ca >> >> On Tue, Dec 14, 2010 at 10:14 AM, Mike Ashton < >> [email protected]> wrote: >> >>> 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]> 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 >>>> >>>> On Mon, Dec 13, 2010 at 4:05 PM, Henry Coleman < >>>> [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] >>> >> >> >> > > > -- > *Henry L. Coleman * > ***Per: VoIP-PBX.ca > * > * > * > > > -- *Henry L. Coleman * ***Per: VoIP-PBX.ca * * *
