*nix – Format and mount a drive – ext4

Great little guide here:

Skullbox.net | Adding a Hard Drive in Linux

But before you format a drive with the ext3 file system, be aware that ext4 is now available, and if it’s good enough for Google…

Computerworld |  The best Linux file system of all?

Ext4 may not be available for mkfs on your system. I don’t know about your system, but for CentOS 5, I did the following:

# yum provides "*/mkfs.ext4"

This asks yum to check which available packages provides ext4 support for mkfs:

e4fsprogs-1.41.9-3.el5.x86_64: Utilities for managing the fourth extended (ext4) filesystemRepo: baseMatched from:Filename: /sbin/mkfs.ext4

I’ll have that then!

# yum install e4fsprogs-1.41.9-3.el5.x86_64

DO NOT rely on this being the best and most up to date package – check yum. If you are concerned about the validity of some repositories, check out the priorities plugin for yum

But now you can format your disk with ext4

mkfs -t ext4 /dev/{drive}

Bonza. Time for a beer…

Leave a Reply

Your e-mail address will not be published. Required fields are marked *