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

Partitioning tools with parted-- greater than 2T

2025-03-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

Summary: parted is a disk partitioning tool

The traditional MBR partitioning method has one limitation:

Cannot support hard disk partitions that exceed 2TB (or a single partition exceeds 2TB)

If it is greater than 2T, use the concept of GPT partition

The partition table of GPT solves the problem that traditional MBR cannot exceed the limit of 2TB.

However, in linux systems, traditional fdisk commands cannot support gpt partitioning.

The operation of parted is real-time:

That is to say, if you execute a partition command, it will actually partition, instead of, like fdisk, you need to execute the w command to write the changes made, so testing parted should never be used in a production environment.

How to use it:

Interactive:

Parted / dev/sdb

Mklabe gpt-- > yes modify the partition format to gpt

# create Partition method

# mkpart PART-TYPE [FS-TYPE] START END

# mkpart partition type file system type start and end location

Mapart primary 0 1000-> Ignore creates a primary partition with a size of 1000m

Mkpart primary linux-swap 1001 2000 create swap Partition

Mkpart logical ext4 2001 5000 create logical partitions

P View the partitions that have been created

Rm NUMBER deletes a partition, represented by a serial number

Non-interactive:

Parted / dev/sdb mklabe gpt YES

Parted / dev/sdb mapart primary 0 1000 Igore

Parted / dev/sdb mkpart primary linux-swap 1001 2000 Ignore

Parted / dev/sdb mkpart logical ext4 2001 5000

Parted / dev/sdb p

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

Network Security

Wechat

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

12
Report