Archive for the tag 'ext4'

SBDavid

Converting ext3 files system to ext4

Converting ext3 files system to ext4

You can convert an ext3 file system to ext4 by using a command like the following:

# tune2fs -O extents -E test_fs /dev/DEV

And, you can adjust the inode setting, for example from 128 to 256, to improve efficiency with a command like the following.

# tune2fs -I 256 /dev/DEV

After you have created the file systems on your partitions, a nice tool for adjusting those file systems is the tune2fs command. Using tune2fs, you can change volume labels, how often the file system is checked, and error behavior.
You can also use tune2fs to change an ext2 file system to an ext3 file system so the file system can use journaling.

For example:

# tune2fs -j /dev/sdb1

Creating journal inode: done
This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

By adding the -j option to tune2fs, you can change either the journal size or attach the file system to an external journal block device. After you have used tune2fs to change your file system type, you will need to correct your /etc/fstab file to include changing the file
system type from ext2 to ext3.

tune2fs 1.41.12 (17-May-2010)
Usage: tune2fs [-c max_mounts_count] [-e errors_behavior] [-g group]
[-i interval[d|m|w]] [-j] [-J journal_options] [-l]
[-m reserved_blocks_percent] [-o [^]mount_options[,...]]
[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]
[-M last_mounted_dir] [-O [^]feature[,...]]
[-E extended-option[,...]] [-T last_check_time] [-U UUID]
[ -I new_inode_size ] device