We help IT Professionals succeed at work.

Rename Hardisk in RHEL 6.4

Techie solution
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.
Watch Question

Seth SimmonsSr. Systems Administrator

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
Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016

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?
Techie solutionVMware Specialist


It is showing as

Disk /dev/sdb: 536.9 GB, 536870912000 bytes
Topic Advisor
Most Valuable Expert 2016
/dev/sdb is the harddisk, you cannot label that, but a file system (or partition) you can, so for example:

# tune2fs -L YourLabelHere /dev/sdb1

Which command did you use to get the above information?
Techie solutionVMware Specialist


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.