Linux partition mount

Source: Internet
Author: User

First, view disk and partition information

1. Use Fdisk to view disk capacity, cylinder, sector, and partition information: fdisk [-l] DEVICE650) this.width=650; "height=" 237 "title=" image "style=" border:0px; "alt = "image" src= "http://img1.51cto.com/attachment/201405/14/8272564_1400061447nkdy.png" border= "0"/>

Note: 1, the command is used. 2, disk capacity. 3, partition. 4, partition format ID. 5, Partition file type

2. View the kernel partition information, the profile information that is seen in the configuration file is recognized by the system:/proc/partitions

650) this.width=650; "height=" 121 "title=" image "style=" border:0px; "alt=" image "src=" http://img1.51cto.com/ Attachment/201405/14/8272564_1400061447mg3x.png "border=" 0 "/>

3. View specific partition details: tune2fs–l/dev/sda2

650) this.width=650; "height=" "title=" image "style=" border:0px; "alt=" image "src=" http://img1.51cto.com/ Attachment/201405/14/8272564_1400061447ezuv.png "border=" 0 "/>

Note: Too much content only intercepts parts, can view block size, uuid,inode size, etc.

Second, create a disk partition

1. Command: fdisk [DEVICE];

650) this.width=650; "height=" "title=" image "style=" border:0px; "alt=" image "src=" http://img1.51cto.com/ Attachment/201405/14/8272564_1400061447xev2.png "border=" 0 "/>

2. Type m at the arrow to view the options, listed below write common options

650) this.width=650; "height=" "title=" image "style=" border:0px; "alt=" image "src=" http://img1.51cto.com/ Attachment/201405/14/8272564_14000614480dme.png "border=" 0 "/>

3. We enter N to create a new partition

650) this.width=650; "height=" "title=" image "style=" border:0px; "alt=" image "src=" http://img1.51cto.com/ Attachment/201405/14/8272564_1400061448tieh.png "border=" 0 "/>

4. Hard disk design determines that a hard disk can only have four primary partitions, if more than one partition can be created under the extended partition logical partition, usually 3p+1e{5,6,7 ...} Such partitioning. Here we enter "E"

650) this.width=650; "height=" "title=" image "style=" border:0px; "alt=" image "src=" http://img1.51cto.com/ Attachment/201405/14/8272564_14000614486ij0.png "border=" 0 "/>

5. Prompt for the entry and exit of the partition number, usually from 1-4, because there is already a partition, so here Select 2, for multiple operations once, sequentially input can be;

650) this.width=650; "height=" 118 "title=" image "style=" border:0px; "alt=" image "src=" http://img1.51cto.com/ Attachment/201405/14/8272564_1400061448yfwb.png "border=" 0 "/>

6. Here we have a partition is finished, but the partition is still not available, next we reboot the system, then format it, and set the file system type, block size, and volume label.

Three, disk partition format

1.MKE2FS displaying file system Super Block information
-t {EXT2|EXT3|EXT4} indicates the type of file system created
-B {1024|2048|4096}: Indicates the block size of the disk partition,
-L <LABEL>: Setting the volume label
-m reserved percentage of total space for the block used by management
-e Setting extended properties of the file system

650) this.width=650; "height=" 393 "title=" image "style=" border:0px; "alt=" image "src=" http://img1.51cto.com/ Attachment/201405/14/8272564_1400061449lh9a.png "border=" 0 "/>

2. Use TUNESFS to modify partition information,< block size can only be determined when formatting, not modifiable >

Options are basically consistent with MKE2FS,

-L/DEV/SDB3 Viewing partition details
-L LABEL: Re-set the volume label
-M adjust the block scale reserved for management use
-R Adjust the number of blocks reserved for administrative use
-O Set Mount default option
-o Set File system default features
-e Adjusting Extended properties of the file system

How to use:

650) this.width=650; "height=" "title=" image "style=" border:0px; "alt=" image "src=" http://img1.51cto.com/ Attachment/201405/14/8272564_1400061449racu.png "border=" 0 "/>

Iv. equipment mounting; I understand that it is to allow us to access the device in the form of a file.

1.mount Usage and examples

Mount the partition/dev/sda3 to the/MNT directory

Mount [-t fstype] DEVICE Mount_point
650) this.width=650; "height=" "title=" image "style=" border:0px; "alt=" image "src=" http://img1.51cto.com/ Attachment/201405/14/8272564_1400061449soqa.png "border=" 0 "/> Note: The file system can be specified when mounted

2. After the device is mounted, it is not written to the system configuration file, if you want to automatically mount the boot can modify the/etc/fstab file,

650) this.width=650; "height=" 218 "title=" image "style=" border:0px; "alt=" image "src=" http://img1.51cto.com/ Attachment/201405/14/8272564_14000614491dyo.png "border=" 0 "/>

Note: Backup options: 0, no backup, 1, daily backup, 2, Alternate day backup

Self-Test sequence: 0, no self-test; 1, first self-test < usual root directory with >;2, second self-test




Now/dev/sda3 mount to/mnt completed

This article is from the "Drops of love and tears to throw red beans" blog, please be sure to keep this source http://beijgh.blog.51cto.com/8272564/1411224

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.