Link to home
Start Free TrialLog in
Avatar of Techie solution
Techie solution

asked on

Rename Hardisk in RHEL 6.4

HI I created a vm (RHEL 6.4). added 2 hard disk. I am done with all the installation and configuration but now I need to rename the second hardisk but I don't know how to do it.

Please advice.
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

use e2label with the device name followed by the new name
for example, to change the device sda1 to foo, do:

e2label /dev/sda1 foo
Technically, e2label is labeling a file system, /dev/sda1 is a file system.

But you are mentioning a harddisk, this would be /dev/sda - if you do want to label a harddisk then you cannot do that with e2label.

You can set the File System Volume label like this:
# tune2fs -L samba /dev/sda1

To show the name:
# tune2fs -l /dev/sda1
tune2fs 1.42.5 (29-Jul-2012)
Filesystem volume name:   samba
...

How do you display the current name of your harddisk?
Avatar of Techie solution
Techie solution

ASKER

It is showing as

Disk /dev/sdb: 536.9 GB, 536870912000 bytes
ASKER CERTIFIED SOLUTION
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am sorry Gerwin for awarding B grade but I always give A for the answer with some KB articles or some reference . No doubt your reply was also awesome and a knowledge to me but I didn't wanted to hurt you.