GNU Linux/Filesystems/Convert Ext3 to Ext4
The Ext4 filesystem offers many benefits over the Ext3 filesystem and is the default filesystem for CentOS 6 and all currently supported LTS versions of Ubuntu.
Some of those benefits:
- Delayed allocation & mballoc allocator for better on-disk allocation
- Sub-second timestamps
- Space preallocation
- Journal checksumming
- Large (>2T) file support
- Large (>16T) filesystem support
- Defragmentation support
At this point there is little reason to not use Ext4 over Ext3, particularly with the support for directly converting existing Ext3 filesystems to Ext4.
For these directions we're assuming that the root filesystem is on
- Replace instances of ext3 with ext4
tune2fs -O extents,uninit_bg,dir_index /dev/sda1
- Press F to force a filesystem check
- see below for example output
- assuming /dev/sda1 is the primary block device holding the filesystem
After you run
tune2fs and force a
fsck it prints many alarming messages to the screen. Here are some of those messages:
Group descriptor 239 checksum is invalid. FIXED.
Group descriptor 266 checksum is invalid. FIXED. Pass1: Checking inodes, blocks and sizes
According to some light research those messages are normal as part of the conversion from Ext3 to Ext4.