首页 > Linux操作系统 > Linux操作系统 > 大于2T的磁盘分区方法
红帽企业 Linux 4 Update 1 提供对大于 2 terabytes(TB)的磁盘设备的支持。
在安装时,暂时不要划分大于2TB的文件分区,待安装完LINUX系统后,再参考以下操作步骤:
(由于我们没有大于2T的空间,故采用2G的盘进行测试)
[root@as4 ~]# fdisk -l
Disk /dev/sda: 35.8 GB, 35862976512 bytes
255 heads, 63 sectors/track, 4360 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 144 1052257+ 82 Linux swap
/dev/sda3 145 4360 33865020 83 Linux
Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
[root@as4 ~]# parted /dev/sdb
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.
使用 /dev/sdb
(parted) mklabel gpt
(parted) print
/dev/sdb 的磁盘几何结构:0.000-2048.000 兆字节
磁盘标签类型:gpt
Minor 起始点 终止点 文件系统 名称 标志
(parted) mkpart primary 0 2048
(parted) print
/dev/sdb 的磁盘几何结构:0.000-2048.000 兆字节
磁盘标签类型:gpt
Minor 起始点 终止点 文件系统 名称 标志
1 0.017 2047.983
(parted) quit
信息: 如果必要,不要忘记更新 /etc/fstab。
[root@as4 ~]# fdisk -l
Disk /dev/sda: 35.8 GB, 35862976512 bytes
255 heads, 63 sectors/track, 4360 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 144 1052257+ 82 Linux swap
/dev/sda3 145 4360 33865020 83 Linux
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 262 2097151+ ee EFI GPT
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 1) logical=(0, 0, 2)
Partition 1 has different physical/logical endings:
phys=(1023, 254, 63) logical=(261, 21, 16)
[root@as4 ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
262144 inodes, 524279 blocks
26213 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@as4 ~]# mount /dev/sdb1 /mnt
[root@as4 ~]# df -h
Filesystem 容量 已用 可用 已用% 挂载点
/dev/sda3 32G 2.6G 28G 9% /
/dev/sda1 99M 12M 82M 13% /boot
none 252M 0 252M 0% /dev/shm
/dev/sdb1 2.0G 36M 1.9G 2% /mnt
参考信息:
Linux下使用大于2T的块设备
http://blog.chinaunix.net/u/31580/showart_351382.html
Large File Support in Linux
http://www.suse.de/~aj/linux_lfs.html
以下内容摘自 Redhat :
红帽企业 Linux 4 Update 1 提供对大于 2 terabytes(TB)的磁盘设备的支持。
在 红帽企业 Linux 4 发行版本中对这个功能的支持比较有限,而 Update 1 大大
提高了对这个功能的支持(在用户空间程序和内核两个方面)。通常情况下,要支
持大于 2TB 的磁盘设备需要 Update 1。
请注意,以下的条件和限制与大容量设备的支持有关:
· 一般的磁盘设备是以512个字节为单位寻址的。SCSI 命令中的地址的大小就决定
了所支持的最大的设备容量。 SCSI 命令集包括 16 位地址(设备的容量被限制为
2GB)、 32 位地址(寻址范围限制在2TB)和 64 位地址。2.6 内核中 的 SCSI
子系统支持64位的命令。要支持大于 2TB 的磁盘,Host Bus Adapter(HBA)、
HBA 驱动程序和存储设备必须也支持 64 位地址。Red Hat 已经在一个
Winchester Systems FX400(需要 rev. 3.42B 或更高)中的一个 8TB 的逻辑单
元中测试了红帽企业 Linux 4 Update 1 提供的 QLogic qla2300 驱动和 Emulex
lpfc 驱动。
· 常用的 MS-DOS 分区表格式不能在一个大于 2TB 的设备上使用。要支持大于2TB
的设备,GPT 分区表格式必须被使用,并且必须使用 *parted* 工具程序来创建和
管理 GPT 分区。要创建一个 GPT 分区,使用 parted 的*mklabel gpt* 命令。
Red Hat 需要所有的块设备使用一个有效的分区表来初始化设备,即使整个设备只
有一个单一的分区。这个要求可以防止由一些错误或其它分区表造成的对这个设备
的影响。
· Anaconda 安装程序当前只在 Itanium^(TM) 结构的系统上支持 GPT 分区表。因
此,您只能在 Itanium^(TM) 平台上使用 Anaconda 安装或格式化大于 2TB 的设
备,在其它平台上无法执行这些任务。
· / 和 /boot 目录必须在一个2TB 或小于 2TB 的设备中。
· 一些已知的关于大设备中的 LVM2 的问题已经在红帽企业 Linux 4 Update 1 中
被解决。在安装 Update 1 之前不要在大于 2TB 的设备上使用 LVM2。
前面提到,Red Hat 需要每个块设备上都有一个分区表,即使这个设备是 LVM2 卷
的一部分。在这种情况下,您可以在整个设备上创建一个单一的分区。然后,确定
在使用 *pvcreate* 和 *vgcreate* 命令时确定了完整的分区名(例如,
/dev/sda1 而 /不是/ /dev/sda)。
· 组成一个 md 软 RAID 的每个磁盘的最大容量要小于或等于 2TB。md RAID 设备
本身可以大于 2TB。Red Hat 已经测试了容量大到 8TB 的 md 设备。
· 已知的一些在大于 4TB 的设备上使用 *e2fsprogs* 的问题现在已在红帽企业
Linux 4 Update 1 中被解决。在 Update 1 以前的版本中,这些问题可以通过在
创建 ext2 或 ext3 文件系统的时候指定 *mke2fs -b 4096* 来解决。在 Update
1 中您不再需要这么做了。
ext2 和 ext3 文件系统本身有 8TB 的限制。在这个限制内的设备已经在红帽企业
Linux 4 Update 1 上被测试。
您可以使用 *mke2fs -T largefile4* 命令来加快大文件系统的创建速度。
· GFS 文件系统在 32 位的系统上的限制是 16TB;在64 位系统上的限制是 8
exabytes(EB)。Red Hat 已经在 8TB 的设备上测试了 GFS 文件系统。
· 大于 2TB 的 NFS 分区已被测试并被支持。
·红帽企业 Linux 4 Update 1 用户空间的工具程序被编译为支持大文件。但是,
在这种模式中测试每个程序是不可能的。当您在使用一个支持大文件的工具程序时
如果有问题,请报告您的问题。
· *inn* 程序在大于 2TB 的设备上无法正常工作。这个问题将在以后的红帽企业
Linux 发行版本中解决。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/380801/viewspace-627570/ ,如需转载,请注明出处,否则将追究法律责任。