Linux Learning note--linux Disk Management

Source: Internet
Author: User

The partition management tools in Linux include: Fdisk, parted, Sfdisk

FDISK command can manage up to 15 partitions for a hard disk

Command format: Fdisk-l [-u] [device ...]

Fdisk device can then type the corresponding key value to operate

P:print, showing existing partitions;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/72/0E/wKioL1XceyzyUpIRAADV2YK_3Fs051.jpg "title=" capture. PNG "alt=" Wkiol1xceyzyupiraadv2yk_3fs051.jpg "/>

N:new, creating

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/72/40/wKiom1XfCgHB428iAAA-bpQVQo4478.jpg "title=" Qq20150827205943.png "alt=" Wkiom1xfcghb428iaaa-bpqvqo4478.jpg "/>

E: Create an extended partition

P: Create primary partition

D:delete, deleting

W:write, write to disk and exit

Q:quit, discard the update and exit

M: Get Help

L: The partition ID of the list

T: adjust the partition ID

The file system needs to be created after the partition is created, and the corresponding command has

MKFS command:

(1) # MKFS. Fs_type/dev/device

Ext4

XFS

Btrfs

VFAT

(2) # mkfs-t Fs_type/dev/device


-L ' LABEL ': Set volume label


Mke2fs:ext Series file system dedicated management tools

-t {EXT2|EXT3|EXT4}

-B {1024|2048|4096}

-L ' LABEL '

-j: Equivalent to-t ext3

MKFS.EXT3 = mkfs-t ext3 = mke2fs-j = Mke2fs-t ext3

-I #: Create an inode for each number of bytes in the data space, which should not be less than the size of the block;

-N #: How many inode to create for the data space;

-M #: Percentage of space reserved for managers;

-O feature[,...] : Enable the specified attribute

-O ^feature: Turn off specified attributes

Mkswap: Creating Swap partitions

Mkswap [Options] Device

-L ' LABEL '


There are also other tools that are commonly used

Blkid: Block Device properties Information view

Blkid [OPTION] ... [DEVICE]

-U UUID: Find the corresponding device based on the specified UUID

-L Label: finds the corresponding device according to the specified label

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/72/40/wKiom1XfDjWjr8NdAAG6_Iik6Jg365.jpg "title=" Qq20150827211738.png "alt=" Wkiom1xfdjwjr8ndaag6_iik6jg365.jpg "/>


E2label: Manage Label for ext series File system

# E2label DEVICE [LABEL]


TUNE2FS: Reset the values of the EXT series file system adjustable parameters

-L: View the specified file system super block information; Super Block

-L ' LABEL ': Modify volume label

-M #: Fixed percentage of space reserved for administrators

-j: Upgrade ext2 to Ext3

-o: File System Properties enabled or disabled

-o: Adjust default mount options for the file system

-U uuid: Modify the UUID number;


DUMPE2FS:

-H: View Super block information


File system Detection Related commands

Fsck:file System CheCk

Fsck. Fs_type

Fsck-t Fs_type

-A: Auto fix error

-r: Interactive fix error


Note:fs_type must be the same as the file type on the partition;


E2fsck:ext series file-specific detection and repair tool

-Y: Auto answer yes;

-F: Forced repair;

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/40/wKiom1XfDuyRnwvUAAIbT-8kOYU674.jpg "title=" Qq20150827212119.png "width=" 564 "height=" 274 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:564PX;HEIGHT:274PX; "alt = "Wkiom1xfduyrnwvuaaibt-8koyu674.jpg"/>

Linux Learning note--linux Disk Management

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.