Full diagram of adding a new hard disk to a Linux virtual machine

Source: Internet
Author: User

To view the articles on the Web, I will add a new hard disk to the VM virtual machine linuxredhat, the process is as follows:

1. Select "VM"----"setting" and open, position the cursor on hard disk, then click the Add button below

2. Click Next to perform the next step

3. Follow the prompts to create a virtual disk and click Next

4, according to the default, select the SCSI format of the disk, click Next to perform the next step

5, follow the default click Next to complete the virtual disk add

The following is an introduction to how the new virtual disks are mounted in Linux and widows in virtual machines

Second, the virtual machine in Windows to Virtual disk mount

method is simple compared to the actual computer, as long as the newly created Vdisk is formatted in Device Manager, it will be used normally

Settings based on Windows are simpler, so there is no

1. Right-click on "My Computer"-"Manage"-"Disk Management" and you will see that the newly allocated disk does not have a partition

2. Right-click on "New Volume" (unpartitioned disk), select "New", follow the wizard, select the hard disk partition mode, format the hard drive to use

Third, the virtual machine in Linux for virtual disk mount

1. Use the "fdisk-l" command to view the current system's partitions (if the system was run when the vmware--setting was set up, the situation would occur: No new disk is recognized as SDB), workaround, restart the virtual machine: Shutdown-r now

2, if the first step is to shut down the system in the virtual machine, then use the "fdisk-l command (root user) will appear when the new disk SDB (but the prompt is not partitioned)

3. Partition and format the new disk:

Input Fdisk/dev/sdb

Terminal will prompt: Command (m for help):

4, on the basis of the previous step input: M will appear the following prompt:

5. Then follow the prompts to enter: N

The following prompt appears, and then enter P and 1 to

The start and end addresses of the volume are then indicated, and the default is to press ENTER (meaning that only one zone is divided)

6. Enter "W" to Save and launch

7, re-use "fdisk-l" this command to see the/DEV/SDB1 (indicating that the partition work has been completed)

8, the new partition to format: Format the ext3 file system can be

Mkfs.ext3/dev/sdb1

Or one of the following: mkfs-t ext3/dev/sdb1

Appears proceed anyway? (y,n), enter the "Y" carriage return.

9, the following is for the Sub-district of the/DEV/SDB1 this partition to mount and access

9, 1 manual mount: use MOUNT/DEV/SDB1/directories to mount (self-defined)

On Access: the CD/mount directory can be stored and accessed

Such as:

After the format is complete, all we have to do is to set the mount point on the new hard drive, we can create a new directory, for example: Mkdir/newdisk and then mount the new hard drive to this location: Mount/dev/sdb1/newdisk, it's mounted.

, take a look: DF

(This is SDB)

9, 2 automatic mount: Modify/etc/fstab can

Use Vim/etc/fstab to open the configured file and add the following line of text

/dev/sdb1/newdisk (You can set this mount directory yourself) ext3 defaults 0 0

Full diagram of adding a new hard disk to a Linux 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.