百度智能云

All Product Document

          Dedicated Cloud Compute

          Mount the SATA Disk of the Big Data Model DCC

          The big data model DCC supports mounting of one or more SATA disks, and partitioning and formatting of disks. This document takes the creation of a dedicated instance with all resources as an example. The creation procedure is as follows:

          Mount SATA Disks

          Enter the number of SATAs to be mounted in the disk configuration item.

          After the mounting is successful, log in to the DCC to view the current disk status:

          After entering fdisk -l, you can see that the system has identified 7 hard disks.

          Partition and Format Disks

          Partition and format disks separately:

          1. When only one partition is required, you can format the disk directly without partitioning the disk. The sample command is as follows (you can also specify formatting parameters upon your business needs).

          mkfs.ext4 -m0 /dev/vdb

          Please perform the above operation on 7 hard disks respectively. When repeating the above operation, you need to modify the disk name, such as /dev/vdc, /dev/vdd, etc.

          When formatting disks in batch, you can refer to the following commands. Because the disk capacity is large, and the formatting may take a long time. Please wait patiently.

             mkfs.ext4 -m0 /dev/vdb;
             mkfs.ext4 -m0 /dev/vdc;
             mkfs.ext4 -m0 /dev/vdd;
             mkfs.ext4 -m0 /dev/vde;
             mkfs.ext4 -m0 /dev/vdf;
             mkfs.ext4 -m0 /dev/vdg;
             mkfs.ext4 -m0 /dev/vdh
          1. When multiple partitions are required, because the capacity of a single disk is more than 2 T, please perform partitions with the command parted. Afterwards, format the disk with the command mkfs.ext4 according to the said instruction.

          Write a Mount Point

          After formatting the partitioning have been completed, you need to modify the /etc/fstab file and write the device’s mount point. After that, when the dedicated instance restarts, these disks can be mounted normally.

          1. Create a mount point. Let’s take using "/home/disk[1-7]" as an example. If you need to use other mount points, you can create one by yourself:

            for i in $(seq 7); do mkdir /home/disk$i; done

          2. Modify the /etc/fstab file and write the device name, mount point, file system and other information:

            echo "/dev/vdb /home/disk1 ext4 defaults 0 0" >> /etc/fstab; echo "/dev/vdc /home/disk2 ext4 defaults 0 0" >> /etc/fstab; echo "/dev/vdd /home/disk3 ext4 defaults 0 0" >> /etc/fstab; echo "/dev/vde /home/disk4 ext4 defaults 0 0" >> /etc/fstab; echo "/dev/vdf /home/disk5 ext4 defaults 0 0" >> /etc/fstab; echo "/dev/vdg /home/disk6 ext4 defaults 0 0" >> /etc/fstab; echo "/dev/vdh /home/disk7 ext4 defaults 0 0" >> /etc/fstab;

          After the said steps have been completed, execute the command mount -a to mount all partitions. At this time, you can view the information of the successfully mounted disks with the command df.

          Previous
          Operate a Dedicated Instance
          Next
          Use the Image