[clue-tech] Interesting file server appliance (and stuph)

David L. Willson DLWillson at TheGeek.NU
Tue Jan 30 10:44:37 MST 2007


Aside: I would like to add my cell number to the ring of emergency
contacts for CLUE, providing that I am not the only person in the ring.
I had no way of finding out what the Hell was going on, and people were
asking me about it.

NAS repost related: Also while things were down, I tried to post a first
draft of my "online and offsite" backup script, which makes a nice
complement to the cheap NAS of the original post, and asked for input.

Here's the script.  I'm looking for feedback, general and specific to
the ToDo item.  Don't use this in production without understanding it
and modifying it appropriately.  (Sorry for the nasty line-wrapping;
it's that or an attachment, and I'm unsure which is less offensive.)

=======================================================================

#!/bin/bash
# David L. Willson, 720-333-LANS, DLWillson at TheGeek.NU
# ToDo:
#   !!! Drop the "-o loop" from each mount command when using real disks
#   After mount, and before writes, the script should confirm that
#   $online-dir is at least 20% free.
#   while < 20% free, delete the first folder named *####-##-##*
#   note: To prevent folders from being deleted in this way,
#         rename them to 
#         ####-##-YE (year-end) or ####-##-ME (month end)

timestamp=`date +"%F.%T"`
echo "Starting at $timestamp..."

online_dev="/home/dwillson/online.file"
offsite_dev="/home/dwillson/offsite.file"
online_dir="/mnt/online"
offsite_dir="/mnt/offsite"
what_list="/home/dwillson/Documents/Scripts"

if [ ! -d $online_dir ]
then
   mkdir $online_dir
fi

if [ ! -d $offsite_dir ]
then
   mkdir $offsite_dir
fi

# the goal is to end any current access to the online partition and
mount-point
umount $online_dev; umount $online_dir; umount $offsite_dev; umount
$offsite_dir

# these better mountup clean or we quit
mount $online_dev $online_dir -o loop || exit 1

# make a folder for the timestamp
if [ ! -d $online_dir/$timestamp ]
then 
   mkdir $online_dir/$timestamp
   if [ -L $online_dir/completed ]
   then
      cp -al $online_dir/completed/* $online_dir/$timestamp
   fi
fi

# now update whatever's there (even if it's empty)
rsync --verbose --archive --hard-links --delete $what_list
$online_dir/$timestamp && \
rm -f $online_dir/completed && ln -s $online_dir/$timestamp
$online_dir/completed

# sync the online and offsite volumes
mount $offsite_dev $offsite_dir -o loop || exit 1
# now would be a good time to make sure that the offsite_dev is mounted
to the offsite_dir
# and that the filesystem is ext3 or better
rsync --verbose --archive --hard-links --delete $online_dir/
$offsite_dir

echo "Finished at $timestamp."

On Tue, 2007-01-30 at 10:29 -0700, Peter Kuykendall wrote:
> [I posted this a while back, but I believe that the server was down at 
> the time.  I apologize if this was sent out twice - Pete]
> 
> 
> Now this looks pretty cool.  It's an external hard drive that goes 
> beyond the usual USB interface.  This one has an Ethernet interface as 
> well.
> 
> If you think about it, it's really a file server appliance.  No doubt 
> it's running GNU / Linux with NFS, Samba, etc. so that it can talk to 
> Windows and Linux boxes on the network.  And the administration 
> interface is a web page, so it's doubtless running Apache in there as well.
> 
> I wonder what the embedded computer looks like (chipset, RAM, etc)?   
> Does anybody have any hard info about the guts of this thing?  I'd love 
> to know.
> 
> $100 for 250 gigs.  
> http://www.buy.com/retail/product.asp?sku=203354227&adid=17654&dcaid=17654
> 
> _______________________________________________
> clue-tech mailing list
> clue-tech at cluedenver.org
> http://www.cluedenver.org/mailman/listinfo/clue-tech




More information about the clue-tech mailing list