How Linux creates and mounts virtual disks

Source: Internet
Author: User

Steps:
(1) CreateVirtual Disk
(2) to the virtual disk Partitioning
(3) Each partition of the virtual disk Formatting
(4) MountVirtual Disk Partitions

(1) Create a virtual disk:

    1. Click Edit Virtual machine, select hard Drive (SCSI), click "Add" in the bottom left corner
      1. Select "Hard Disk" and click Next
      2. Select the disk type IDE ( This is the only option ) and click Next
      3. Select Create new Vdisk and click Next
      4. Specify a disk capacity of 1G, click Next
      5. To store the disk file by default path, click Done

(2) partition the virtual disk:

    1. Input command FDISK [disk device name] to disk partition
    2. Enter N to create a new partition where (P is the primary partition and E is the extended partition)
    3. Enter P to view all newly created partitions
    4. Enter W to save all disk partition information

      (3) The format of each partition of the virtual disk:
      1. MKFS.EXT3 [disk partition name] format partition with Ext3 file system
    5. Format all disk partitions in the same way
    6. Input command Blkid View formatting information for all disk partitions (including UUID numbers and file system types)

      (4) mount the virtual disk partitions:
    7. Edit the/etc/fstab configuration file to write the mount information of the disk partition to the file
      1th column: UUID or disk device name, it is best to write the UUID number (directly copy the Blkid command to find the UUID number)
      2nd Column: mount point, that is, mount the directory (note that a mount directory can only mount a device, the picture is a false demonstration!). )
      3rd Column: File system (be sure to match the type of file system you just looked at with the Blkid command!) )
      4th Column: Default defaults can be
      5th column: Default 0
      6th column: Default 0
    8. Use the command mount-a to mount all the partitions written in the configuration file
      Finally, use the command df-h to see if the device is mounted successfully. Over.

How Linux creates and mounts virtual disks

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.