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.
Techie solutionVMware SpecialistAsked:
Who is Participating?
Gerwin Jansen, EE MVETopic Advisor Commented:
/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?
Seth SimmonsSr. Systems AdministratorCommented:
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 Commented:
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 SpecialistAuthor Commented:
It is showing as

Disk /dev/sdb: 536.9 GB, 536870912000 bytes
Techie solutionVMware SpecialistAuthor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.