Old 11-13-2009, 08:20 PM   #1 (permalink)
Untangle Ninja
 
sky-knight's Avatar
 
Join Date: Apr 2008
Location: Phoenix, AZ
URLs submitted: 8
Posts: 15,464
sky-knight is on a distinguished road
Default How to: Mount a USB drive on your Untangle Server

This tutorial assumes you know how to get into a terminal, either SSH or the local console doesn't matter.

Ok, first the hard part... identifying the device flag for the USB drive. I Plug in my USB drive to the Untangle server, then run the following command.

Code:
dmesg
That command will spew a pile of output, at the very end will be a block of text similar to the following.

Quote:
[2526565.234406] usb 4-1: new full speed USB device using uhci_hcd and address 2
[2526565.382407] usb 4-1: not running at top speed; connect to a high speed hub
[2526565.421656] usb 4-1: configuration #1 chosen from 1 choice
[2526565.425657] scsi2 : SCSI emulation for USB Mass Storage devices
[2526565.538657] usb-storage: device found at 2
[2526565.538657] usb-storage: waiting for device to settle before scanning
[2526565.425657] usb 4-1: New USB device found, idVendor=05dc, idProduct=a701
[2526565.425657] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[2526565.425657] usb 4-1: Product: JD FIREFLY
[2526565.425657] usb 4-1: Manufacturer: LEXAR
[2526565.425657] usb 4-1: SerialNumber: 1069A706011107281207
[2526572.090503] usb-storage: device scan complete
[2526572.101753] scsi 2:0:0:0: Direct-Access LEXAR JD FIREFLY 1100 PQ: 0 ANSI: 0 CCS
[2526572.132352] sd 2:0:0:0: [sdb] 3932160 512-byte hardware sectors (2013 MB)
[2526572.135350] sd 2:0:0:0: [sdb] Write Protect is off
[2526572.135355] sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00
[2526572.135357] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[2526572.147350] sd 2:0:0:0: [sdb] 3932160 512-byte hardware sectors (2013 MB)
[2526572.150351] sd 2:0:0:0: [sdb] Write Protect is off
[2526572.150356] sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00
[2526572.150358] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[2526572.150747] sdb: sdb1
[2526572.197574] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[2526572.199951] sd 2:0:0:0: Attached scsi generic sg1 type 0
You'll notice the third from the last line.

Quote:
[2526572.150747] sdb: sdb1
This means my thumb drive is attached to the sdb device flag, and it has 1 partition represented by sdb1

Now that I know where the device flag is I can mount the thumb drive with the following command.

Code:
mount /dev/sdb1 /mnt
From this point the /mnt directory is now my thumb drive, and I can copy files to and from it as if it was just another folder in the system.

When I'm done, before I unplug the device I must unmount the filesystem to ensure things are written properly and I don't corrupt the file system on the thumb drive.

First I make sure I'm not still in /mnt

Code:
cd /
umount /mnt
Now I can yank my USB drive out and move on with my day.
__________________
Rob Sandling, BS:SWE, MCP
Intouch Technology
Phone: 480-272-9889
rob@intouchtechllc.com

UntangleAppliances.com
Phone: 866-794-8879
sky-knight is online now  
Old 11-13-2009, 09:38 PM   #2 (permalink)
Master Untangler
 
Join Date: Jul 2009
URLs submitted: 1
Posts: 221
alhadi is on a distinguished road
Default

how about using that usb drive lets say 1 TB WD for network backup purpose?

any ideas on that
alhadi is offline  
Old 11-14-2009, 12:47 AM   #3 (permalink)
Untangle Ninja
 
sky-knight's Avatar
 
Join Date: Apr 2008
Location: Phoenix, AZ
URLs submitted: 8
Posts: 15,464
sky-knight is on a distinguished road
Default

This process can be used to mount any USB storage device. Mounting network storage is a bit different, and more than likely will need samba installed before it's over.
__________________
Rob Sandling, BS:SWE, MCP
Intouch Technology
Phone: 480-272-9889
rob@intouchtechllc.com

UntangleAppliances.com
Phone: 866-794-8879
sky-knight is online now  
Old 11-14-2009, 02:12 AM   #4 (permalink)
Untangle Ninja

 
WebFooL's Avatar
 
