请参考以下操作步骤:
注:
蓝色代表你需要使用的命令
红色代表你需要注意到的输出信息,在后续需要使用
255 heads, 63 sectors/track, 4360 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 144 1052257+ 82 Linux swap
/dev/sda3 145 4360 33865020 83 Linux
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
[root@as4 ~]# parted /dev/sdb
GNU Parted
This program is free software, covered by the GNU General Public License.
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
(parted) mklabel gpt
(parted) print
/dev/sdb 的磁盘几何结构:0.000-2048.000 兆字节
磁盘标签类型:gpt
Minor 起始点 终止点 文件系统 名称 标志
(parted) mkpart primary 0 2048
(parted) print
/dev/sdb 的磁盘几何结构:0.000-2048.000 兆字节
磁盘标签类型:gpt
Minor 起始点 终止点 文件系统 名称 标志
1 0.017 2047.983
(parted) quit
信息: 如果必要,不要忘记更新 /etc/fstab。
255 heads, 63 sectors/track, 4360 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 144 1052257+ 82 Linux swap
/dev/sda3 145 4360 33865020 83 Linux
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
/dev/sdb1 1 262 2097151+ ee EFI GPT
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 1) logical=(0, 0, 2)
Partition 1 has different physical/logical endings:
phys=(1023, 254, 63) logical=(261, 21, 16)
[root@as4 ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
262144 inodes, 524279 blocks
26213 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@as4 ~]# mount /dev/sdb1 /mnt
[root@as4 ~]# df -h
Filesystem 容量 已用 可用 已用% 挂载点
/dev/sda3
/dev/sda1
none
/dev/sdb1