Archive

Posts Tagged ‘ext4’

Next generation Linux file-systems

November 5th, 2009 No comments

If you’ve been reading this blog a couple of things are clear, I don’t like Apple much and I have a soft spot for file-systems. An article was posted on the IBM DeveloperWorks site that covers two file systems; NiLFS(2) and exofs that has some great information about these two beasts.

Linux® continues to innovate in the area of file systems. It supports the largest variety of file systems of any operating system. It also provides cutting-edge file system technology. Two new file systems that are making their way into Linux include the NiLFS(2) log-structured file system and the exofs object-based storage system. Discover the purpose behind these two new file systems and the advantages that they bring.

Read the full article on the Next-generation linux filesystems, there was an article on LWN.net a few years back discussing the (then emerging) Btrfs and NiLFS and how things may pan out. I’m quite happy and content with ZFS but in either case it’ll be interesting to see how all three go.

{lang: 'en-GB'}
Share

THIS IS FEDORA: Fedora 11 Released

June 9th, 2009 No comments

This is FEDORA.

Fedora 11 aka Leonidas has been released. Whilst the front page is yet to be updated the mirrors are being updated as I write and ISO’s are being propogated.

Download ISO:

In Australia? Try the local mirrors:

Bit of a torrenter? See the Torrent Tracker page.

Approximate sizes (from internode):

Fedora-11-i686-Live.iso             688M
Fedora-11-i686-Live-KDE.iso         686M
Fedora-11-x86_64-Live.iso           691M
Fedora-11-x86_64-Live-KDE.iso       693M

See the Fedora 11 Release Notes for more information about changes in this release, the Fedora 11 feature list or the Unoffficial Fedora 11 Guide.

I’ve been awaiting this release primarily for the Linux Kernel v2.6.29 (in comparison to Jaunty‘s Kernel 2.6.28) which brings a slew of updates to the table – in particular KMS (Kernel mode setting – flicker free graphics), the inclusion of Btrfs in the kernel for preliminary testing and better memory mangement. Ofcourse Fedora 11 ships with X.org 1.6 as well. With the inclusion of GCC 4.4 all packages are now compiled with gcc4.4 too.

I’ve only dabbled in Fedora 10, but I think its a worthy move from my primarily Ubuntu lifestyle.

Whats really interesting though, is that Ubuntu 9.10 seems to have a decent performance bump, so whilst the wait for Fedora 11 is over, its time to get excited about the snappier the Karmic Koala.

{lang: 'en-GB'}
Share

Rebuilding Zeus: Part 1 – Preliminary Research and Installing Ubuntu 9.04 RC1

April 19th, 2009 1 comment

Just spent a fair chunk of today getting a rebuild of Zeus going – our affectionately dubbed Ubuntu server at home. This is the third rebuild (hardware wise) in the past 5 years (sheesh its been that long?), but I’m not complaining. First Ubuntu’fied version (5.10 – Breezy Badger) ran on an Pentium 4 3Ghz (Socket 478), noisey little guy that sucked quite a bit of power which was my old development box  that served me well.

Then with the release of the fornicating Feisty Fawn (Ubuntu 7.04) I moved over the server to an AMD box, a AMD 3200+ on a ASUS A8N-SLI Deluxe (which featured the incredibly shakey NForce 4 SLI chipset) with a modest 2Gb of DDR ram.

NVIDIA nForce4 APIC Woes

Unfortunately I didn’t realise that by using the NForce 4 chipset under Linux I’d have to wrestle with APIC issues due to an issue with the chipset and regressions.

If you fall into the above hole, edit your grub boot menu:

$ sudo vi /boot/grub/menu.lst

And change your booting kernel with two new options:

title           Ubuntu 7.10, kernel 2.6.22-14-generic
root            (hd0,5)
kernel          /vmlinuz-2.6.22-14-generic root=UUID=c7a7bf0a-714a-482e-9a07-d3ed40f519f5 ro quiet splash noapic nolapic
initrd          /initrd.img-2.6.22-14-generic
quiet

You may want to also add that to the recovery kernel just incase. This will effectively disable the onboard APIC Controller as its quite buggy. More information is available on Launchpad.

Its been chugging along nicely for the past 2 years – the time is always in accurate (about 8 minutes ahead) but the uptime right now is:

thushan@ZEUS:~$ uptime
19:54:06 up 147 days,  7:27,  7 users,  load average: 0.22, 0.43, 0.32

So I figured its time to put these issues behind and redo the server infrastructure at home.

Goals

