Linux下使用大于2T的块设备
2024-08-28 00:18:32
供稿:网友
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