Linux/Extended File System

Extended (Ext) File System
''"The extended file system, or ext, was implemented in April 1992 as the first file system created specifically for the Linux kernel. It has metadata structure inspired by the traditional Unix File System (UFS) and was designed by Rémy Card to overcome certain limitations of the MINIX file system. It was the first implementation that used the virtual file system (VFS), for which support was added in the Linux kernel in version 0.96c, and it could handle file systems up to 2 gigabytes (GB) in size.

ext was the first in the series of extended file systems. It was immediately superseded by both ext2 and xiafs, which competed for a time, but ext2 won because of its long-term viability: ext2 remedied issues with ext, such as the immutability of inodes and fragmentation."''


 * ext, the first extended file system
 * ext2, the second extended file system
 * ext3, the third extended file system.
 * ext4, the fourth extended file system.

Age of File System
Filesystem created:      Fri Dec  7 16:22:58 2018
 * 1) tune2fs -l /dev/sda1 | grep created

Also generally works as the date of server installation

Block Size
A block is a uniformly sized unit of data storage for a filesystem. Block size can be an important consideration when setting up a system that is designed for maximum performance.

Block size is selected at the time of high-level formatting, i.e., preparing the hard disk drive (HDD) or other media for creation of a filesystem. If the mke2fs (i.e., make ext2 filesystem) command is used to create the filesystem, valid block size vales are 1024, 2048 and 4096 bytes. If omitted, block size is determined by an algorithm that considers the size of the filesystem and how it is expected to be used.

Find Block Size: dumpe2fs /dev/sdb3 | grep -i 'Block size' dumpe2fs -H /dev/sdb3 | grep -i 'Block size'
 * 1) faster:

References:
 * Determine the block size on hard disk filesystem for disk quota
 * obtain filesystem block size

Resize Ext Partition
Resize Ext4 / Ext3 / Ext2 Partitions...

resize2fs /dev/sda1 6000M resize2fs /dev/sda1 # fill to capacity

Defrag Ext Partitions
Check: sudo e4defrag -c /path/to/myfiles

Defrag: sudo e4defrag -c /path/to/myfiles

Uglier way:
 * See above

How to defrag an ext4 filesystem - Ask Ubuntu - http://askubuntu.com/questions/221079/how-to-defrag-an-ext4-filesystem

Change UUID
If you have cloned the drive, you can change the uuid: UUID=`uuidgen` sudo tune2fs /dev/sde5 -U $UUID

Reclaim reserved root space on ext3
tune2fs -m 0 /dev/path/to/dev

Source
Original Message Subject: 	reclaiming unavailable space on ext3 or 4 using tune2fs -m Date: 	Sun, 26 Sep 2010 22:41:31 -0600 From: 	Michael Torrie  Reply-To: 	Provo Linux Users Group  To: 	Provo Linux Users Group Mailing List 

On Ext2,3 or 4, the file system reserves a certain number of blocks that can only be allocated by privileged processes (root?). When you do a df, this percentage is taken into account and counts against free space. On a mount that is not the root file system, and will never have any system process writing to it, you can free up some of this space for use by normal users. To do this, you can do (even on a mounted file system):

tune2fs -m 0 /dev/path/to/dev

So on my machine I always mount /home from a separate file system. On my mythtv box I also keep my recordings on separate file systems from my root file system. Running this command on my home workstation got back 30 odd GB of previously unusable space, and on my myth box, I got back about 45 GB on each 1 TB disk.

Thought I'd pass along this tip.

/* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin.