We have a server running CentOS 6.4 with a 4TB drive partitioned as show below:
Code:
Model: ATA WDC WD4001FAEX-0 (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 10.7GB 10.7GB ext3 boot
2 10.7GB 3898GB 3888GB primary
3 3898GB 3950GB 51.2GB primary
4 3950GB 4001GB 51.2GB primary
I'm formatting this drive as ext4:
Code:
# mkfs.ext4 -K /dev/sdb2
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
103071744 inodes, 412262144 blocks
20613107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
12582 block groups
32768 blocks per group, 32768 fragments per group
8192 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
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
Instead of the expected 3.7TB or so, the size of my file system is only 1.5TB:
Code:
# mount /dev/sdb2 /data
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md0 9.9G 2.0G 7.5G 21% /
tmpfs 16G 0 16G 0% /dev/shm
/dev/sdb2 1.6T 197M 1.5T 1% /data
The maximum ext4 file system though I believe is 16TB (assuming 1K = 1024). So what trick is needed to achieve this?
The problem does end there for us. What we really want to do is to use the raw partition as a virtual drive under a KVM based VM. The same limit is seen there though, before we even format it. We specify /dev/sdb2 as a virtual drive mapped to /dev/vdb, but when the virtual machine boots /dev/vdb is reported as being only 1689GB in size instead of the expected 3888GB in size.
It seems awfully suspicious that the maximum ext4 filesystem we can create with this partition is 1.5TB in size, and the same raw partition mapped to a virtual drive under a KVM VM also maxes out at 1.5TB.
Is there some obvious explanation here?