Tag Archives: Linux

The File-system dilemma

I recently bought Seagate GoFlex FreeAgent Desk 2TB 3.5inch [ 😦 ] hard-disk. And I wanted to know which is the best file-system suited for my use.

I usually use ext2 for my pen drives. I wanted to know that, is there any added advantage using btrfs over ext4. My use is to store books of size (usually <20 MB ). Seperate partition for movies and tvseries ( 300MB < avg-size < 4GB) and tutorials (size <100MB) and lecture videos (size <350MB).

After some discussion I decided to go for ext4. And this post explains why.

When formatted to Ext2
command $: mkfs.ext2 -L “” /dev/sdb1
Disk /dev/sdb: 2000.4 GB, 2000398933504 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006ec2e

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      243202  1953513472   83  Linux


When Formatted to Ext 4
It took painstaking 18 minutes


I personally prefer to use ext4 after reading this link.
Also ext reserves 5% disk space for root.

The reserved blocks are there for root’s use. This allows the system to continue running if non-root users fill up the file system and also assists in preventing file fragmentation because the filesystem does not fill up completely.

So, in short, if the drive doesn’t contain /var or /tmp, then there’s not much point in having space reserved for root.
You can get that space back. By using tune2fsIt is a good tool.

sudo tune2fs -r 0 /dev/sdX to disable it. /*Here we set the “-r=reserved-blocks-count” to zero */

Some forums prefer that minimum 1% is recommended. You can modify the percentage of reserved block percentage too using tune2fs.

sudo tune2fs -m 1 /dev/sdX to modift it. /* Here we modify (-m) “reserved-block-percentage” to 1% from the default 5% */

My earlier plan to format to Btrs was foolish at this point of time as it lacks tuning and debugging support. And gave a 100GB buffer space with the inferior FAT32 and 30 GB with NTFS so as to connect to my friend’s computers using windows.

With a larger maximum file size, fast fsck and journal checksumming ,  I chose ext4. Some benchmarking showed that ext4’s sequential read is better than sequential write as ext2 makes lesser writes than ext4 thereby increasing lifetime for your flashdrives.

Though ext4 makes more sequential writes to disks degrading performance for drives with data rarely modified. Unnecessary writes to your device can be avoided by using noatime flag in mount. You can over ride the default mount option again with tune2fs.

Further Read

1 Comment

Posted by on Thursday, October 20th, 2011 in disk management, File system, Linux, Technical


Tags: , , , , , , ,

Finger simulated with RPC

The link is –> /myfinger

Click on the download button and do it as tar.gz file.

There is a README file attached

Just extract it
tar xvzf .tar.gz

There is a tutorial file. just go to the project tree directory and execute

compilation overhead is solved by to naive scripts ./clientcompile and
./servercompile scripts. Could have used “make” but was lazy. So
kindly bare with that.
Sorry once again to overkill the problem

Leave a comment

Posted by on Saturday, June 4th, 2011 in Linux, RPC, Technical, Uncategorized


Tags: , , ,

%d bloggers like this: