1、安装parted和gdisk工具。您可以使用以下命令在CentOS中安装它们:
dnf install -y parted gdisk
2、使用parted工具创建GPT分区表。使用以下命令打开parted:
parted /dev/sdX
请注意将X替换为您要分区的硬盘的字母标识符。在parted中,您可以使用以下命令创建GPT分区表:
mklabel gpt
mkpart extended 0% 100% (扩展分区extended ,主分区primary ,并使用整个硬盘)
print (查看一下)
quit
3、格式化新的分区。在创建新分区后,您需要格式化它以便在CentOS中使用。使用以下命令格式化分区:
如果使用XFS文件系统:
mkfs.xfs /dev/sdX1
如果使用EXT4文件系统:
mkfs.ext4 /dev/sdX1
4、挂载新分区。最后一步是将新分区挂载到CentOS文件系统中。使用以下命令挂载分区:
mount /dev/sdX1 /mnt/your_mount_point
5、重启开机自动挂载硬盘
编辑/etc/fstab文件
vi /etc/fstab
/dev/sdX1 /mnt/your_mount_point ext4 defaults 0 0
其中,
[硬盘设备文件名]为硬盘设备的文件名,
[挂载目录]为上一步中创建的目录,
[文件系统类型]为硬盘分区的文件系统类型,
defaults表示使用默认挂载选项,
0 0表示在启动时自动挂载。
hey there and thank you for your information – I have definitely picked up
something new from right here. I did however expertise a few
technical issues using this site, since I experienced to reload the site lots of times previous to I could get it to load correctly.
I had been wondering if your web hosting is OK? Not that I’m complaining,
but slow loading instances times will sometimes affect your placement in google
and can damage your quality score if ads and marketing with Adwords.
Well I am adding this RSS to my email and could look out for a lot more of your respective fascinating content.
Make sure you update this again very soon.. Escape rooms hub
Rattling wonderful info can be found on website.!
I like this site very much, Its a really nice post
to read and incur info.Leadership
Very wonderful information can be found on web site. Travel blog