b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

西部数码云服务器:如何使用fdisk命令进行分区?

电脑杂谈  发布时间:2021-06-04 03:06:00  来源:网络整理

云服务器硬盘如何分区?一般在安装云服务器操作系统的过程中,我们已经对系统硬盘进行了分区,但是如果你添加了一个新的硬盘,想要正常使用,Linux下有专门的分区命令fdisk和parted。

fdisk 命令比较常用,但不支持大于 2TB 的分区;如果需要支持大于 2TB 的分区,则需要使用 parted 命令。当然,parted 命令也可以分配更小的分区。我们先来看看如何使用fdisk命令进行分区。

固态硬盘和机械硬盘的分区_混合硬盘怎么分区_服务器硬盘分区

fdisk 命令的格式如下:

[root@localhost ~]# fdisk ~l
#列出系统分区
[root@localhost ~]# fdisk 设备文件名
#给硬盘分区

注意,不要尝试在当前硬盘上使用 fdisk。这将彻底删除整个系统。一定要找到另一个硬盘或使用虚拟机。

以硬盘/dev/sdb为例进行练习,命令如下:

服务器硬盘分区_固态硬盘和机械硬盘的分区_混合硬盘怎么分区

[root@localhost ~]# fdisk /dev/sdb
#给/dev/sdb分区
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xed7e8bc7.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated.it's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u').
Command (m for help):m
#交互界面的等待输入指令的位置,输入 m 得到帮助
Command action
#可用指令
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
I 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 verity the partition table
w write table to disk and exit
x extra functionality (experts only)

注意这里的分区命令是“fdisk /dev/sdb”。这是因为硬盘没有分区。使用 fdisk 命令的目的是创建一个分区。

西数云服务器简单易用,稳定可靠,主机vCPU和内存性能指标行业领先,满足不断变化的用户需求。云服务器产品链接


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/dianqi/article-380277-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      • 冷慧聪
        冷慧聪

        自己一不留神成为首富就不知道话怎么讲了

      • 洪子舆
        洪子舆

        你如果在伊拉克对美国说“关你鸟事”

      • 杨勇
        杨勇

        它仍然会嬉皮笑脸的试探

      热点图片
      拼命载入中...