Expand JFS Filesystem

I recently bought 2 new 500GB hard drives and am in the process of migrating my RAID array to double its size to 2TB. The current 1TB over 3 drives was 100% full, so it was something that had to be done. The expansion took about 26 hours on my 3ware 9650SE-8LPML controller, which is quite good from what I see of other peoples experiences. Of course, all important data was backed up before the RAID expansion.

The primary issue I had after the expansion was the proper partitioning of the free space. When the RAID expansion was complete, I now had 1TB of used space using the JFS filesystem that was the original partition, and 1TB of unused, unpartitioned free space. Attempts to use Gparted to expand the partition failed due to a known bug that prevents partitions over 1TB. I tried to use Parted, the CLT tool that Gparted is based on, to expand the filesystem but was unable to do so. This seemingly left me with two options, either use multiple smaller partitions, or to reformat and restore the data from the backups. I decided that smaller partitions would be a lot of extra work in terms of keeping tabs on the free space on each partition (and may require more frequent partition modifications) which is something that should not be necessary. Restoring from backups was not welcome due to the time involved. Deciding that those options were not acceptable, I was determined to find the solution I wanted, having a 2TB partition without going through a backup restore process. If anything, it would be worth doing simply on the principle of the matter: that having large partitions on a modern filesystem that supports volumes up to 32000TB should not be a problem. Several Google marathons and man page studies allowed me to successfully perform the operation that I wanted.

My main problem was a lack of understanding of the way that fdisk actually works. With fdisk, you can delete and recreate a partition without actually destroying the filesystem that lives on the partition. I am not sure exactly what the limitations are, but it seems that as long as you do not change the starting point of the partition, the filesystem will remain there. In my case, the drive in question (/dev/sda) had a 1TB partition starting at the beginning of the disk (/dev/sda1) with 1TB of unpartitioned free space residing after the JFS partition (created by the RAID expansion). I deleted the JFS partition (/dev/sda1), and recreated the partition, but this time using the full 2TB of space. In the tests that I did, the free space MUST come after the partition. I wrote the partition table, and them mounted the drive. All the data was still there, but the JFS partition was only showing up as 1TB with the command dh -h. This was rather concerning until I realized the state that the drive was in. fdisk only edits the partition table, not the actual filesystem. When it writes out the partition table, it is just redefining where the partition begins and ends and does not touch the filesystem. Thus, although I had expanded the partition, I did not expand the filesystem. Doing some more searching, I found this article that gave me the last piece of information I needed. The command mount -o remount,resize /mount/point tells the JFS filesystem to expand to fill the entire space of the partition. The command is unique to JFS and will not work on other filesystems because the options passed are used by the JFS kernel driver. When you issue the mount command, note that the partition must be mounted.

Perhaps most frustrating is the lack of data on the JFS filesystem. It does not seem to be very popular in the Linux community, most of whom use ext2/ext3. Those that do use an alternative filesystem tend to use ReiserFS with a small number using XFS. In the limited, unscientific testing I have done, JFS performed very well performance wise and used far lower CPU than ext3 or ReiserFS. JFS has worked out well for me so far and, despite my initial difficulty in expanding the filesystem, is the filesystem I will use in the future.

MacBook Air: Not Impressive

I’ve noticed that the Apple fans have been raving about the announcement of the MacBook Air, so I started looking for information on it, as even non Apple fans seemed to be impressed. In my opinion, although the Air has some nice features and is a nice looking machine, it just doesn’t cut it in terms of price, performance, and interoperability. To show this point, I would like to compare the Air to the laptop that I have been eying for some time now, the Thinkpad X61 or X61s.

In terms of weight, the MacBook Air is advertised as 1.36kg, a respectable lightweight notebook. The Thinkpad X61 is listed as 1.41kg with the X61s being 1.24kg. These weights are usually the lightest the laptop can be without any additional options. The weights are rather close, so lets see the stock features and compare.

Both the Air and the X61s come standard with a 1.6GHz Intel Core 2 Duo processor and an 80GB hard drive. The Air comes with 2GB 667MHz RAM, Bluetooth, and 802.11 a/b/g/draft n wireless, which are options that must be added to the X61s. The Air has a 13.3 inch screen while the X61s has a 12.1 inch. The thickness of the Air is 19.3mm (0.76″) and the Thinkpad is 20.32mm in the front and 27.94mm in the back. Neither come with an optical drive. Overall, the performance specs of both laptops can be made very close. Configured with identical hardware, the Air costs $1799.00 and the Thinkpad X61s with the options is $1354.00, a significant difference in my mind.

To me, the main differences are in the physical (the Air is thinner with a larger screen) and in the connectors that are available. The conneectors are something that is very important to me and is one of the main reasons that I think i would be unable to use this laptop. The Air has a very limited set of ports, namely 1 USB port, a mini DVI (useless to me) and audio. The X61s has 3 USB ports, VGA, ethernet, 1 PC card slot, and SD slot. There have been countless times where I needed multiple USB ports and in my opinion an ethernet port is not an option.  The expandability of the Air is quite limited and is something that would be very difficult for me to deal with.

What it boils down to is the MacBook Air is Apples entry into the ultralight notebook arena that falls short of the other players already on the field.  I’m sure that there are people who find the Air to be what they want, but it is not exactly a deal when there are more powerful laptops with less weight that cost significantly less.

Coming to a Windows Vista Near You

Nothing like Microsoft putting new security flaws in Windows while claiming its improving security. I don’t know why Microsoft would use a random number generator with several known and published flaws, not to mention the issue of its poor performance to other generators available. Perhaps its a standards issue, but a bad idea even if is not the default random number generator.

Sun Fire V120

Through the gracious efforts of a friend, I have managed to come by a Sun Fire V120 server with a 650MHz UltraSPARC IIi processor.  It is in need of a hard drive, but is otherwise in working order.  I’ll be getting some cheap 80 pin SCSI drives on ebay in a few days, but in the meantime, my issue is the serial (or LOM) connection used to administrate the server.  There is no video card, so serial is the only way to go (there is a PCI slot, but normal video cards will not work due to Sun using an Open Boot PROM rather than a BIOS).  Perhaps more annoying is the RJ-45 connector that is used for the serial port.  Because of this, I am unable to connect to it.  I may be able to make an RJ-45 to DB9 adapter tonight and attempt to connect.  I haven’t come up with a use for this machine yet, but I’m sure that it will be making use of the Gentoo SPARC project.  I’ve never used Sun hardware before, so this should be fun.