- 论坛徽章:
- 0
|
[root@T8223-2-slot2 etc]# parted /dev/sdb #/dev/sdb是大容量磁盘的设备名
GNU Parted 1.6.19
Copyright (C) 1998 - 2004 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Using /dev/sdb
(parted) help # 输入help可查看当前可用的所有命令
check MINOR do a simple check on the filesystem
cp [FROM-DEVICE] FROM-MINOR TO-MINOR copy filesystem to another partition
help [COMMAND] prints general help, or help on COMMAND
mklabel LABEL-TYPE create a new disklabel (partition table)
mkfs MINOR FS-TYPE make a filesystem FS-TYPE on partititon MINOR
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a filesystem
move MINOR START END move partition MINOR
name MINOR NAME name partition MINOR NAME
print [MINOR] display the partition table, or a partition
quit exit program
rescue START END rescue a lost partition near START and END
resize MINOR START END resize filesystem on partition MINOR
rm MINOR delete partition MINOR
select DEVICE choose the device to edit
set MINOR FLAG STATE change a flag on partition MINOR
(parted) mklabel # malabel 可将该磁盘转移成GPT磁盘
New disk label type? [gpt]? gpt # 输入 gpt 类型
(parted) print # 打印当前配置信息
Disk geometry for /dev/sdb: 0.000-7131527.500 megabytes
Disk label type: gpt
Minor Start End Filesystem Name Flags
(parted) mkpart # mkpart 可对该磁盘进行分区
Partition type? [primary]? primary # 分区类型为主分区primary
File system type? [ext2]? ext3 # 文件系统类型默认为ext2,可选ext3
Start? 0 # 起始为0 MB
End? -1 # 终止于-1 MB,也即磁盘最末端
(parted) print # 查看当前配置信息
Disk geometry for /dev/sdb: 0.000-7131527.500 megabytes
Disk label type: gpt
Minor Start End Filesystem Name Flags
1 0.017 7131526.500 ext3
(parted) quit
Information: Don't forget to update /etc/fstab, if necessary.
[root@T8223-2-slot2 etc]# fdisk -l
Disk /dev/sda: 145.9 GB, 145999527936 bytes
…………. # 为节省版面,部分内部省略
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 7477.9 GB, 7477948579840 bytes
255 heads, 63 sectors/track, 909142 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 267350 2147483647+ ee EFI GPT
(parted) quit # 退出即可,不需要专门保存的命令
Information: Don't forget to update /etc/fstab, if necessary.
|
|