Linux EXT3 16GB-17GB maximum filesize issue solved/how to fix

I have no idea why but mkfs.ext3 defaults to a patheticlly small blocksize of 1024 bytes/1KB (kilobyte). That means the maximum filesize is ONLY 16GB! With 2KB/2048 bytes you get a 256 GB maximum filesize, and with 4KB/4096 bytes you get 2TB!

I finally noticed/paid attention to this after realizing that with rsync and scp that no file larger than 17GB could be transferred. I then realized it must be a file size limit on the partition.

Here is what tune2fs told me about it (pay attention to the block size in bold,it's only 1024 bytes which means maximum 16GB filesize, this won't do for virtual VMWare disks):

tune2fs -l /dev/sda3
tune2fs 1.40-WIP (14-Nov-2006)
Filesystem volume name:
Last mounted on:
Filesystem UUID: 640b832c-1662-4c5c-96cb-da906c7c17ae
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal filetype needs_recovery sparse_super large_file
Filesystem flags: signed directory hash
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 118187008
Block count: 945489508
Reserved block count: 47274475
Free blocks: 272940854
Free inodes: 117274575
First block: 1
Block size: 1024
Fragment size: 1024
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 1024
Inode blocks per group: 128
Filesystem created: Thu Dec 10 12:45:25 2009
Last mount time: Fri Mar 12 22:32:11 2010
Last write time: Fri Mar 12 22:32:11 2010
Mount count: 4
Maximum mount count: 38
Last checked: Thu Dec 10 12:45:25 2009
Check interval: 15552000 (6 months)
Next check after: Tue Jun 8 13:45:25 2010
Reserved blocks uid: 0 (user extauditaccount)
Reserved blocks gid: 0 (group unknown)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: tea
Directory Hash Seed: 99a10ab1-7c5c-4b94-9b14-29d05c309a77
Journal backup: inode blocks

Fix/Change FileSize Limit for EXT3 by changing the Block Size

The good news is that this is fixable, but it ends there. There's no way to set the blocksize except during the format when you run mkfs.ext3 -b 4096.

So you'll have to backup your data to another partition/system/drive and then reformat the partition making sure you specify the proper block size.

Update

The default block size (if not specified) is from the /etc/mke2fs.conf file which looks like this:

You can use what I've shown below if this file does not exist on your system (like in my case).

[defaults]
base_features = sparse_super,filetype,resize_inode,dir_index
blocksize = 4096
inode_ratio = 8192

[fs_types]
small = {
blocksize = 1024
inode_ratio = 4096
}
floppy = {
blocksize = 1024
}
news = {
inode_ratio = 4096
}
largefile = {
inode_ratio = 1048576
}
largefile4 = {
inode_ratio = 4194304
}


Tags:

linux, ext, gb, maximum, filesize, fixi, mkfs, defaults, patheticlly, blocksize, bytes, kb, kilobyte, tb, realizing, rsync, scp, larger, partition, fs, bold, virtual, vmware, disks, dev, sda, wip, nov, filesystem, volume, mounted, uuid, cb, ae, xef, revision, dynamic, features, has_journal, filetype, needs_recovery, sparse_super, large_file, flags, directory, hash, default, mount, errors, os, inode, reserved, inodes, fragment, fragments, thu, dec, fri, mar, interval, tue, jun, uid, user, extauditaccount, gid, ab, fixable, format, ll, reformat, specify, update, specified, etc, mke, conf, ve, base_features, resize_inode, dir_index, inode_ratio, fs_types, floppy, largefile,

Latest Articles

  • Linux Ubuntu Cannot Print Large Images
  • Cannot Print PDF Solution and Howto Resize
  • Linux Console Login Screen TTY Change Message
  • Apache Cannot Start Listening Already on 0.0.0.0
  • MySQL Bash Query to pipe input directly without using heredoc trick
  • CentOS 6 and 7 / RHEL Persistent DHCP Solution
  • Debian Ubuntu Mint rc-local service startup error solution rc-local.service: Failed at step EXEC spawning /etc/rc.local: Exec format error
  • MySQL Cheatsheet Guide and Tutorial
  • bash script kill whois or other command that is running for too long
  • Linux tftp listens on all interfaces and IPs by DEFAULT Security Risk Hole Solution
  • python import docx error
  • Cisco Unified Communications Manager Express Cheatsheet CUCME CME
  • Linux Ubuntu Debian Missing privilege separation directory: /var/run/sshd
  • bash how to count the number of columns or words in a line
  • bash if statement how to test program output without assigning to variable
  • RTNETLINK answers: Network is unreachable
  • Centos 7 how to save iptables rules like Centos 6
  • nfs tuning maximum amount of connections
  • qemu-kvm error "Could not initialize SDL(No available video device) - exiting"
  • Centos 7 tftpd will not work with selinux enabled