LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-27-2006, 02:00 PM   #1
BradMofo
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
Backup SVN to USB Brive


I am trying to backup my SVN to a USB HD. I have very limited knowledge of RedHat Linux. I have mounted the HD and everything looks ok

Here are my "dmesg" results


usb 1-5: new high speed USB device using address 7
scsi5 : SCSI emulation for USB Mass Storage devices
Vendor: Hitachi Model: HTS424030M9AT00 Rev: MAAO
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sda: 58605120 512-byte hdwr sectors (30006 MB)
sda: assuming drive cache: write through
sda: sda1
Attached scsi disk sda at scsi5, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi5, channel 0, id 0, lun 0, type 0
USB Mass Storage device found at 7


My question is can i simply unplug this drive and take it with me? When i return can i simply plug this back in and not have to do any thing else? Any settings in the backup job i need to set?

Any help would be appreciated.
 
Old 09-28-2006, 04:24 PM   #2
soggycornflake
Member
 
Registered: May 2006
Location: England
Distribution: Slackware 10.2, Slamd64
Posts: 249

Rep: Reputation: 31
Quote:
My question is can i simply unplug this drive and take it with me?
Yes, but obviously unmount the filesystem first.

Quote:
When i return can i simply plug this back in and not have to do any thing else?
That depends on whether you have any other SCSI devices (memory sticks, cameras, etc) plugged in at the same time. If that is the case, the device (/dev/sd?) may change. The best solution to this is to use udev to assign a specific device node to the device.

Assuming that you have udev installed and working, which it should be on any recent distro, you'd add something like this to /etc/udev/rules.d/10-local.rules (create the file if it doesn't exist, you will need to be root for this, of course):

Code:
BUS="scsi", KERNEL="sd?", SYSFS{model}="MODEL NAME", SYSFS{vendor}="VENDOR NAME", NAME="%k", SYMLINK="myusbdrive"
BUS="scsi", KERNEL="sd?1", SYSFS{model}="MODEL NAME", SYSFS{vendor}="VENDOR NAME", NAME="%k", SYMLINK="myusbdrive1"
This will create the device nodes /dev/sda and /dev/sda1 but symlink /dev/myusbdrive and /dev/myusbdrive1 to them, respectively, so you can reference /dev/myusbdrive instead (the point being that it might end up as /dev/sdb or /dev/sdc, depending on whatever else you have plugged in, but by using /dev/myusbdrive, you don't have to worry about what the actual device name is).

Of course, change "myusbdrive" to whatever you want. You get the MODEL NAME and VENDOR NAME from

Code:
udevinfo -a -p /sys/block/sda
Some drives/devices may not have anything particularly descriptive here, my cf card reader has vendor name "Generic" and model name " CF" (there are about 10 spaces there). It doesn't really matter, as long as it is unique. You can use any other values from the output of udevinfo too, such as SYSFS{rev}="1.6E" or whatever you have. Just use as much as you need to ensure a unique identity amongst the devices you have (usually the vendor and model names will suffice).

Then modify the entry in /etc/fstab appropriately, e.g.

Code:
/dev/myusbdrive1 /mount_point <whatever_your_fs_type_is> <whatever_options_you_want> 0 0
All the above is optional, of course, if you only have that 1 drive, you can get away with using /dev/sda[1], but if you ever get another SCSI device, then udev is the way to assign them consitent device names.

Last edited by soggycornflake; 09-28-2006 at 04:30 PM.
 
Old 09-29-2006, 01:12 AM   #3
BradMofo
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks Sogg ill give that a try
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
anon svn read-only over apache: '.svn/entries': No such file hedpe Linux - Software 2 04-29-2009 06:31 AM
SVN Help Crobat Linux - Software 1 07-18-2006 05:56 PM
USB Tape Backup VickJ55 Linux - Hardware 2 06-29-2005 10:59 AM
External USB backup plnelson Linux - Newbie 2 10-12-2004 10:57 AM
USB tape backup fly.fisher Linux - Distributions 0 07-16-2001 10:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration