1, view the partition

# Fdisk -l // view an existing hard disk and partition / dev / sdb is the new 3TB hard drive.


Disk / dev / sda: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


    Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          13      104391   83  Linux

/dev/sda2              14        2610    20860402+  8e  Linux LVM


Disk /dev/sdb: 3324.3 GB, 3324304687104 bytes

255 heads, 63 sectors/track, 404157 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


Disk /dev/sdb doesn't contain a valid partition table


2, partition
# parted / dev / sdb // as / dev / sdb hard disk partition

GNU Parted 1.8.1

Use of / dev / sdb

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

(Parted) mklabel gpt // convert your hard disk to GPT

(Parted) mkpart // Create a partition

Partition name? []? // directly enter

File system type? [Ext2]? // directly enter, you can enter ext3 or xfs other formats

The starting point? 0 // partition start

The end point? -1 -1 // partition end all hard disk space

(Parted) p // view the partition results


Model: VMware, VMware Virtual S (scsi)

Disk /dev/sdb: 3324GB

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

Partition Table: gpt


Number  Start   End     Size    File system  Name  标志

1 17.4kB 3324GB 3324GB                        


(Parted) quit // Exit

                               


# Fdisk -l // view the existing partitions and hard disk / dev / sdb1 is the new 3TB partition partition table EFI GPT.


Disk / dev / sda: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


    Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          13      104391   83  Linux

/dev/sda2              14        2610    20860402+  8e  Linux LVM


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


WARNING: The size of this disk is 3.3 TB (3324304687104 bytes).

DOS partition table format can not be used on drives for volumes

larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID

partition table format (GPT).


Disk /dev/sdb: 3324.3 GB, 3324304687104 bytes

255 heads, 63 sectors/track, 404157 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


    Device Boot      Start         End      Blocks   Id  System

/ Dev / sdb1 1 267350 2147483647+ ee EFI GPT


3, format
# mkfs -t ext4 / dev / sdb1 

mke2fs 1.39 (29-May-2006)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

405798912 inodes, 811597575 blocks

40579878 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=0

24768 block groups

32768 blocks per group, 32768 fragments per group

16384 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


Writing inode tables: done                           

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done


This filesystem will be automatically checked every 31 mounts or

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


4, Mount
# mkdir / test // Create a directory / test.

# Mount / dev / sdb1 / test // to mount the partition to the / test.

# Df -h // Check the mounted directory.

File system capacity has been available with a mount point%

/ Dev / mapper / VolGroup00-LogVol00

                       15G  3.0G   11G  22% /

/dev/sda1              99M   13M   82M  13% /boot

tmpfs                 2.0G     0  2.0G   0% /dev/shm

/ Dev / sdb1 3.0T 200M 2.9T 1% / test // has been able to successfully mount a. 3TB