How to Upgrade ext2/ext3 Partition to ext4 Nov 17th 2021 Words: 49

Solution

Install e2fsprogs utility:

1
sudo apt install e2fsprogs

Enable journal feature (ext2 -> ext3):

1
sudo tune2fs -j /dev/<DEV>

Enable ext4 feature (ext3 -> ext4):

1
tune2fs -O extents,uninit_bg,dir_index /dev/DEV

Check filesystem:

1
2
3
4
5
# online
e2fsck -fDC0 /dev/<DEV>

# offline
touch /forcefsck && reboot

References