Add a hard disk to the Linux operating system under VMWare

Source: Internet
Author: User
Article Title: Add a hard disk to the Linux operating system under VMWare. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

First, add a hard disk to the VM, that is, "Edit virtual machine settings". Add a hard disk to the VM, which is generally a SCSI device.

Specify the disk capacity, and restart the instance to enter the system.

Root User operation:

Fdisk-l will see a new setting. If you have a hard disk (sda1, sda2 ......), The new one should be (/dev/sdb ).

It indicates that the system has identified this hard disk. Next we will partition and Format this hard disk.

Fdisk/dev/sdb (if you add IDE settings, hdx will be used) x represents a number. You can find the specific information on the Internet.

For detailed parameter descriptions of fdisk, you can see it using -- help or search for a partition management tool on the Internet.

I just want to add a partition, so select n to create a partition, and then select the partition type. e I select the primary, and then it will let you enter the partition size, I chose the default disk space.

Then w save and quit!

The partition is complete. Use fdisk-l to view the partition, you will find one more/dev/sdb1, if it is IDE/dev/hdb1 and so on (if you do not understand it, you can look for information about LINUX Disk Partitions ).

We cannot use this hard disk now. Why? Not formatted!

Mdfs. ext3/dev/sdb1 format the specified partition, and so on. Most of the current systems are in the ext3 format. If you need another one, the help of the mkfs command can help you!

The hard drive is mounted!

My operation is to copy everything in/home to the new disk partition. Of course, pay attention to attributes such as file permission and owner.

Cp-pR can help you deal with this, and then delete the original/home.

Modify/etc/fstab to mount/dev/sdb1 to the/home partition and restart!

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.