Linux在内核中选择支持Large Block Device时,是可以使用大于2T的块设备的。但是当使用Fdisk来查看这个块设备时,却发现最大只能显示出来2T的空间,而且使用其他的分区工具时也很难使用大于2T的块设备。
这时候可以使用parted
>>[root@hp320s ~]# parted /dev/cciss/c0d1
>> 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/cciss/c0d1
>> (parted) 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) print
>> Warning: /dev/cciss/c0d1 contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos
>> partition table, as it should. Perhaps it was corrupted - possibly by a program that doesn’t understand GPT partition tables. Or
>> perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table
>> Yes/No rm
>> Yes/No yes
>> Disk geometry for /dev/cciss/c0d1: 0.000-7766701.367 megabytes
>> Disk label type: gpt
>> Minor Start End Filesystem Name Flags
>> 1 0.017 7766701.351
>> (parted) rm
>> Warning: /dev/cciss/c0d1 contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos
>> partition table, as it should. Perhaps it was corrupted - possibly by a program that doesn’t understand GPT partition tables. Or
>> perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table
>> Yes/No yes
>> Partition number 1
>> (parted) print
>> Disk geometry for /dev/cciss/c0d1: 0.000-7766701.367 megabytes
>> Disk label type: gpt
>> Minor Start End Filesystem Name Flags
>> (parted) mklabel gpt
>> (parted) mkpart parmary 0 7766701.367
>> Partition type [primary]
>> File system type [ext2] ext3
>> Start
>> Start y
>> (parted)
>> (parted)
>> (parted) print
>> Disk geometry for /dev/cciss/c0d1: 0.000-7766701.367 megabytes
>> Disk label type: gpt
>> Minor Start End Filesystem Name Flags
>> (parted) 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) rm
>> Partition number 1
>> Error: Partition doesn’t exist.
>> (parted) p
>> Disk geometry for /dev/cciss/c0d1: 0.000-7766701.367 megabytes
>> Disk label type: gpt
>> Minor Start End Filesystem Name Flags
>> (parted)
>> (parted)
>> (parted) mklabel gpt
>> (parted) mkpart primary 0 7766701.367
>> (parted) p
>> Disk geometry for /dev/cciss/c0d1: 0.000-7766701.367 megabytes
>> Disk label type: gpt
>> Minor Start End Filesystem Name Flags
>> 1 0.017 7766701.351
>> (parted)
>> (parted) mkfs /dev/cciss/c0d1
>> Error: Expecting a partition number.
>> (parted) mkfs
>> Partition number 1
>> File system [ext2] ext3
>> No Implementation: Support for creating ext3 file systems is not implemented yet.
>> (parted)
>> (parted)
>> (parted) q
>> Information: Don’t forget to update /etc/fstab, if necessary.
>>
>> [root@hp320s ~]#
>> [root@hp320s ~]# mkfs.ext3 /dev/cciss/c0d1
>> mke2fs 1.35 (28-Feb-2004)
>> Filesystem label=
>> OS type: Linux
>> Block size=4096 (log=2)
>> Fragment size=4096 (log=2)
>> 994148352 inodes, 1988275550 blocks
>> 13514431 blocks (0.68%) reserved for the super user
>> First data block=0
>> Maximum filesystem blocks=4294967296
>> 60678 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, 1934917632
>>
>> Writing inode tables: done
>> Creating journal (8192 blocks): done
>> Writing superblocks and filesystem accounting information: done
>>
>> This filesystem will be automatically checked every 34 mounts or
>> 180 days, whichever comes first. Use tune2fs -c or -i to override.
>> [root@hp320s ~]#
>> [root@hp320s ~]#
>> [root@hp320s ~]# mount -t ext3 /dev/cciss/c0d1 /data
>> [root@hp320s ~]#
>>
>> [root@hp320s ~]# df -h
>> Filesystem Size Used Avail Use% Mounted on
>> /dev/cciss/c0d0p1 87G 2.0G 81G 3% /
>> /dev/cciss/c0d1 7.3T 82M 7.3T 1% /data
>> none 2.0G 0 2.0G 0% /dev/shm