Partitioning of Linux disks

Source: Internet
Author: User

The composition of the disk:

Tracks: Track

Sectors: Sector (512 bytes)

Head: Head

Cylinder: Cylinder

Mbr/msdos partition mode

1--4 primary partition, or 0--3 primary partition plus an extended partition (n logical partitions)

Maximum supported disks with a capacity of 2.2TB.

The extended partition cannot be formatted.

First, see which disks are currently available

ls/dev/sd*

Lsblk

Ii. Division of partitions

View Partition table: FDISK/DEV/SDA

Common Interactive directives:

M: List specified help

P: View the existing partition table

N: New Partition

D: Delete partition

Q: Discard Changes and exit

W: Save Changes and exit


Third, the format of

MKFS Tools

MKFS.EXT3 Partition Device Path

MKFS.EXT4 Partition Device Path

MKFS.XFS Partition Device Path

MKFS.VFAT-F 32 Partition Device path

Example MKFS.EXT3/DEV/SDA1

Mkfs.ext4/dev/sda2

Mkfs.xfs/dev/sda3


Iv. Mounting and use

Example Mkdir/part1

Mout/dev/sda1/part1

V. Viewing mount Usage

Df-h (detects that there are currently no mounted devices to mount)

Refresh Partition Table Partprob

Boot Auto Mount Vim/etc/fstab

Format: Device path mount point type parameter backup mark detection order

Example/dev/sda1/part1 ext3 defaults 0 0

(You can also replace the device path with the UUID, Blkid view the partition UUID file system)

MOUNT-A (detect/etc/fstab boot automatically mount configuration file, format is correct)

Steps:

1. LSBLK View Hard Drive information

2. Fdisk partitioning

3. Partprob refresh, new partition table

4. MKFS.XFS formatted partition

5. Mount Mount Test

6. Vim/etc/fstab Boot automatically mount




Partitioning of Linux disks

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.