[svlug] question re: label ext3 external drive using tune2fs

Darlene Wallach freepalestin at dslextreme.com
Thu Jan 3 07:24:54 PST 2008


Robert Citek wrote:
> On Dec 29, 2007 8:33 PM, Darlene Wallach <freepalestin at dslextreme.com> wrote:
>> My question was in regards to this specific part of tune2fs:
>>
>> -L volume-label
>> Set  the volume label of the filesystem. ...
>> The volume label can be used by mount(8), fsck(8), and
>> /etc/fstab(5) (and  possibly  others) by specifying
>> LABEL=volume_label instead of a block special device name
>> like /dev/hda5.
>>
>> Does that specific feature of labeling a drive make sense
>> to use?
> 
> Yes, especially for removable drives.  However, I would use e2label
> instead of tune2fs:
> 
> $ e2label /dev/sdc2 MyLabel
> 
>> i.e. what does it do in regards to mount(8),
>> fsck(8), and /etc/fstab(5)?
> 
> It allows you to use the label instead of the device name.
> 
>> What would I type to take advantage of the above described
>> feature of "-L volume-label"?
> 
> $ fsck LABEL=Mylabel
> $ mount -L MyLabel
> $ mount -l
> 
> Gnome makes use of labels when mounting removable drive.  For example,
> instead of finding your device at /media/sdc2, it will be at
> /media/MyLabel.  At least that's been my experience with Ubuntu.
> 
> You can also use labels in grub.  That's a real convenience when
> booting from removable media, e.g. external USB drives.
> 
> In addition to labels, all those commands can use UUID=, which works
> the same way as a label except it has a defined structure.  To
> generate a UUID you can use uuidgen.  For example,
> 
> $ tune2fs -U $(uuidgen) /dev/sdc2
> $ tune2fs -U random /dev/sdc2
> 
> Good luck and please let us know how things go.
> 
> Regards,
> - Robert
> 

Robert,

Thank you for answering my questions!

I have already labeled the 400G drive. I'm considering labeling
the 160G drive too.

Why do you prefer e2label over tune2fs to label a disk drive?

Darlene Wallach




More information about the svlug mailing list