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.