藍色字體是輸入的命令
[root@RH2288V3 /]# parted /dev/sdb
GNU Parted 2.1
使用 /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklable
align-check TYPE N check partition N for TYPE(min|opt)
alignment
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] print general help, or help on
COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition
table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on
partition NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table,
available devices, free space, all found partitions, or a particular
partition
quit exit program
rescue START END rescue a lost partition near START
and END
resize NUMBER START END resize partition NUMBER and its file
system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition
NUMBER
unit UNIT set the default unit to UNIT
version display the version number and
copyright information of GNU Parted
(parted) mklabel
新的磁盤標籤類型? gpt
警告: The existing disk label on /dev/sdb will be destroyed and all data on this
disk will be lost. Do you want to continue?
是/Yes/否/No? yes
(parted) mkpart primary 0 2199GB
警告: The resulting partition is not properly aligned for best performance.
忽略/Ignore/放棄/Cancel? Ignore
(parted) print
Model: HUAWEI XSG1 (scsi)
Disk /dev/sdb: 2199GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name 標誌
1 17.4kB 2199GB 2199GB primary
(parted) quit
信息: You may need to update /etc/fstab.
[root@RH2288V3 /]# fdisk -l
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 2199.0 GB, 2199023255552 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 267350 2147483647+ ee GPT
Disk /dev/sdc: 2199.0 GB, 2199023255552 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sda: 1200.2 GB, 1200243695616 bytes
255 heads, 63 sectors/track, 145921 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00088d65
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 145922 1171599360 8e Linux LVM
Disk /dev/mapper/vg_rh2288v3-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_rh2288v3-lv_swap: 16.7 GB, 16693329920 bytes
255 heads, 63 sectors/track, 2029 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
WARNING: GPT (GUID Partition Table) detected on '/dev/mapper/FC_DISK'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/mapper/FC_DISK: 2199.0 GB, 2199023255552 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/mapper/FC_DISKp1 1 267350 2147483647+ ee GPT
Disk /dev/mapper/vg_rh2288v3-lv_home: 1129.3 GB, 1129333129216 bytes
255 heads, 63 sectors/track, 137300 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
[root@RH2288V3 /]# partprobe /dev/sdb
[root@RH2288V3 /]# mkfs.ext4 /dev/mapper/FC_DISKp1
mke2fs 1.41.12 (17-May-2010)
文件系統標籤=
操作系統:Linux
塊大小=4096 (log=2)
分塊大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
134217728 inodes, 536870903 blocks
26843545 blocks (5.00%) reserved for the super user
第一個數據塊=0
Maximum filesystem blocks=4294967296
16384 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000
正在寫入inode表: 完成
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成
This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@RH2288V3 FC_disk]# mount /dev/mapper/FC_DISKp1 /mnt/FC_disk
[root@RH2288V3 FC_disk]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_rh2288v3-lv_root 50G 6.0G 41G 13% /
tmpfs 16G 224K 16G 1% /dev/shm
/dev/sda1 485M 40M 420M 9% /boot
/dev/mapper/vg_rh2288v3-lv_home 1.1T 201M 983G 1% /home
/dev/mapper/FC_DISKp1 2.0T 199M 1.9T 1% /mnt/FC_disk