Add a virtual hard disk and partition on a Linux virtual machine

Source: Internet
Author: User

Add a virtual hard disk

Specify disk space

A 20G hard drive was added to the virtual machine successfully. In Linux this defines SDA as the first hard disk, the second hard disk as SDB, and so on. SDA1 is the first partition of the first hard disk.

Partitioning operations on Linux

View information for loading a hard disk on a virtual machine


Start partition: Terminal input: Fdisk/dev/sdb

To view partition information:

Create primary partition (the primary partition can have up to four, if multiple partitions are required to create a virtual partition

Operation to delete a partition:

To create a new extended partition:

The re-built expansion partition is then created under the first extended partition to create the expanded partition.

Saving partition information and performing partitions

Make file system (format)

Mkfs:make FileSystem

Extended partitions do not need to be formatted

Mount: Yes partition disks can appear as directories in the system

Mount Mount

This is the process by which the entire virtual machine loads the hard disk. In reality it is necessary to load the hard drive in addition to the operation in the virtual machine by the actual operation done. The rest of the partitions, execution, mount operations are the same.

Add a virtual hard disk and partition on 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: 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.