Linux disk Create extended partition

Source: Internet
Author: User

Add a disk under Linux (CentOS6.5) to create an extended partition and mount it.


1. Check if the system recognizes the hardware and see that the/dev/sdb disk in the red box has not yet created the partition.

Note: If you do not recognize the need to restart the computer, or turn off the computer restart can be recognized.

#fdisk-L

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8A/13/wKioL1gl2YWSGVSsAABE-wrdp2A426.png-wh_500x0-wm_3 -wmp_4-s_2163652177.png "title=" Extended partition 1.png "alt=" Wkiol1gl2ywsgvssaabe-wrdp2a426.png-wh_50 "/>


2. Create an extended partition

#fdisk/dev/sdb

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8A/13/wKioL1gl3GPCbd-iAABvXeCOad4039.png-wh_500x0-wm_3 -wmp_4-s_3938642513.png "title=" Extended partition 2.png "alt=" Wkiol1gl3gpcbd-iaabvxecoad4039.png-wh_50 "/>


3. The extended partition was created successfully, but the extended partition cannot be used directly, and the logical partition on the extended partition will be created if you want to use it.

#fdisk-L

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8A/13/wKioL1gl3Sej4z29AABUFpJa4F8620.png "title=" Extended partition 3.png "alt=" Wkiol1gl3sej4z29aabufpja4f8620.png "/>


4. Creating Logical partitions

#fdisk/dev/sdb

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8A/17/wKiom1gl3p-AHNrXAABKhK266HY464.png "title=" Extended partition 4.png "alt=" Wkiom1gl3p-ahnrxaabkhk266hy464.png "/>


5. Check to see if the logical partition was created successfully.

#fdisk-L

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/8A/17/wKiom1gl3zqiwgXEAABXb9rsAjI910.png "title=" Extended partition 5.png "alt=" Wkiom1gl3zqiwgxeaabxb9rsaji910.png "/>

6. After the creation, format the disk, directly enter the command and wait to complete.

# MKFS.EXT4/DEV/SDB5

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8A/13/wKioL1gl39_SfdHKAABbxruKvJA219.png "title=" Extended partition 6.png "alt=" Wkiol1gl39_sfdhkaabbxrukvja219.png "/>


7. Mount, I mount to the/data directory and see the red box mounted successfully.

#mkdir/data

#mount/dev/sdb5/data

#mount

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8A/13/wKioL1gl4PbysyL2AAAh3wmNkyk209.png "title=" Extended partition 7.png "alt=" Wkiol1gl4pbysyl2aaah3wmnkyk209.png "/>


8. Permanent mount, the above mount after restarting the computer will not be, need to mount each time, here set the system boot automatically mount.

# Vi/etc/fstab

Write the following:

/dev/sdb5/data EXT4 Defaults 0 0

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8A/17/wKiom1gl4Z2yDGlvAAAD0420EDo268.png "title=" Extended partition 8.png "alt=" Wkiom1gl4z2ydglvaaad0420edo268.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8A/13/wKioL1gl4l7h2kkKAAA3ov058Ck861.png "title=" Extended partition 9.png "alt=" Wkiol1gl4l7h2kkkaaa3ov058ck861.png "/>


9. Review the results.

# df-h

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8A/14/wKioL1gl42qzvNIyAAASTd1vlgI216.png "title=" Extended partition 10.png "alt=" Wkiol1gl42qzvniyaaastd1vlgi216.png "/>

All right, mount the disk and you're done.



This article is from the "Enlightened Grocery store" blog, please be sure to keep this source http://wutou.blog.51cto.com/615096/1871961

Linux disk Create extended partition

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.