Add a hard drive to the Linux operating system under VMware __linux

Source: Internet
Author: User
Tags file permissions

First on the virtual machine to add a hard disk, that is, "Edit Virtual machine settings" in the inside add a hard disk, are generally SCSI devices.

Specify the hard drive capacity and reboot into the system.

Root User action:

Fdisk-l will see a new setting, if you have a hard drive (sda1, sda2 ...), the new addition should be (/DEV/SDB).

See that the system has identified the hard drive, next we give this hard disk partition, format.

Fdisk/dev/sdb (Of course if you add the IDE settings, will be HDX) x represents the number, the specific information can be found on the Internet.

Fdisk detailed parameter description, can use--help to see, also can search on the Internet, a partition management tool.

I want to add a partition is enough, so select N, create a partition, and then select the partition type, e i selected is the main, and then he will let you enter the size of the partition, I chose the default, is the entire disk space.

Then W save exit!

Finished, partition complete, with fdisk-l view, you will find a/dev/sdb1 if it is ide/dev/hdb1, and so on (if you do not know, you can find Linux disk partition related information).

We can't use this hard drive now, why? No formatting, hehe!

MDFS.EXT3/DEV/SDB1 format the specified partition, and so on, most of the current system is ext3 format, and if you need anything else, MKFS This command helps you to fix it!

The last one is to hook up the hard drive!

My operation is to copy everything under/home to a new disk partition, and of course, note the file permissions and owner attributes.

CP-PR can help you with this, and then delete what's under the original/home/.

Modify/etc/fstab put/dev/sdb1 to/home this section, reboot!

Well, my needs are done!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.