With the final release of Karmic Koala just days away, it is worth taking a look at the filesystem used in Karmic Koala. By default, Karmic Koala uses the new file system ext4. In this article, we briefly look at a few advantages you can expect to get because of ext4 and then how you can convert your existing partitions to ext4 in preparation for installing Karmic.
A few words words abouts ext4 ...
Ext4 is a new stable filesystem for the linux system. Support for ext4 in Ubuntu started from Jaunty. However, in Jaunty ext3 was still kept as the default filesystem as ext4 was not very stable at that time. Now, the upcoming release, Karmic Koala, is to use ext4 by default. Here is a few changes you can expect to see in Karmic Koala because of the use of ext4:
- Ext4 supports a maximum file system size of 1EB (that is 1,048,576 TB) and file size of 16 TB compared to the maximum file system of 16 TB and file size of 2 TB in ext3. This, however, may be limited due to the kernel.
- An Fsck operation in ext4 can be anywhere between 2-20 times faster than in ext3.
- There is a "No Journaling" mode which results a slightly improved performance.
Upgrading to Ext4
With Karmic using ext4 by default, it is important that you use ext4 in your other partitions, external hard disks etc. to make maximum utilization of this. Here we will show you how to format your hard disk to ext4 and how to upgrade your ext3 partition/hard disk to ext4 without losing data.
Warning: It is advisable that you backup your data before undertaking any operation involving filesystem manipulation.
First of all, identify the partition you want to do the operation on. All the partitions on your system can be listen through the command:
sudo fdisk -l
We will use <id> to denote your partition id for the rest of this article and <location> to identify the folder under /media where it is mounted.
Note: If you are currently using Jaunty, do not change the boot partition to ext4.
To format to ext4
To format the <id> to ext4, open terminal and execute the following commands:
sudo umount <location>
sudo mke -t ext4 /dev/<id>
This will probably take some time but after this step the file system of <id> will be converted to ext4. You can mount it using the command
sudo mount /dev/<id> /media/<location>
or if that does not work:
sudo mount -t ext4 /dev/<id> /media/<location>
To convert from ext3 to ext4 without loosing data
Note: To make the full utilization of ext4, formating is the option adviced.
To upgrade from ext3 to ext4 directly, execute the following commands:
sudo umount /media/<location>
sudo tune2fs -O extents,uninit,dir_index /dev/<id>
sudo fsck -pf /dev/<id>
After this, your file system will be converted to ext4 while still preserving your existing data.
Important: If the <id> is set to auto mount on startup, the fstab has to be modified accordingly. To do this, execute the command:
sudo gedit /etc/fstab
Find the entry for <id> and change ext3 corresponding to it to ext4 and save and exit.
Related Posts by Tags: