当前位置:网站首页>Parted command
Parted command
2022-07-02 01:35:00 【Reef of】
Although we can use fdisk Command to partition the hard disk quickly , But for higher than 2TB Hard disk partition , This command is powerless , You need to use parted command
parted Commands can be partitioned and formatted directly on the command line , however parted Interactive mode is the more common command mode , The way to enter the interactive mode is as follows :
[[email protected] ~]# parted Hard disk device file name # Then it will enter interactive mode for example : [[email protected] ~]# parted /dev/sda [[email protected] ~]# parted /dev/sda GNU Parted 3.1 Use /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) # Entered interactive mode , You need to enter an interactive command Common steps of creating partition mount : [[email protected] ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 893.8G 0 disk ├─sda1 8:1 0 512M 0 part /boot ├─sda2 8:2 0 65G 0 part / ├─sda3 8:3 0 8G 0 part [SWAP] ├─sda4 8:4 0 1K 0 part └─sda5 8:5 0 820.3G 0 part /home sdb 8:16 0 1.8T 0 disk [[email protected] ~]# echo -e "mklabel gpt\nmkpart primary 1 100%\nquit\n" | parted /dev/sdb # notes :———————————————————————————————— Before this command echo As input , That is, entering parted The command that interacts with the system after the command , There is a line break in the middle , As an interactive command input, it is like this mklabel gpt # Create a new disk volume label gpt mkpart primary 1 100% # Create a partition , Capacity 100%, The default is create 1 quit # sign out ———————————————————————————————————— [[email protected] ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 893.8G 0 disk ├─sda1 8:1 0 512M 0 part /boot ├─sda2 8:2 0 65G 0 part / ├─sda3 8:3 0 8G 0 part [SWAP] ├─sda4 8:4 0 1K 0 part └─sda5 8:5 0 820.3G 0 part /home sdb 8:16 0 1.8T 0 disk └─sdb1 8:17 0 1.8T 0 part [[email protected] ~]# mkfs.ext4 /dev/sdb1 [[email protected] ~]# mount /dev/sdb1 /disk1/ [[email protected] ~]# blkid /dev/sda1: UUID="46e19b44-67ee-4aa5-9251-540bfe66a280" TYPE="xfs" /dev/sda2: UUID="b7c41386-7cba-43ce-bac5-c2a65f9026fd" TYPE="xfs" /dev/sda3: UUID="86df7f15-8813-4e5b-be2b-6f4493a34f03" TYPE="swap" /dev/sda5: UUID="473fb6a5-bf51-4027-b099-48c39e7fd549" TYPE="xfs" /dev/sdb1: UUID="01c8de08-059f-414a-b005-d8700eb67084" TYPE="ext4" PARTLABEL="primary" PARTUUID="db1d94c5-6f5c-442b-8c87-c892fb194ae8" [[email protected] ~]# vim /etc/fstab # # /etc/fstab # Created by anaconda on Mon Jan 10 07:05:59 2022 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # UUID=b7c41386-7cba-43ce-bac5-c2a65f9026fd / xfs defaults 0 0 UUID=46e19b44-67ee-4aa5-9251-540bfe66a280 /boot xfs defaults 0 0 UUID=86df7f15-8813-4e5b-be2b-6f4493a34f03 swap swap pri=0,defaults 0 0 UUID=473fb6a5-bf51-4027-b099-48c39e7fd549 /home xfs defaults,noatime,nobarrier 0 0 UUID=01c8de08-059f-414a-b005-d8700eb67084 /disk1 xfs defaults 0 0 # add to # Save and exit [[email protected] ~]# df -hT Filesystem Type Size Used Avail Use% Mounted on devtmpfs devtmpfs 16G 0 16G 0% /dev tmpfs tmpfs 16G 0 16G 0% /dev/shm tmpfs tmpfs 16G 25M 16G 1% /run tmpfs tmpfs 16G 0 16G 0% /sys/fs/cgroup /dev/sda2 xfs 65G 2.3G 63G 4% / /dev/sda1 xfs 506M 136M 371M 27% /boot /dev/sda5 xfs 820G 560M 820G 1% /home tmpfs tmpfs 3.2G 0 3.2G 0% /run/user/0 /dev/sdb1 ext4 1.8T 77M 1.7T 1% /disk1parted Interactive commands say bright check NUMBER Do a simple file system test cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER Copy the file system to another partition help [COMMAND] Show all command help mklabel,mktable LABEL-TYPE Create a new disk volume label ( Partition table ) mkfs NUMBER FS-TYPE Establish a file system on the partition mkpart PART-TYPE [FS-TYPE] START END Create a partition mkpartfs PART-TYPE FS-TYPE START END Create partitions , And establish a file system move NUMBER START END Mobile partition name NUMBER NAME Name the partition print [devices|free|list,all|NUMBER] Show partition table 、 Mobile devices 、 Free space 、 All divisions quit sign out rescue START END Fix missing partitions resize NUMBER START END Change partition size rm NUMBER Delete partition select DEVICE Select the device you want to edit set NUMBER FLAG STATE Change partition mark toggle [NUMBER [FLAG]] Switch the state of partition table unit UNIT Set the default units Version Display version
边栏推荐
- How does schedulerx help users solve the problem of distributed task scheduling?
- Leetcode, 3 repeatless longest subsequence
- TSINGSEE青犀平台如何实现同一节点同时播放多个视频?
- 学习笔记2--高精度地图定义及价值
- Based on Simulink and FlightGear, the dynamic control of multi rotor UAV in equilibrium is modeled and simulated
- 站在新的角度来看待产业互联网,并且去寻求产业互联网的正确方式和方法
- 城市选择器组件实现原理
- [IVX junior engineer training course 10 papers] 02 numerical binding and adaptive website production
- 迁移云计算工作负载的四个基本策略
- The author is more willing to regard industrial Internet as a concept much richer than consumer Internet
猜你喜欢

