Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to partition fdisk disk

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces you how to carry out fdisk disk partition, the content is very detailed, interested friends can refer to reference, I hope to help you.

basis

fdisk: Disk partition table manipulation tool

fdisk can divide a disk into partitions and specify file systems for each partition: linux, fat32

Hard disk basic concepts:

head: a tool for reading and writing from a disk, double-sided reading and writing

A magnetized area on a magnetic disk.

sector: When a track is divided into sectors, each sector is called a sector, and each sector has a capacity of 512 bytes; the smallest unit of storage

cylinder consisting of tracks with the same number (0-n from outside); the smallest unit of partition

Disk capacity =(heads)*(cylinder)*(sectors/track)*512

Units: Capacity per magnetic cylinder

Zoning principles:

The total number of primary partitions (including extended partitions) cannot exceed 4, and extended partitions cannot be enclosed between primary partitions.

Primary partition: 1-4 (vda1/vda2/vda3/vda4)

Logical partition: 5-16

Disk Capacity = Primary Partition Capacity + Extended Partition Capacity

Extended partition capacity = sum of logical partitions

Logical partitions are optional. Unpartitioned logical partitions can only be partitioned into logical partitions.

Estimate whether a hard drive is completely partitioned

1. View magnetic cylinders

2. Whether the start of the partition is the previous end+1

3. The end of the last partition is the value of cylinders

fdisk Operating hard disk (adding partitions)

Select device: fdisk device (fdisk /dev/vda)

p: List partition information

n: Add partition: (Note partition size)

e: Extended partition

p: Main partition

w: Save Exit

Q: Do not save exit

restart

New partition format: mkfs.ext3 /dev/vda3

The new partition is mounted at: mount /dev/vda4/home/data

Note:

fdisk -l Partition x does not end on cylinder boundary:

This is because modern operating systems replace the old CHS (cylinder/head/sector addressing) by LBA (sector addressing).

Use: sfdisk -uS -l Sector-based partitioning

About how to carry out fdisk disk partition to share here, I hope the above content can have some help for everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report