Migrate to ext4

Since the Ubuntu Lucid upgrade, suspend/resume is not working any more on my desktop, which means I must powercycle every day. This leads to a higher fsck rate on my mounted filesystems, and as those are increasing in size over time, this takes a long time to boot. This is why I decided to migrate everything to ext4, thereby offering me faster fsck times, and an overall better performance.

The procedure to migrate ext3 volumes to ext4 is quite straightforward :

For non-root filesystems :

First, unmount the partition.

umount /dev/sda5

Next, run a filesystem check on it to make sure it is in sane condition. We are still on ext3.

fsck.ext3 -pf /dev/sda5

Enable new features of ext4 on the filesystem.

tune2fs -O extents,uninit_bg,dir_index /dev/sda5

Option "extents" enables the filesystem to use extents instead of bitmap mapping for files, "uninit_bg" reduces file system check times by only checking used portions of the disk, and "dir_index" allows storing the contents of large directories in a htree for faster access. Option "dir_index" is also supported by ext3, so you may already be using it, but it makes no harm to specify it here.

Run a filesystem check. It will find errors. It is normal. Let it fix them.

fsck.ext4 -yfD /dev/sda5

The "-D" parameter will actually enable the "dir_index" option by rebuilding directory index. It can be rebuilt (optimized) at any later time by running the check with the parameter.

Now edit your /etc/fstab file to say "ext4" instead of "ext3" for /home. Other options may differ for your system.

/dev/sda5 /home ext4 defaults 0 2

Try to mount your new ext4 filesystem.

mount /home

If it succeeds, congratulations.

It may seem that the migration from ext3 to ext4 is now complete, and it is almost true. Except that any old files created before the conversion will continue using the bitmap mapping of ext3 instead of extents of ext4. Files will eventually migrate to the new format as they are updated during normal system operation, because on next write they will be saved using extents. Unfortunately many frequently used files (like application binaries) are often read and rarely written to. The outcome is that the files will remain using the old format for a long time, and you will not be able to experience full potential of ext4. Modifying attributes with chattr can be done on multiple files. Although digging trough the entire directory system is not really feasible, so you can use some of the shell magic to accomplish the task.

find /home -xdev -type f -print0 | xargs -0 chattr +e

For root filesystems :


You will need to use a Linux liveCD, or the installation CD that came with your distribution. You might want to check if the kernel on that installation medium has ext4 capabilities. Simply follow the above procedure, but don't forget to change /etc/fstab first, so your root partition is marked as ext4.

Zomerconcert Hamaril

Dit weekend vindt het zomerconcert van de muziekschool plaats, en gisteren was de aftrap. Toch wel wat onder de indruk van de grootte van het evenement : 120 groepjes verspreid over 3 dagen spelen elk een ingestudeerd nummer. Waaronder ook ondergetekende, na 3 maand les en als eerste van twee solo muzikanten - de rest speelde allen met verscheidene mensen. Als concert vuurdoop kan dat tellen. Ik mocht niet klagen : slechts enkele kleine steken laten vallen, en dan voornamelijk omwille dat ik de muziek nauwelijks hoorde. Geleerde les : zelf eigen keyboard meebrengen volgende keer, dat bespaart een hoop geknoei met instellingen van een vreemd keyboard, dat dan nog eens minder toetsen heeft dan het mijne.
Soit, complimenten aan de organisatoren, puik gedaan voor zo'n groot event met een heerlijke sfeer !

OpenSolaris 2010.05

Whoever thought that OpenSolaris was dead after the Oracle acquisition, might be wrong : OpenSolaris 2010.05 has been released with some important new features :

  • ZFS deduplication : I've always predicted that this would once become a default feature of file systems, and ZFS is the first to implement this
  • IPS : the new Image Packaging System : the reworked package manager for OpenSolaris, a big deal in bringing the legacy Solaris package management to a higher level
  • USB support for VirtualBox guests
  • Gnome 2.28

Update : seems that this was a link to a draft document.

Bert Fri, 05/21/2010 - 11:14

The 2010.05 What's New info page was there yesterday when I looked, but isn't there anymore today. And the download wasn't there yesterday either...

Constantin Gonzalez Fri, 05/21/2010 - 13:31

Hi,

first of all thank you for supporting OpenSolaris and trying to calm down the doubters.

But OpenSolaris 2010.05 has not been released yet. The What's New document you link to is a draft.

You can verify this by going to OpenSolaris.org or by clicking the download link in the What's New document: The latest downloads still point to the 2009.06 release.

No need to worry, though, I'm confident that we will see the next version of OpenSolaris soon, we just need to wait a little bit longer.

Cheers,
Constantin

Larry Ellison about the ex-Sun management

In this Reuters.com article, Larry Ellison openhearted speaks about his view on the ex-Sun management decisions of the last years. It's quite a critical view :

"Their management made some very bad decisions that damaged their business and allowed us to buy them for a bargain price"

"The underlying engineering teams are so good, but the direction they got was so astonishingly bad that even they couldn't succeed"

Ellison shut down one of Schwartz's pet projects -- development of the "Rock" microprocessor for Sun's high-end SPARC server line, a semiconductor that had struggled in development for five years as engineers sought to overcome a string of technical problems. "This processor had two incredible virtues: It was incredibly slow and it consumed vast amounts of energy."

Ellison says he learned that Sun's pony-tailed chief executive, Jonathan Schwartz, ignored problems as they escalated, made poor strategic decisions and spent too much time working on his blog, which Sun translated into 11 languages.

At least you can't accuse Ellison of not being clear. Much is off course corporate chatter; IBMs Power7 chip runs pretty hot, and is equipped with impressive heat sinks too. The article continues to say that investment is boosting again in Sparc and OpenSolaris, but I'm afraid this will not be enough to restore faith in Solaris for many customers.

AIX Technical University, Budapest 2010

I spent the last week in Budapest, attending the IBM AIX Technical University. Hundreds of presentations about AIX, Power, Storage and Tape, spread over 4 days in Budapest. The most interesting talk was about the new stuff in TSM6.2, where one of the most markant features was client upgrades through the TSM ISC. Client packages are pushed from the ISC to the TSM server, where they reside on a diskpool, ready for shipment to the clients. Currently only a Windows feature, but Unix will probably follow in the 6.3 release. There was unfortunately no possibility for a TSM certification, which meant I could not renew (or upgrade) my 5.4 certification.

There wasn't that much time for city sightseeing, though we did manage to get a small visit to the castle on the Buda side of the Lanchid bridge. Pretty nice city, and a good idea for a next city trip...