#命令行方式
#删除磁盘初始化,可选
parted /dev/vdb mklabel gpt
#初始化磁盘
parted /dev/vdb mkpart primary 0TB 16.5TB
parted /dev/vdb mkpart primary 0% 100% (需要多大磁盘就选多大)
[root@file ~]# parted /dev/vdb
GNU Parted 3.1
Using /dev/vdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: Virtio Block Device (virtblk)
Disk /dev/vdb: 44.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 30.7TB 30.7TB primary
(parted) mkpart
Partition name? []? vdb2
File system type? [ext2]? ext4
Start? 30.7TB
End? 100%
(parted) quit
Information: You may need to update /etc/fstab.
[root@file ~]# lsblk
需求说明:
云服务器上买了一块8T的磁盘,准备挂载到服务器上的/data目录下。
===================================parted命令说明======================================
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
***************当你发现自己的才华撑不起野心时,就请安静下来学习吧***************