[NBLUG/talk] USB Memory Keys
Mark Street
jet at sonic.net
Sun Dec 21 23:29:00 PST 2003
I was going to get one of these today, 256M. I held back....
You have to take it down to a lower level.
LABEL, you can move SCSI or IDE disks around on the bus/ribbon without having
to UPdate /etc/fstab. You may notice in /etc/fstab lines that begin with a
LABEL=BOOT instead of a device /dev/sda1. Remember, there are limited writes
on these devices, you might want to set your fstab to not keep track of
access times on files. This is done with the tune2fs command.
tune2fs man page
-L volume-label
Set the volume label of the filesystem. Ext2 filesystem labels
can be at most 16 characters long; if volume-label is longer
than 16 characters, tune2fs will truncate it and print a warn-
ing. The volume label can be used by mount(8), fsck(8), and
/etc/fstab(5) (and possibly others) by specifying LABEL=vol-
ume_label instead of a block special device name like /dev/hda5.
man parted
parted will work for labelling a vfat partition, mklabel will link with the
appropriate device. I am sure you can do a search on the net for this.
Then you can use devlabel to have the system link to the device when it is
plugged in.
keywords, parted, mklabel, devlabel, usb, scsi, linux
SYNOPSIS
devlabel [action] [options]
DESCRIPTION
devlabel is a script which manages symlinks to storage devices on your
system. This is accomplished by utilizing the inherent unique identi-
fiers (UUID) that each device *should* have in order to maintain a cor-
rectly pointing symlink in the event that the device name changes (eg.
/dev/sdc1 becomes /dev/sdd1). By adding entries using devlabel its
users can instead reference all devices by their symlink and no longer
care what the true name of their device is. Similary, consistent raw
device access can also be guaranteed through use of devlabel as it
treats entries in the format of /dev/raw/raw# as a special form of sym-
link so that each raw device can consistently be bound to the correct
storage device.
devlabel works with both IDE and SCSI storage and has been integrated
into the hotplug system to allow USB, IEEE1394 (firewire) and PCI
detection and consistency.
On Sunday 21 December 2003 22:50, Jeremy Turner wrote:
> Hi all,
>
> I got a Lexar USB JumpDrive 2.0 for Christmas (okay, so we celebrated a
> little early this year), and with 2.6.0 and 2.4.22 it works just fine
> with the usb-storage driver and SCSI emulation. Very nice.
>
> Okay, so here's my issue. I now have three USB devices which use SCSI
> emulation (my Nikon Coolpix 4300 digital camera, the JumpDrive, and a
> Compact Flash reader). How do I deal with multiple devices using
> /dev/sdX and plugged in at different times? For example:
>
> ----- /etc/fstab ----- (relevant portion)
> /dev/sda1 /mnt/cf vfat uid=jeremy,gid=jeremy,user 0 2
> /dev/sdb1 /mnt/jumpdrive vfat uid=jeremy,gid=jeremy,user 0 2
> ----- end /etc/fstab -----
>
> If I unplug the CF reader and the JumpDrive, and replugin the JumpDrive
> only, it gets registered as /dev/sda1. The /etc/fstab manpage mentions
> labling an entry by LABEL='' or UUID='', but I can't seem to find a
> LABEL or UUID entry mentioned in the syslog.
>
> What I'd like to do is write a hotplug script to auto-mount the drive
> for me, but it doesn't seem like hotplug passes the right environment
> variables for me to figure out which sdX the device got!
>
> Anyone else ran into this problem before?
--
Mark Street, D.C.
Red Hat Certified Engineer
Cert# 807302251406074
--
Key fingerprint = 3949 39E4 6317 7C3C 023E 2B1F 6FB3 06E7 D109 56C0
GPG key http://www.streetchiro.com/pubkey.asc
More information about the talk
mailing list