There are some goals in this rebuild.

  • Try out Ext4 and remove the use of ReiserFS and JFS which don’t seem to be going anywhere (JFS here and here). ZFS would be nice (but no FUSE!) to try out, but I’m hoping Btrfs brings some niceties to the table.
  • The new Zeus needs to look at virtualisation a little more. Right now, alot of the QA for Windows builds of our stuff is done on several machines all over the place. Consolidate them to 1 Server with VT support, plenty of RAM and use a hypervisor (mentioned later) to manage testing.
  • Provide the same services as the existing Zeus:
    • SVN + Trac
    • Apache
    • MySQL / Postgres
    • File hosting, storing vault sharing content across the computers around (the whole house is gigabitted).
    • Fast enough to run dedicated servers for Unreal Tournament, Quake, Call of Duty 4 and a few other games.
    • Profiles, user data needs to be migrated
  • Messing about with the Cloud-Computing functionality in Jaunty.
  • Provide a backend for the Mythbuntu frontends.
  • Last another 2 years

Hardware

My previous workstation motherboard was the awesome ASUS P5W-DH Deluxe with a Intel QX6850 CPU, powered by the Intel 975 Chipset that has lasted for alot longer than anyone had predicted. But earlier this year I had a problem with the board that warranted a RMA request. As I had to have a machine I ended up buying an ASUS P5Q-Pro and did a re-install (same CPU). So instead of selling off the P5WDH I’ve decided to use that board coupled with a Intel E6750 which was picked because it supports Intel VT and it was lying around. Otherwise I _wouldnt_ consider using this setup – overkill!!! But I do want this setup to last and be beefy enough to support a little more than a few VM’s running concurrently.

Pretty shots are available here. Otherwise, the test bench, the tuniq and a pretty shot of my setup at home (no its not clean).

Software

Clearly Ubuntu  9.04 is where its at, its sleeker, blindingly fast to boot thanks to the boot time optimisations and sexier desktop thanks to the visual tweaking and the new Gnome 2.26 inclusion. The installer has matured greatly, gone is the plain old boring partition editor based on GParted and a sleek new timezone picker. To make the most of the RAM in the box, 64bit edition of Ubuntu-desktop is what I’m installing.

Installing Ubuntu, use a UNetbootin!

So you grabbed the latest ISO, burn and chuck it into an optical drive and way you go aye… *IF THIS WAS 2005*!!! As mentioned in an earlier post, grab a copy of UNetbootin, select the ISO you mustered from your local free ISP mirror and throw it inside your USB thumb drive. These days USB drives are dirt cheap, I picked up a Corsair Voyager 8Gb (non-GT) for AUD$39.

Why would you want to do that?  You wont need to use CD-RWs, delete and put another ISO and whats more, it will install in no time. With the VoyagerI got the core OS installed in 5 minutes – after selecting the iinet local software sources mirror. Funky?

Hypervisors

I got into the Virtualisation game early, VMWare 2.0 (2000-2001) is where it all began after seeing a close friend use it. Unfortunately I had to almost give up my kidney to afford to buy it. Then a brief time  I moved to Connectix VirtualPC when VMWare 4.0 arrived and messed up my networking stack, but went back to VMWare 3.0 for a little while. Then eventually moved back to VirtualPC 2004 after Microsoft acquired Connectix (it was free from the MSDN Subby) and back again on VMWare with version 5.

Fast forward to 2009, we have some ubber quality hypervisors. VMWare still has the behmoth marketshare but a little birdie got some extra power from the Sun and impressed everyone lately with its well roasted features. But the critical decision was which hypervisor to use, we have VMWare Server (1.0 or the 2.0 with its web interface – errr!), XenServer (which is now owned by Citrix) or VirtualBox.

