例如使用fdisk命令:$ sudofdisk/dev/sdbCommand (m forhelp): nPartition typep primary (0 primary, 0 extended, 4 free)e extended (container forlogical partitions)Select (default p): pPartition number (1-4, default 1): 1First sector (2048-209715199, default 2048):Last sector, +sectors or ...
Using default value146800639Partition1oftypeLinux and of size70GiB issetCommand(mforhelp): w(保存对分区表的更改并退出) The partition table has been altered!Calling ioctl()to re-read partition table. Syncing disks.# 此时再使用命令查看fdisk-l# 可能返回以下内容Disk /dev/vda:53.7GB,53687091200bytes...
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 l list known partition types m print this menu n add a new partition // 添加一个新的分区 o create a new empty DOS partition table p print ...
Command (m for help):mCommand action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition 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...
#指定要分区的硬盘,进入分区模式[root@localhost ~]#fdisk /dev/vdbWelcome to fdisk (util-linux 2.23.2). Changes will remaininmemory only,untilyou decide to write them. Be careful before using the write command. Command (mforhelp):m#按m键查看帮助Command action ...
Selected partition1Partition type (type L to list all types):83Changed type of partition 'Linux' to 'Linux'. Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. ...
Partition type (type L to list all types): 83 Changed type of partition 'Linux' to 'Linux'. Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. 3. 格式化新分区,使用mkfs命令 ...
Syncing disks. parted命令:用于对磁盘进行高级分区操作。相比于fdisk,parted提供了更多的功能和灵活性。 # parted -hUsage: parted[OPTION]...[DEVICE[COMMAND[PARAMETERS]...]...]Apply COMMANDs with PARAMETERS to DEVICE. If no COMMAND(s)are given, run in ...
Disk identifier:0x312c67f3Device Boot Start End Blocks Id System/dev/vdb1204820684710240083LinuxCommand(mforhelp):wq ##保存并退出 The partition table has been altered!Callingioctl()to re-read partition table.Syncing disks. 第四步:格式化分区mkfs.xfs /dev/vdb1我们需要对分区格式化成想要的文件系统才...
Command(mforhelp): n First cylinder(931-2610, default931): Using default value931Last cylinder, +cylinders or +size{K,M,G}(931-2610, default2610): +1G Command(mforhelp): t#修改分区类型Partition number(1-5):5#指定所要修改分区Hex code(type L to list codes): l#查看内核支持文件系统类...