PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 24, 2012, 06:08:32 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Usb hard drive naming?  (Read 351 times)
paf077
Full Member
***
Offline Offline

Posts: 78


« on: December 23, 2011, 08:35:08 AM »

I have 2 2.5" drives that I picked up from dead laptops and they are both still good. I bought  Vantec enclosures for them and they work fine.
     Now the problem is when I connect them both to the usb ports, they both show up as 232gb devices , no names to them. I would like to give them each a name so it would be easier to get to the one I want in file manager.
      I searched the forums and googled for answers but couldn't find what I wanted , every thing in google search relates to "buntus" or debian.
     I have 2 others that show up with distinctive names as free-agent goflex and signature mini so I'd like to name these 2.
     I tried with partition manager in PCC but I didn't see a option to name a hdd. There is only one partition on each  with alot of HD home recordings on them so I don't want to reformat them if possible. I'd hate to move 400gb of data twice.

Any help would be greatly appreciated. If it can be done and as to be through the terminal specific commands would be needed.

Paf
Logged
Just18
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 4586


MLUs Forever!


« Reply #1 on: December 23, 2011, 08:40:05 AM »

You name the partitions and not the device.

How you do so depends on the filesystem on the partition.

For instance if you have an ext2/3/4 filesystem on a partition then you can use

e2label  /dev/sdXY  <name>        where X=device letter, & Y=partition number

man e2label gives the following information:
Code:
E2LABEL(8)                                                                                        E2LABEL(8)

NAME
       e2label - Change the label on an ext2/ext3/ext4 filesystem

SYNOPSIS
       e2label device [ new-label ]

DESCRIPTION
       e2label  will display or change the filesystem label on the ext2, ext3, or ext4 filesystem located on
       device.

       If the optional argument new-label is not present, e2label will simply display the current filesystem
       label.

       If  the optional argument new-label is present, then e2label will set the filesystem label to be new-
       label.  Ext2 filesystem labels can be at most 16 characters long; if  new-label  is  longer  than  16
       characters, e2label will truncate it and print a warning message.

       It is also possible to set the filesystem label using the -L option of tune2fs(8).
Logged

MLUs rule the roost!

Linux XPS 3.2.17-pclos1.pae.bfs  32 bit
Intel(R) Core(TM)2 Quad  CPU   Q9450  @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech ‎DVB-T 2 USB DTT
paf077
Full Member
***
Offline Offline

Posts: 78


« Reply #2 on: December 23, 2011, 09:31:09 AM »

Quote
You name the partitions and not the device.

I understand this but why is the other portable Usb hdd still have their names  (label) after a format to ext4??

Paf
Logged
melodie
Hero Member
*****
Offline Offline

Posts: 6007


XMMP=Jabber, free instant messaging protocol !


WWW
« Reply #3 on: December 23, 2011, 09:45:44 AM »

Quote
You name the partitions and not the device.

I understand this but why is the other portable Usb hdd still have their names  (label) after a format to ext4??

Paf


If I understand your question correctly, they still have their naming, because formatting does not change the label (name), but it changes the format of the partition. If you want the name of the (device) partition to be different, you need to invoke the command (the tool) e2label.

ie:
Quote
$ su
passwd
# e2label /dev/sdc1 mynewnicedrive

Now, would you read again what Just18 explained to you ? (try to get the eyes on the details, and ask questions again if there is something you don't understand... Wink )
Logged

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode
Just18
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 4586


MLUs Forever!


« Reply #4 on: December 23, 2011, 10:45:44 AM »

Quote
You name the partitions and not the device.

I understand this but why is the other portable Usb hdd still have their names  (label) after a format to ext4??

Paf


I could only guess as it was not I who dealt with the devices.

If for instance a partition was deleted and recreated, then the new one would not have the old details.

It could also depend on what tools were used to make the changes.

In any case, it is a simple matter to apply a Label (name) to an ext4 partition .....  as explained above.

In which case I guess the original question has been answered?

Logged

MLUs rule the roost!

Linux XPS 3.2.17-pclos1.pae.bfs  32 bit
Intel(R) Core(TM)2 Quad  CPU   Q9450  @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech ‎DVB-T 2 USB DTT
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM