Linux Mount Aliyun Data disk

Source: Internet
Author: User
Tags aliyun

Applicable system: Linux (Redhat, Centos,debian,ubuntu)

* The Linux cloud Server data disk is not partitioned and formatted, and can be partitioned and formatted according to the following steps.

The following operation will divide the data disk into a partition to use.

1. View Data DiskBefore partitioning and formatting the data disk, using the "df–h" command, you cannot see the data disk, you can use the "fdisk-l" command to view. Such as:


Friendly tips: If you execute the fdisk-l command and find no/dev/xvdb indicating that your cloud service does not have a data disk, you do not need to mount the tutorial, which is not applicable to you at this time


2. Partition the data diskExecute "fdisk-s 56/dev/xvdb" command, partition the data disk; According to the prompt, enter "n", "P" "1", two times the carriage return, "Wq", the partition will start, will be completed soon.


3. View New PartitionsWith the "fdisk-l" command you can see that the new partition XVDB1 has been established.





4. Format the new partitionTake ext3 as an example: Use the "MKFS.EXT3/DEV/XVDB1" command to format the new partition, and the time to format varies depending on the size of the hard disk. (You can also decide to choose Other file formats, such as EXT4, etc.)


5. Add partition informationWrite new partition information using the "Echo '/dev/xvdb1/mnt ext3 defaults 0 0 ' >>/etc/fstab" (unquoted) command.
Then using the "cat/etc/fstab" command to view, the following message indicates that the write was successful. Note: ubuntu12.04 does not support barrier, so the correct wording is: Echo '/dev/xvdb1/mnt ext3 barrier=0 0 0 ' >>/etc/fstab* if it is necessary to mount the data disk to a folder separately, You can modify the/mnt section of the above command if you are using it as a separate page.


6. Mount the new partitionUse the "mount-a" command to mount the new partition, and then use the "df-h" command to view the following message stating that the mount was successful and you can start using the new partition.

Linux Mount Aliyun Data disk

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.