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!