File systems do have limits. Thats no surprise. ext3 had a limit at 16 TB file system size. If you needed more space you´d have to ...
File systems do have limits. Thats no surprise. ext3 had a limit at 16 TB file system size. If you needed more space you´d have to use another file system for instance XFS or JFS or spilt the capacity into multiple mount points.
ext4 was designed to allow far more larger file systems than ext3. According to wikipedia ext4 has a maximum file system size of 1 EiB (approx. one exabyte or 1024 TB).
Now if you´d try to create one single large file system with ext4 on every linux distribution out there (including OEL 6.1; as of 18th August 2011) you will end up with:
[root@localhost ~]# mkfs.ext4 /dev/iscsi/test mke4fs 1.41.9 (22-Aug-2009)mkfs.ext4: Size of device /dev/iscsi/test too big to be expressed in 32 bit susing a blocksize of 4096.
This post is about how to solve the issue.
The demo system
My demo system consists of one large LUNof 18 TB encapsulated in LVM with a logical volume of 17 TB on a Oracle Enterprise Linux (OEL 5.5):
[root@localhost ~]# uname -aLinux localhost.localdomain 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.5 (Tikanga)
[root@localhost ~]# fdisk -l /dev/sdbDisk /dev/sdb: 19791.2 GB, 19791209299968 bytes255 heads, 63 sectors/track, 2406144 cylinders Units = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdb doesn't contain a valid partition table [root@localhost ~]# vgdisplay iscsi--- Volume group ---VG Name iscsiSystem IDFormat lvm2Metadata Areas 1Metadata Sequence No 2VG Access read/writeVG Status resizableMAX LV 0Cur LV 1Open LV 0Max PV 0Cur PV 1Act PV 1VG Size 18.00 TBPE Size 4.00 MBTotal PE 4718591Alloc PE / Size 4456448 / 17.00 TBFree PE / Size 262143 / 1024.00 GBVG UUID tdi4f2-3ZYr-c1P0-NuSl-i3w2-5qQl-K75guj
[root@localhost ~]# lvdisplay iscsi--- Logical volume ---LV Name /dev/iscsi/testVG Name iscsiLV UUID 8q1UrT-ludC-FEkT-NExO-4Gzd-cn5H-FYJcB1LV Write Access read/writeLV Status available# open 0LV Size 17.00 TBCurrent LE 4456448Segments 1Allocation inheritRead ahead sectors auto- currently set to 256Block device 253:2
Creating file systems larger than 16TB with ext4:
If you try to create a ext4 file system on the 17 TB logical volume:
[root@localhost ~]# mkfs.ext4 /dev/iscsi/test mke4fs 1.41.9 (22-Aug-2009)mkfs.ext4: Size of device /dev/iscsi/test too big to be expressed in 32 bit susing a blocksize of 4096.
OK. Maybe with ext4dev:
[root@localhost ~]# mkfs.ext4dev /dev/iscsi/test mke4fs 1.41.9 (22-Aug-2009)mkfs.ext4dev: Size of device /dev/iscsi/test too big to be expressed in 32 bits using a blocksize of 4096.
Nope – no success. The reason behind that are the e2fsprogs (or how they are called on OEL: e4fsprogs) are not able to deal with file systems larger than ~ 16 TB.
To be specific: Even with the most recent e2fsprogs 1.41.14 there is no way to create file systems larger than 16 TB.
But: According to this post it should work since June:
It’s taken way too long, but I’ve finally finished integrating the 64-bit patches into e2fsprogs’s mainline repository. All of the necessary patches should now be in the master branch for e2fsprogs. The big change from before is that I replaced Val’s changes for fixing up how mke2fs picked the correct fs-type profile from mke2fs.conf with something that I think works much better and leaves the code much cleaner. With this change you need to add the following to your /etc/mke2fs.conf file if you want to enable the 64-bit feature flag automatically for a big disk:
[fs_types] ext4 = {
原标题:分区容量大于16TB的格式化
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。