Join Date: Jan 2009
Location: Sweden (Eskilstuna)
URLs submitted: 57
Posts: 3,882
WebFooL is on a distinguished road
Send a message via MSN to WebFooL
Default

I have a other solution.
Sry for the thread hijack Sky-knight.

Edit "/etc/apt/sources.list" (uncomment the debian sources)
Then run "apt-get update"
Now install usbmount (http://usbmount.alioth.debian.org/)
By running "apt-get install usbmount"
After the installation is done edit "/etc/usbmount/usbmount.conf"
Change values to:
Code:
FILESYSTEMS="ext3 ext2 vfat"
MOUNTOPTIONS="noexec,nodev,noatime"
FS_MOUNTOPTIONS="-fstype=vfat,umask=000"
Now edit your sources.list back to normal.
and run "apt-get update".

Now try attaching a usb memory.
The first device should get /media/usb0/

And again sry for the hijack.
WebFooL is online now  
Old 11-14-2009, 06:42 AM   #5 (permalink)
Master Untangler
 
Join Date: May 2009
Location: Belfast, Northern Irelaand
Posts: 226
joemailey is on a distinguished road
Send a message via MSN to joemailey
Default

Don't mean to take this off track but it seems like a good place to ask this question.

Using the reporting script that has been provided for 7.x.x would it be possible to schedule a back up of the reports to a USB drive attached to Untangle server?

As I would like to keep the reports longer than 30days.
joemailey is offline  
Old 11-14-2009, 08:07 AM   #6 (permalink)
Untangle Ninja

 
WebFooL's Avatar
 
Join Date: Jan 2009
Location: Sweden (Eskilstuna)
URLs submitted: 57
Posts: 3,882
WebFooL is on a distinguished road
Send a message via MSN to WebFooL
Default

The only thing i can think of is adding a cron job that runs:
Code:
/usr/share/untangle/bin/backup-ut/ /path/to/usb/
But Sky-knight might have another solution. (or a other member for that reason)
WebFooL is online now  
Old 11-14-2009, 10:03 AM   #7 (permalink)
Untangle Ninja
 
sky-knight's Avatar
 
Join Date: Apr 2008
Location: Phoenix, AZ
URLs submitted: 8
Posts: 15,464
sky-knight is on a distinguished road
Default

Yeah a cron job to run the backup script and copy the backup from the usual location to the USB drive should be simple enough.

And Webfool, you know I don't go around installing stuff to get things done... that's how people break on upgrade.
__________________
Rob Sandling, BS:SWE, MCP
Intouch Technology
Phone: 480-272-9889
rob@intouchtechllc.com

UntangleAppliances.com
Phone: 866-794-8879
sky-knight is online now  
Old 11-14-2009, 12:26 PM   #8 (permalink)
Untangle Ninja

 
WebFooL's Avatar
 
Join Date: Jan 2009
Location: Sweden (Eskilstuna)
URLs submitted: 57
Posts: 3,882
WebFooL is on a distinguished road
Send a message via MSN to WebFooL
Default

Yes, i know.. and every time I change the source.list a bit of me dies.
WebFooL is online now  
Old 11-16-2009, 10:50 AM   #9 (permalink)
Master Untangler
 
Join Date: Jul 2009
URLs submitted: 1
Posts: 221
alhadi is on a distinguished road
Default



My company needs a backup server like a NAS solution but then again i dont have a spare pc

can untangle help me to backup the company files ?
alhadi is offline  
Old 11-16-2009, 04:20 PM   #10 (permalink)
Master Untangler
 
Join Date: Oct 2008
Posts: 775
pirateghost is on a distinguished road
Default

Quote:
Originally Posted by alhadi View Post


My company needs a backup server like a NAS solution but then again i dont have a spare pc

can untangle help me to backup the company files ?
lets keep it simple by saying, NO.

untangle is NOT a NAS device. there are talks of adding a NAS-like module, but not at this time.

if your company doesnt have a backup solution and you are not willing to spend the money, ask yourself this, "how much will the downtime of losing data cost the company and what would happen if EVERYTHING was lost in a fire tonight?"

if it isnt you writing the checks, then ask the person writing them...how much is their data worth?
pirateghost is offline  
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 10:03 AM.


© 2010 Untangle, Inc. All Rights Reserved.   SEO by vBSEO 3.6.0 PL2