Outline
1. Add a piece of more than 2TB hard drive
2. Try fdisk on more than 2TB partitions
3. Using the parted partition
1. You can see Adding a hard drive more than 2T
[Email protected] ~]# fdisk-l
disk/dev/sda:21.4 GB, 21474836480 bytes
255 heads, Sectors/track, 2610 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Device boot start end blocks id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 274 2096482+ 82 Linux swap/solaris
/dev/sda3 275 2610 18763920 83 Linux
disk/dev/sdb:3221.2 GB, 3221225472000 bytes
255 heads, Sectors/track, 391625 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Disk/dev/sdb doesn ' t contain a valid partition table
2. Try to partition SDB with Fdisk
[Email protected] ~]# Fdisk/dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF Disklabel
Building a new DOS disklabel. Changes'll remain in memory only,
Until decide to write them. After that, of course, the previous
Content won ' t be recoverable.
The number of cylinders for this disk was set to 391625.
There is nothing wrong with the, but this is larger than 1024,
And could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from the other OSs
(e.g., DOS fdisk, OS/2 fdisk)
Warning:the size of this disk is 3.2 TB (3221225472000 bytes).
DOS partition table format can is used on drives for volumes
Larger than 2.2 TB (2199023255040 bytes). Use parted (1) and GUID
Partition table Format (GPT).
Description Fdisk does not support more than 2TB partitions
Warning:invalid flag 0x0000 of partition Table 4 would be a corrected by W (rite)
Command (M for help): M
Command action
a toggle a bootable flag
b Edit BSD Disklabel
c Toggle the DOS compatibility flag
d D Elete a partition
l list known partition types
m Print this menu< br> n Add a new partition
o Create a new empty DOS partition table
p Print the partition table
q quit without saving changes
s Create a new empty Sun Disklabel
t Change a partition ' s system ID
&nbs p; u Change display/entry units
v Verify the partition table
& nbsp w write table to disk and exit
x Extra functionality (experts only)
Command (M for help): Q
[Email protected] ~]# uname-r
2.6.18-371.el5
[Email protected] ~]# cat/etc/redhat-release
CentOS release 5.10 (Final)
3. Partitioning with parted
[Email protected] ~]# Parted/dev/sdb
GNU Parted 1.8.1
Using/dev/sdb
Welcome to GNU parted! Type ' help ' to view a list of commands.
(parted) Mklabel GPT--format an MBR disk as GPT
(parted) Print#打印当前分区
Model:vmware, VMware Virtual S (SCSI)
Disk/dev/sdb:3221gb
Sector size (logical/physical): 512b/512b
Partition TABLE:GPT
Number Start End Size File system Name Flags
(parted) Mkpart primary 0 3.2tb ---# a primary partition of 3.2T
(parted) print
Model:vmware, VMware Virtual S (SCSI)
Disk/dev/sdb:3221gb
Sector size (logical/physical): 512b/512b
Partition TABLE:GPT
Number Start End Size File system Name Flags
1 17.4kB 3221GB 3221GB Primary
(parted) quit
Information:don ' t forget to update/etc/fstab, if necessary.
4. Then format into ext3
[[email protected] ~]# mkfs.ext3/dev/sdb1
mke2fs 1.39 (29-may-2006)
Filesystem label=
OS Type:linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
393216000 inodes, 786431991 blocks
39321599 Blocks (5.00%) reserved for the Super User
First Data block=0
Maximum filesystem blocks=4294967296
24000 block GR Oups
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'll be automatically checked every mounts or
Whichever comes first. Use Tune2fs-c or-i to override.
[Email protected] ~]#
5. Then mount the partition with Mount
[Email protected] ~]# MKDIR/GPT
[Email protected] ~]# MOUNT/DEV/SDB1/GPT
[Email protected] ~]# df-h
Filesystem Size used Avail use% mounted on
/dev/sda3 18G 2.3G 15G 14%/
/DEV/SDA1 99M 12M 82M 13%/boot
Tmpfs 1005M 0 1005M 0%/dev/shm
/DEV/SDB1 2.9T 200M 2.8T 1%/gpt
6. Finally modify the/etc/fstab, add the following two lines, let it automatically mount the boot.
/dev/sdb1/gpt ext3 defaults,noatime 1 2
This article is from the "Steven diligence in the Hippie:" blog, please be sure to keep this source http://steven2.blog.51cto.com/855881/1532042