标签:-------- sdb2 分区 partition 文件系统 new 挂载 table create
1️⃣ 虚拟机新增一块硬盘,fdisk -l
查看新增硬盘是否已识别
2️⃣ 创建主分区
[root@centos7 13:34:34 ~]#fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xd2110a41.
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
l list known partition types
m print this menu
n add a new partition -------- 创建一个新分区
o create a new empty DOS partition table
p print the partition table -------- 显示分区表
q quit without saving changes -------- 不保存退出
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit -------- 保存并退出
x extra functionality (experts only)
3️⃣ 查看当前操作系统支持的文件系统类型
[root@centos7 13:41:44 ~]#cat /proc/filesystems
4️⃣ 对sdb2创建xfs文件系统
[root@centos7 13:46:32 ~]#mkfs.xfs /dev/sdb2
meta-data=/dev/sdb1 isize=512 agcount=4, agsize=131072 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=524288, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
5️⃣ 将sdb2挂载到/test下
mount /dev/sdb2 /test
lsblk
查看当前系统的硬盘设备和所有分区以及某磁盘下的分区
标签:--------,sdb2,分区,partition,文件系统,new,挂载,table,create 来源: https://blog.csdn.net/qq_42669579/article/details/113780258
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。