How to Make Gnarly Big Linux Filesystems

At least in RHEL 4, the fdisk command does not support the creation of filesystems larger than 2TB. In order to get around it, you have to use the parted command. I found the basic info here, but this is the long and short of how to cut off a big ol’ slice of disk using parted:

Run parted

# /sbin/parted

It’s interactive, so the following commands are issued within the utility.

1) Make the disk label

(parted) mklabel gpt

2) Create the partition

(parted) mkpart primary 0 -1

3) Verify

(parted) print

Disk geometry for /dev/sda: 0.000-38146.972 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          0.031    101.975  primary   ext3        boot
2        101.975  38146.530  primary               lvm

4) Exit the GNU Parted command shell

(parted) quit

5) Finally, make the filesystem:

# mkfs.ext3 -m0 -F /dev/sdb1

6)Finally, you don’t want to wait for that big filesystem to fsck from time to time, so make sure it does not get checked unless you run the command yourself:

# tune2fs -c0 -i0 /dev/sdb1

That should just about do it. Remember that only RHEL 4 and higher can support filesystems larger than 2TB. If I remember correctly RHEL 3 can go up to 2TB, RHEL4 can handle 8TB, and RHEL 5 can make a whopping 16TB chunk of disk. Have fun!

Changing Linux Mount Points

If you’re familiar with UNIX, you know that changing mount points is really pretty easy. All you have to do is go into “/etc/fstab”, “/etc/vfstab” (or whatever your flavor of UNIX happens to call its filesystem table) and change the mount directory.

If, for instance, you had a Solaris box, and you wanted to make the disk currently mounted as “/data” be mounted as “/database”, all you would have to do is the following:

# umount /data
# mv /data /database
Change this line in “/etc/vfstab” from something like this:
/dev/dsk/c1d0s6 /dev/rdsk/c1d0s6 /data ufs 1 yes -
to something like this:
/dev/dsk/c1d0s6 /dev/rdsk/c1d0s6 /database ufs 1 yes -
and remount it as “/database”.
# mount /database

With Linux, however, it’s not quite so clear anymore… It’s still easy, but it’s just not so clear what you have to do since they have now taken to mounting filesystems using the volume label. Rather than pointing directly to the disk device, Linux points to the label, and “/etc/fstab” look more like this:

LABEL=/data /data ext3 defaults 1 2

You can always simply change the disk label, but if you don’t care, you can just tell linux where the raw device is, bypassing the need to worry about the label. The easiest way to do this is simply to replace the “LABEL=/data” value to the “/dev” entry of the disk itself. Then, simply change “/data” to “/database” and you’re all set.

Here is an example of what you would do to change the mountpoint of “/data” to /database”:

# umount /data
# mv /data /database
Change this line in “/etc/fstab” from this:
LABEL=/data /data ext3 defaults 1 2
to this:
/dev/sda6 /database ext3 defaults 1 2
and remount it as /database
# mount /database

Remembering to change the example values here with those required for your situation.

Google Analytics is Cool

So after being frustrated yesterday by not having any pretty Google Analytics reports to look at, they finally crunched up some data for me, and this morning I was able to start kicking the tires.

First assessment… WOW! They generate a report for just about anything you could possibly what to know, including things like what major ISP’s your viewers are coming from. My personal favorite is the Geo Map Overlay which uses Google Maps to show what parts of the world your traffic is originating from. I was really surprised to see how many international visitors found their way here. Maybe it’s because I, like the rest of the world, think our President is an uneducated Neanderthal.

Additionally cool is the idea that Google Analytics is a sucker punch to Microsoft. Hey, I love anything that hurts Microsoft. They don’t suck as much as our President, but they’re sure as hell trying.

Some analysts saw the timing of Google’s latest announcement as significant: It came on the heels of a Microsoft (MSFT) manifesto that Web and ad-subsidized services were the future (see BW Online, 11/10/05, “Microsoft: Ozzie’s Online Charge”). “It’s a bit of a slap of the face to Microsoft, reminding them, ‘We’re in this game,’” says Marc Strohlein, vice-president and lead analyst at Outsell, a market research firm.

For my part, my only complaint is that they don’t update update the data often enough, and they seem to have some gaps in the data they’ve collected. For instance, this morning, they thought I had had 400 visits, when in reality I had 1136 just yesterday according to bstat. They have been up and down because of high load over the past few days though, so the discrepancy is understandable. Apparently they have had a whole lot of people signing up since they went public.

Of course, the data will become much more useful over the long term, so it will be interesting to see how people are using the site, and what they like and don’t like.

Yes Al, I already know you hate the political rants.

Google Analytics – No Data

After reading about Google’s new Analytics tool yesterday, I signed up for an account and got and logging to it. I quickly logged in this morning, all excited to see my reports (I’m pathetic, I know) but there were no reports to be seen. DAMN! Anyhow, I figured out that I have to have a “Conversion Goal” in order for it to start tracking statistics. I’ll RTFM next time.

“Conversion Goals” are really meant to track how what people got to what pages, but they can be as simple a my “Someone is at my site” goal which is a simple count of anyone on any page. I also set up a conversion goal to track comments. We’ll see how it all plays out. According to Google, it will take 12 hours before I see anything.

First 4 Internet and Sony – Big Brother is Watching

This clever fellow Mark Russinovich over at has discovered that Sony has been selling CD’s that install a digital rights management rootkit on its unsuspecting customer’s computers. They seem to have contracted with a company called First 4 internet which produces the rootkit, and contracts it out to the recording industry.

I Googled the company name and came across this article, confirming the fact that they have deals with several record companies, including Sony, to implement Digital Rights Management (DRM) software for CDs.

I wonder if these slimy tactics will really prevent people from copying digital content, or turn former legitimate customers to piracy for fear of having malware and rootkits installed on their computers? I’m just glad I don’t use Windows.

PHP 5.0.5 Make Install Error

After getting PHP 5.0.5 to compile on my Solaris 9 server, I got the following error when doing the make install: php: fatal: relocation error: file /u01/packages/src/php-5.0.5/sapi/cli/php: symbol xmlRelaxNGCleanupTypes: referenced symbol not found

make[1]: *** [install-pear-installer] Error 137
make: *** [install-pear] Error 2

Turns out that the Sun XML packages are stomping all over the xml2 package from Simply removing the following two packages allowed the make install to complete.

# pkgrm SUNWlxml
# pkgrm SUNWlxmlx

What The Heck is RAID 10?

Earlier this month, a company came along and asked for a RAID 10 array. Understanding that RAID 10 is a cooler sounding way of saying RAID 1+0, I understood it as a mirror set that is striped across another mirror set. Simple enough… Just concatenate a couple of mirrors, and you’ve got RAID 10.

Indeed, RAID 10 is simply one or more RAID 1 arrays (mirrored sets) striped together (RAID 0).

RAID 1 creates an exact copy (or mirror) of all of data on two or more disks, while RAID 0 splits data evenly across two or more disks with no parity information for redundancy. By combining the two into a RAID 10 array, you are able to take advantage of the faster write speed offered by RAID 0, while protecting your data against drive failures with mirroring.

This method of RAID is pretty costly, but useful if you find yourself in a situation where you need a lot of throughput combined with a lot of data protection.