游戏思考15:全区全服和分区分服的思考
![[IVX junior engineer training course 10 papers] 02 numerical binding and adaptive website production](/img/b7/aecb815ca9545981563a1e16cfa19e.jpg)
[IVX junior engineer training course 10 papers] 02 numerical binding and adaptive website production

微信小程序中使用tabBar
![[IVX junior engineer training course 10 papers to get certificates] 03 events and guessing numbers games](/img/69/44219af52baef20cedec3870147589.jpg)
[IVX junior engineer training course 10 papers to get certificates] 03 events and guessing numbers games

三分钟学会基础k线图知识

The technology boss is ready, and the topic of position C is up to you

成功实现边缘编码需要了解的六大经验教训

卷積神經網絡(包含代碼與相應圖解)
![[IVX junior engineer training course 10 papers] 05 canvas and aircraft war game production](/img/dc/e9adb1b41c2175c6f18d8027e0530a.jpg)
[IVX junior engineer training course 10 papers] 05 canvas and aircraft war game production

Learning note 24 - multi sensor post fusion technology
随机推荐
现货黄金分析的技巧有什么呢?
Architecture evolution from MVC to DDD
matlab 使用 resample 完成重采样
【疾病检测】基于BP神经网络实现肺癌检测系统含GUI界面
卷積神經網絡(包含代碼與相應圖解)
[disease detection] realize lung cancer detection system based on BP neural network, including GUI interface
Android: how can golden nine and silver ten squeeze into the first-line big factories from small and medium-sized enterprises? The depth of interview questions in large factories
Have you stepped on the nine common pits in the e-commerce system?
Exclusive delivery of secret script move disassembly (the first time)
Exclusive delivery of secret script move disassembly (the first time)
Altium designer measure distance (ctrl+m)
城市选择器组件实现原理
成功实现边缘编码需要了解的六大经验教训
Memorabilia of domestic database in June 2022
Using tabbar in wechat applet
uTools
GL Studio 5 installation and experience
The concept and application of Cartland number
CEPH buffer yyds dry inventory
Error creating bean with name ‘stringRedisTemplate‘ defined in class path re