After playing around with VMWare Server 1.0 last year I was left wanting more, so naturally I moved to VMWare Server 2.0 not knowing that the familiar client interface is GAWN, instead in its place is a web based implementation – VI Web Access.  It was slow and clunky and took a while to get used to – but the fact that it showed the status via the web was funky, but runnig an entire VM Session via a browser plugin (which hosed every so often) was far from impressive :(

It finally boiled down to deciding to go with VMWare Server 1.0 (released mid-2006), leaning onto XenServer (seems to include a bit of a learning curve) or to move to a brighter pasture with Sun VirtualBox – which is what I use on my development boxes. I’m still playing around with all three to see how they fair. I am a little biased towards VirtualBox (  I reckons its awesome ja! )  but as this is a long-term build I can’t knock out VMWare Server out just yet nor go the full para-virtualisation with XenServer which is probably what I’ll end-up doing.

I’ve only got a few days before the final release of Ubuntu 9.04 arrives and all this research prior is to make sure things go smoothly next weekend.

{lang: 'en-GB'}
Share

Funky Jaunty: Ubuntu 9.04 Release Candidate, its almost here!

April 17th, 2009 1 comment

Excited Jen? You should be. Ubuntu 9.04 (aka Jaunty Jackalope) will be out in less than a week, and if you cant wait, grab the Release candidate and give it ago.

Amongst the highlights:

Our main server box (Zeus) is still running 7.04, so I think its about time I upgrade the little guy to the latest and greatest, 2 years later with a fresh dose of hardware.

{lang: 'en-GB'}
Share

The anatomy of the Ext4 File-System

February 23rd, 2009 No comments

Tim Jones has posted an article on the IBM DeveloperWorks website about the importance and anatomy of the Ext4 file system for Linux.

The first supported file system for Linux was the Minix file system. This file system had some significant performance issues, so another file system was created specifically for Linux called the extended file system. The first extended file system (ext1) was designed by Remy Card and introduced into Linux in April 1992. The ext1 file system was the first to use the virtual file system (VFS) switch implemented in the 0.96c kernel and supported file systems up to 2 gigabytes (GB) in size.

The second extended file system (ext2), also implemented by Remy Card, was introduced in January 1993. It adopted advanced ideas from other file systems of the day (such as the Berkeley Fast File System [FFS]). Ext2 extended supported file systems of 2TB in size, although 2.6 kernels extended the maximum size of ext2 file systems to 32TB.

The third extended file system (ext3) was a major advance in Linux file systems, even though its performance was less than some of its competitors. The ext3 file system introduced the concept of journaling to improve the reliability of the file system when the system is abruptly halted. And although competing file systems had better performance (such as Silicon Graphics’ XFS and the IBM® Journaled File System [JFS]), ext3 supported in-place upgrades from systems already using ext2. Ext3 was introduced in November 2001 and implemented by Stephen Tweedie.

Fast-forward to today. We now have the fourth extended file system (ext4). Ext4 introduces numerous new advancements for performance, scalability, and reliability. Most notably, ext4 supports file systems of 1 exabyte in size. Ext4 was implemented by a team of developers, led by Theodore Tso (the ext3 maintainer), and was introduced in the 2.6.19 kernel. It is now stable in the 2.6.28 kernel (as of December 2008).

Ext4 borrows many useful concepts from a variety of competing file systems. For example, the extent approach to block management had been implemented in JFS. Another block management-related feature (delayed allocation) was implemented in both XFS and in Sun Microsystems’ ZFS.

Well worth a read as it covers some of the significant changes and updates made to Ext4 and how it differs from previous releases. I’m using XFS on my file server eagerly awating the arrival of Btrfs.

{lang: 'en-GB'}
Share

Maintaining your XFS with XFS Filesystem Reorganiser xfs_fsr to defrag

January 25th, 2009 6 comments

File Systems are a hairy topic, on Windows you should be using NTFS (the days of FAT are long gone!) but on Linux, BSD and *Solaris we still have a wide variety to pick and choose depending on our needs. I’ve always been a JFS and XFS fan (previously ReiserFS) until Btrfs goes mainstream (which is one thing to hangout for in Linux Kernel 2.6.29!) and often I’d have a mixture of all three. Our main server at home – affectionately dubbed Zeus, after our lovable Australian Customs puppy Zeus, uses XFS, JFS and Ext3.

JFS to manage the home directories and core file system, ReiserFS for the temp folder and XFS for the heavy file shares – which span multiple terrabytes of files over a LVM (with each file being 1-2Gb in size). The reasoning behind opting for XFS over another file system for the file server was that XFS performs incredibly well under heavy load and scales well when you know the files are big (over 500Mb). Overall I’ve always felt that XFS does provide consistent performance and scalabilty in comparison to the others – but you may think otherwise.

Unfortunately, XFS – whilst quite an excellent file system for managing large files, it seems, suffers from fragmentation over time (especially true if you use your file system for DVR – eg, a Myth backend host) or if the disk gets close to filling up. Luckily there are two utilities that XFS has to manage this fragmentation.

  • xfs_db – XFS Debug Information
    Used to examine an XFS filesystem for problems or gather information about the XFS file system.
  • xfs_fsr – File System Organiser
    Improves the organisation of mounted file systems. The reorganisation algorithm operates on one file at a time, compacting or otherwise improving the layout of the file extents (contiguous blocks of file data).

In Debian/Ubuntu (and derivatives) these two utilities are found in the package xfsdump. Using these two utilities we can workout the health of the file system (xfs_db) and hopefully tune/optimise it (xfs_fsr). I took the plunge last night and optimised Zeus’s main file storage partition:

Filesystem            Size Used Avail Use% Mounted on
/dev/sdf7              40G  3.5G   37G   9% /
varrun               1014M  4.5M 1010M   1% /var/run
varlock              1014M  8.0K 1014M   1% /var/lock
udev                 1014M  112K 1014M   1% /dev
devshm               1014M     0 1014M   0% /dev/shm
lrm                  1014M   34M  980M   4% /lib/modules/2.6.22-15-generic/volatile
/dev/sdf6            1023M   38M  986M   4% /boot
/dev/sdf10            235G  173G   63G  74% /home
/dev/sdf9              10G  544K   10G   1% /opt
/dev/sdf8              10G  2.7G  7.4G  27% /var
/dev/mapper/Storage
                      2.3T  1.9T  408G  83% /media/LVM/Storage
/dev/sde1             466G  396G   71G  85% /media/Backups

As you can see, the LVM “Storage” mount has just under 20% free space and the non-LVM partition for “Backups” has 15% free space. Both these are XFS volumes, to find the health of the two use the xfs_db command to gather some information.

$ sudo  xfs_db -c frag -r /dev/mapper/Storage
$ sudo  xfs_db -c frag -r /dev/sde1

Here we’re asking xfs_db to open the file system in a readonly mode (-r) passing in a command (-c)  to get the file fragementation data (frag) for the device (/dev/*). When we use the frag command, it returns information only pertaining to the file data in the filesystem as opposed to the fragmentation of freespace (which we can guage with passing the freesp command). The output of the commands appear below for Zeus.

thushan@ZEUS:~$ sudo  xfs_db -c frag -r /dev/sde1
actual 189356, ideal 148090, fragmentation factor 21.79%

thushan@ZEUS:~$ sudo  xfs_db -c frag -r /dev/mapper/Storage
actual 406056, ideal 21584, fragmentation factor 94.68%

Wow! The LVM partition (which spans 4 drives) has around 95% fragementation! Yikes!!! The parition has quite a few Virtual Machine images, various large files (DV Captures etc). The “Backup” (sde1) on the other hand isnt as badly fragmented.

So right now we’ve found our problem and its time to fix it. First thing to do – and realise that we can fix this on a live running system – is to try and find a time where the partition will be used very little (like overnight) so you let its do its thing without unnecessary burden. Then lets make use of the File System Organiser utility (xfs_fsr) and ask it to reorganise our parition to the best of its ability.

$ sudo xfs_fsr -t 25200 /dev/mapper/Storage -v
$ sudo xfs_fsr -t 25200 /dev/sde1 -v

Now this is much simpler, the xfs_fsr utility is being told to reorganise /dev/* with a timeout (-t) of 7hrs  (60 * 60 * 7 = 25200) which is specified in seconds. Because I like to see how much is done I also specified the verbose output option (-v). Let it do its thing and hopefully when you return you will have the last bit of output showing the extents before, how many after and the inode, something like this:

extents before:5 after:1 DONE ino=4209066103
ino=4209066107
extents before:5 after:1 DONE ino=4209066107
ino=4209066101
extents before:4 after:1 DONE ino=4209066101
ino=4209066091
extents before:3 after:1 DONE ino=4209066091
ino=4209066093
extents before:3 after:1 DONE ino=4209066093
ino=4209066105
extents before:2 after:1 DONE ino=4209066105
ino=4209066143
extents before:27 after:1 DONE ino=4209066143

Now its time to go back and check how well the file system reorganising was:

$ sudo  xfs_db -c frag -r /dev/mapper/Storage

And the results?

thushan@ZEUS:~$ sudo  xfs_db -c frag -r /dev/mapper/Storage
actual 21652, ideal 21584, fragmentation factor 0.31%

Lovely! What a difference and you’ll notice the improvement immediately if you start moving or transfering files around.

Ideally, you may want to setup a cron task to let this process run (maybe with a lower timeout) overnight or when theres low-load. Whats great about the xfs_fsr utility is that its smart enough to remember where it finished up last time and continue from there. Its a shame Ubuntu doesnt do this already.

{lang: 'en-GB'}
Share

Linux 2.6.28 released for all the good l33tle boys and girls!

December 26th, 2008 1 comment

Linus Torvalds just released Linux Kernel 2.6.28 today as an Christmas present to all the good (and not evil) l33tle-big boys and gals around the globe. This brings a whole host of new cool bits and bobs thats sure to get people excited (Ext4 being one and the GEM Memory Manager) read all about it in the Linux Kernel Newbies guide.

Some addtional juicy reading incase your stuck with the inlaws for some ‘family’ time:

Enjoy!

{lang: 'en-GB'}
Share