parted分区

本文介绍如何使用GNUParted工具为10.6TB的磁盘/dev/vdb创建GPT分区表,并创建了一个从开始到结束的主分区。此外,还展示了如何使用mkfs.text4命令为新创建的分区/dev/vdb1格式化为ext4文件系统。

parted

[root@tlyb-db-net ~]# parted /dev/vdb

GNU Parted 2.1

Using /dev/vdb

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) mklabel gpt

Warning: The existing disk label on /dev/vdb will be destroyed and all data on this disk will be lost. Do you want to continue?

Yes/No? yes

(parted) mkpart primary 0 -1

Warning: The resulting partition is not properly aligned for best performance.

Ignore/Cancel? I

(parted) p

Model: Virtio Block Device (virtblk)

Disk /dev/vdb: 10.6TB

Sector size (logical/physical): 512B/512B

Partition Table: gpt

 

Number Start End Size File system Name Flags

1 17.4kB 10.6TB 10.6TB primary

 

(parted) q

Information: You may need to update /etc/fstab.

 

[root@tlyb-db-net ~]# fdisk -l

 

Disk /dev/vda: 107.4 GB, 107374182400 bytes

16 heads, 63 sectors/track, 208050 cylinders

Units = cylinders of 1008 * 512 = 516096 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00017a0f

 

Device Boot Start End Blocks Id System

/dev/vda1 * 3 409 204800 83 Linux

Partition 1 does not end on cylinder boundary.

/dev/vda2 409 33697 16777216 82 Linux swap / Solaris

Partition 2 does not end on cylinder boundary.

/dev/vda3 33697 208051 87874560 83 Linux

Partition 3 does not end on cylinder boundary.

 

WARNING: GPT (GUID Partition Table) detected on '/dev/vdb'! The util fdisk doesn't support GPT. Use GNU Parted.

 

 

Disk /dev/vdb: 10630.0 GB, 10630044057600 bytes

255 heads, 63 sectors/track, 1292362 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/vdb1 1 267350 2147483647+ ee GPT

[root@tlyb-db-net ~]# mkfs -t ext4 /dev/vdb1

mke2fs 1.41.12 (17-May-2010)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

648806400 inodes, 2595225351 blocks

129761267 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4294967296

79200 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, 550731776, 644972544, 1934917632,

2560000000

 

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

 

This filesystem will be automatically checked every 29 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值