Obsolete Releases > SME 8.x Contribs

Affa to USB

(1/3) > >>

Brave Dave:
With Affa

I'm using it to daily backup to a USB and rotate the USB. I'm using a couple of the Western Digital Drives 500Gb Drives

The problem here is that when they are swapped the system doesn't recognize them as the same, labeling 1 sdd, the other sdc - so the mount commands aren't identical, i.e. on one disk it is

--- Quote ---mount /mnt/sdc1 /mnt/affadevice
--- End quote ---
on the other

--- Quote ---mount /mnt/sdd1 /mnt/affadevice
--- End quote ---

I assign and use a label in /etc/fstab

But affa doesn't seem to like that as an AutomountDevice

? any suggestions ?

Thanks in advance

janet:
Brave Dave

I do the same & it works OK ie swap USB drives daily with Affa.

Label the disks the same as each other, & do not add entries in /etc/fstab, the system will take care of that in sme8 & assign each drive as being /sdc

Remove one drive first then connect the other drive so it is always seen as /sdc

My Affa job shows it as /dev/sdc1

elmarconi:

--- Quote from: mary on October 22, 2012, 04:43:45 AM ---Remove one drive first then connect the other drive so it is always seen as /sdc

--- End quote ---

That is the trick. Works like a charm here for at least several years...

Brave Dave:
Thanks for the tips
I too have had this work for years
But sometimes things that have worked for years don't - there's a word for that ..

I had to write a script, someone else might come across it one day, but this might be the only time in living existence this thing happens

--- Code: ---#!/bin/bash

affa=`/sbin/e-smith/db affa getprop mavis AutomountDevice`

if [ -b /dev/sdd1 ]; then

    if [ "$affa" == "/dev/sdd1" ];then
        #echo "all good ($affa)"
        /bin/logger "..all good /dev/sdd1 ($affa)"
    else
        /sbin/e-smith/db affa setprop mavis AutomountDevice /dev/sdd1
        /bin/logger "..Updated Affa AutomountPoint /dev/sdd1 ($affa)"
        echo "" | mail -s "Updated AutomountPoint /dev/sdd1" david@bravedave
    fi
elif [ -b /dev/sdc1 ]; then

    if [ "$affa" == "/dev/sdc1" ];then
        #echo "all good ($affa)"
        /bin/logger "..all good /dev/sdc1 ($affa)"
    else
        /sbin/e-smith/db affa setprop mavis AutomountDevice /dev/sdc1
        /bin/logger "..Updated Affa AutomountPoint /dev/sdc1 ($affa)"
        echo "" | mail -s "Updated AutomountPoint /dev/sdc1" david@bravedave
    fi
fi

--- End code ---

elmarconi:
Seen this? : http://wiki.contribs.org/USBDisks#USB_on_SME_8

Navigation

[0] Message Index

[#] Next page

Go to full version