Applicable system: Linux (Redhat, Centos,debian,ubuntu)
* Linux Cloud Server data disk is not partitioned and formatted, you can follow the following steps to partition and format the operation.
The following operation will divide the data disk into one partition to use.
1, view the data disk
You cannot see the data disk until you have partitioned and formatted the data disk, and you can view it using the "fdisk-l" command by using the "df–h" command. The following figure:
Friendly tip: If you execute fdisk-l command and find no/dev/xvdb indicating that your cloud service does not have a data disk, then you do not need to mount, this tutorial is not applicable to you
2. Partition the data disk
Execute the "fdisk-s 56/dev/xvdb" command to partition the data disk;
According to the prompts, enter "n", "P" "1", two times carriage return, "Wq", the partition begins, will soon complete.
3, view the new partition
Using the "fdisk-l" command, you can see that the new partition XVDB1 has been built.
4, format the new partition
The new partition is formatted using the "MKFS.EXT3/DEV/XVDB1" command, and the formatted time varies depending on the size of the hard disk.
(can also decide to choose Other file formats, such as EXT4, etc.)
5, add the partition information
Write new partition information using the "Echo '/dev/xvdb1/mnt ext3 defaults 0 0 ' >>/etc/fstab" (without quotes) command.
Then use the "cat/etc/fstab" command to view that the following information indicates a write success.
Note: ubuntu12.04 does not support barrier, so the correct wording is: Echo '/dev/xvdb1/mnt ext3 barrier=0 0 0 ' >>/etc/fstab
* If you need to mount the data disk to a separate folder, such as the separate use of the Web page, you can modify the/mnt section of the above command
6. Mount New Partition
Use the "mount-a" command to mount a new partition, and then use the "df-h" command to view it, with the following information stating that the mount is successful and you can start using the new partition.