Linux add hard disk is a solution when the original hard disk space is not enough or need to use the other hard disk, because most beginners are accustomed to using virtual machine, here to implement Linux in the VMware virtual machine to add hard disk specific steps to describe this problem in detail.
Add hard drives to Linux in VMware
1. Add a hard drive to the virtual machine in VMware's setting.
2. In VMware see the 1th hard drive is/DEV/SDA, and the 2nd hard disk is/dev/sdb
3. Create Drive information
Fdisk/dev/sdb
A. Press N to add the partition, select P (primary partition);
B. Choose 1, i.e. sdb1;
C. Then the space division, all the way to enter. The default is to use the entire disk space.
D. Then press W to write the partition information
4. Format the hard drive
Mkfs-t EXT3/DEV/SDB1
5. Create a directory that requires mount
Mkdir-p/opt
6. Mount to the specified directory
Mount/dev/sdb1/opt-o RW
7. If you need to load each boot, modify the/etc/fstab file
Add a line to the Fstab file:
/dev/sdb1/opt ext3 defaults 1 1
This allows us to solve the problem of adding hard drives to Linux on the virtual machine.
Add a hard drive to Linux in the virtual machine