Add a hard drive to Linux in the virtual machine

Source: Internet
Author: User

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

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.