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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.