当前位置:网站首页>fdisk分区,gdisk添加磁盘,parted进行磁盘分区,parted新增分区,临时挂载和永久挂载
fdisk分区,gdisk添加磁盘,parted进行磁盘分区,parted新增分区,临时挂载和永久挂载
2022-07-31 05:18:00 【m0_59138290】
文章目录
使用fdisk对/dev/nvme0n1剩余空间进行分区
[[email protected] ~]# fdisk /dev/nvme0n1
Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): n
Partition type
p primary (2 primary, 0 extended, 2 free)
e extended (container for logical partitions)
Select (default p):
Using default response p.
Partition number (3,4, default 3):
First sector (78301184-83886079, default 78301184):
Last sector, +sectors or +size{K,M,G,T,P} (78301184-83886079, default 83886079):
Created a new partition 3 of type 'Linux' and of size 3.9 GiB.
Command (m for help): p
Disk /dev/nvme0n1: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x38d65830
Device Boot Start End Sectors Size Id Type
/dev/nvme0n1p1 * 2048 2099199 2097152 1G 83 Linux
/dev/nvme0n1p2 2099200 78301183 76201984 36.3G 8e Linux LVM
/dev/nvme0n1p3 78301184 83886079 5584896 3.9G 83 Linux
新添加一块儿磁盘使用gdisk,设置gpt分区表,新建分区
[[email protected] ~]# gdisk /dev/nvme0n2
GPT fdisk (gdisk) version 1.0.3
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y
Command (? for help): n
Partition number (1-128, default 1):
First sector (34-2097118, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-2097118, default = 2097118) or {+-}size{KMGTP}:
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 8e00
Changed type of partition to 'Linux LVM'
Command (? for help): p
Disk /dev/nvme0n2: 2097152 sectors, 1024.0 MiB
Model: VMware Virtual NVMe Disk
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 6555EB8D-7C16-4D0F-A0BC-35B51F7535F1
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 2097118
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 2097118 1023.0 MiB 8E00 Linux LVM
使用parted对新添加的磁盘添加分区(交互式)
(parted) mkpart rhcas1 200M 500M
(parted) p
Model: NVMe Device (nvme)
Disk /dev/nvme0n2: 1074MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 200MB 500MB 300MB rhcsa1
使用parted对/dev/nvme0n1新增分区(命令式)
[[email protected] ~]# parted /dev/nvme0n2
GNU Parted 3.2
Using /dev/nvme0n2
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Error: /dev/nvme0n2: unrecognised disk label
Model: NVMe Device (nvme)
Disk /dev/nvme0n2: 1074MB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
(parted) mklabel gpt
(parted) mkpart
Partition name? []? gzw1
File system type? [ext2]? ext4
Start? 0
End? 1074MB
Warning: The resulting partition is not properly aligned for best performance: 34s % 2048s != 0s
Ignore/Cancel? Ignore
(parted) p
Model: NVMe Device (nvme)
Disk /dev/nvme0n2: 1074MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 1074MB 1074MB ext4 rhcsa1
挑选任一分区,进行格式化挂载(临时挂载)
[[email protected] ~]# mkfs -t xfs /dev/nvme0n2p1
挑选另一分区,进行格式化挂载(永久挂载)
[[email protected] ~]# vim /etc/fstab
边栏推荐
- vs2022 xlua 集成第三方库编译报错Generator Visual Studio 15 2017 could not find any instance of Visual Studio.
- mPEG-DSPE 178744-28-0 Methoxy-polyethylene glycol-phosphatidylethanolamine linear PEG phospholipids
- UR3机器人雅克比矩阵
- 堆和栈的区别
- Unity Text一个简单的输入特效
- 通过js禁止ctrl+滚轮放缩浏览器页面,禁止用手势放大
- Pytorch study notes 13 - Basic_RNN
- ImportError: cannot import name 'Xxxx' from partially initialized module 'xx.xx.xx'
- Software Testing Interview Questions 2021
- PyTorch Study Notes 08 - Loading Datasets
猜你喜欢

什么样的人不适合入行编程?你真的适合学习编程吗?

C语言静态变量static

MW: 3400 4-Arm PEG-DSPE four-arm-polyethylene glycol-phospholipid a saturated 18-carbon phospholipid

Remote file xxx is mapped to the local path xxx and can't be found. You can continue debugging....

Rejection sampling note

哈希表基础

Unity软件中UGUI和NGUI的多语言开发

DSPE-PEG-Thiol DSPE-PEG-SH phospholipid-polyethylene glycol-thiol liposome for later use

Research reagents Cholesterol-PEG-Maleimide, CLS-PEG-MAL, Cholesterol-PEG-Maleimide

VRchat_udon脚本介绍:傻瓜式教程教你如何实现VRchat地图的功能
随机推荐
DOM操作案例1-点击,使表格的颜色切换(点击单元格,整行或整列颜色切换)
The solution to the IDEA console not being able to enter information
ES6-箭头函数
TCP与UDP协议的区别,以及TCP的三次握手和四次挥手
超详细!!!让你了解冒泡排序的底层逻辑和思想
日志jar包冲突,及其解决方法
四种常见的POST提交数据方式
Hyperparameter Optimization - Excerpt
Solution for MySQL The table is full
mobaxterm 编码问题解决
C语言数组的深度分析
哈希表基础
国际站卖家大促攻略,只需要做好这几件事
Research reagents Cholesterol-PEG-Maleimide, CLS-PEG-MAL, Cholesterol-PEG-Maleimide
UE5 最新动态虚幻引擎全新版本引爆互联网
Webrtc从理论到实践二: 架构
衡量 DevOps 成功与否的重要度量指标
Virtual machine view port number process
ES6-class类
离线安装activeMq