The ext4 or fourth extended filesystem is a journaling file system for Linux, developed as the successor to ext3.
Difference between ext2, ext3 and ext4:-
The ext2, ext3, and ext4 file systems are a family of file systems that have a strong amount of backwards and forward compatibility. In fact, they can be considered a single filesytem format with a number of feature extensions, and ext2, ext3, and ext4 are merely the names of the implementations found in the Linux kernel. This way of looking at things is supported by the fact that they share the same userspace utilities (e2fsprogs), and that many filesystems can be mounted on different filesystems. For example, a filesystem which is created for use with ext3 can be mounted using either ext2 or ext4. However, a filesystem with ext4-specific extensions can not be mounted using ext2 or ext3, and the ext3 file systems code in the kernel requires the presence of a journal, which is generally not present in partitions formatted for use by the ext2 file system. The ext4 code has the ability to mount and use a filesystem without a journal.
How to make ext4 in Debian, Ubuntu and CentOS, RHEL(6.4 & above), Fedora, etc
MAKE SURE THAT YOU’RE RUNNING AS A ROOT OR A SUPER USER.
To check the existing partitions, enter
If you probably have one physical hard disk installed, then enter
Enter, m for help, p to print partition and n to create a new partition.
Now we need to make the kernel aware of the changes (after entering n, insert +100G or any amount you like), here i am making a partition of 100Gb and let’s name it as sda5.
partx -a /dev/sda
Then, format the partition in ext4 format
mkfs.ext4 /dev/sda5 cd /
Now me need to make a directory in the root (/) in order to mount it on fstab (file system table)
mkdir /newpart vi /etc/fstab
Enter the following values in the table below
/dev/sda5 /newpart ext4 defaults 0 0
save it and exit the editior. After that we need to mount the partition
That’s it the new ext4 partition has been successfully completed.
[Note:- If you’re using RHEL or CentOS 5 or 6.3, this command(partx) won’t work, try partprobe and then init 6 after making a new partition ie. after entering n and giving the file size +100G, or any size as per your wish].