Archive for April, 2006

Fact: Linux 2.6.16 and LVM

Saturday, April 29th, 2006

I’d just like to point out again, lvcreate and lvremove snapshots don’t work in 2.6.16 with the stable versions of lvm and devmapper. DELICIOUS!

Rant: Linux is a Fickle Bitch

Saturday, April 29th, 2006

So after reading up on recent JFS work, and the state of various vendor’s support, and looking at the toolset for it and for XFS, I decided to switch to XFS, as it seemed the better-supported solution…

Of course, here’s the problem with linux: you have to go with the options that are more constantly upgraded, like, say, XFS. This is because the things that aren’t updated, even if they’re ignored because they’re stable and they work, and you can rely on them, are liable to not be supported at all in some future release, because nobody decided to go in and update it when they changed some kernel interface that the community of developers decided “needed changing”. Linux isn’t about reliability, or correctness, or making sure it all works together. It’s ten thousand egotistical nerds trying to scratch their own personal itches, irrespective of the work of others. It’s the sort of thing that makes Theo De Raadt froth at the mouth: The Bazaar may be a great place to get stuff for a party, but it’s a shitty way to build a car.

Case in point: XFS’s ‘fsck’ utility does nothing. It is literally the same as /bin/true. It simply returns a proper success code, because (or so the logic goes), the journal will replay when the fs is mounted, and if that fails, then and only then will it run xfs_check and if that fails, it’ll run xfs_repair. So if you suspect deep corruption, and you touch /forcefsck, you’ve not done a damn thing, because xfs will happily replay the journal and you’ll never know. What you’ll have to do is boot from some other media, start your mirrors and logical volumes and what-not, then run xfs_check. This is madness. This is not a viable solution for any kind of enterprise-level product, and I’m aghast. But, hey, at least xfs gets updated!

Case in point #2: I rebuilt my Logical Volume to get myself some free space for snapshots. So I get it all set up and make a snapshot, mount it, look at it, and unmount it. Then I go to remove the snapshot volume. The box hangs. I figure I screwed up and reboot. Amusingly, XFS doesn’t mount by looking at the volume, it also checks the UUID and mounts the first volume it finds with that UUID. Which is, ha-ha, the snapshot volume. Welcome to funky town. So, here I go, rebooting the box, starting the mirror set, activating the volumes, and removing the snapshot. I try this a couple more times, to the exact same effect, before googling and realizing that kernel 2.6.16 requires lvm2 version 2.02.01 or greater, and device-mapper 1.02.02 or greater. Which, of course, since nobody on the Fedora Core team can be bothered to scratch itches like “making LVM snapshots work”, isn’t in the FC4 repository. Because all the michelangelos are designing cathedrals*–the bazaar is just a great place to get cheap rugs.

If you get to the part about the Linux Network “Net vs. Net-2 vs Net-2D” code, I’d like to point out that the “Ross” in question once stopped at my parents house to sell me a Sun E450, which I then promptly burned out by running it without plugging in the chassis fans. Good times, good times.

Story: Things I wish Linux… oh. Crap.

Tuesday, April 25th, 2006

So I got all up in arms about “the unix”. I looked at the available options, and decided “Hey, UFS2 has what I want, mostly!”, and FreeBSD has ATA hotswap. Perfect!

I downloaded FreeBSD 6.0, and tested it out. Man, I have to admit that, sure, it doesn’t have an effervescent installer, but to get up the bare bones system for a server, it’s a snap. So I got the basic install up, then went into the ports and started walking down my checklist, adding packages like a maniac. And it went pretty easy. Sure there’s some BSD-isms, like “/usr/local/etc”, but they make sense, and the installer usually gives you a heads-up.

Was there a problem? …Yes. The same problem that moved me from RedHat 9 to Fedora Core 2: Postfix and my IMAP server should always have a TLS option. Always. That’s a dealbreaker. Now, on FreeBSD it’s not that bad, because you can go into /usr/ports and start building things. No “what’s the dependancy, aw hell”… it just works. Mostly. Except the 6.0 version of Dovecot doesn’t work with the 6.0 version of GNUTLS. So, bah.

I’d have to get my fix elsewhere.

Now, my other rant was that I wanted creation date and extended attributes. Just like I had in OS/2. Because OS/2, as my friend Chris described my opinion: “sprouted fully formed from the head of Zeus”. Well… Enter JFS.

So I gave up and stuck with Linux. To get where I wanted to be, I:

  1. Broke my mirrored set
  2. Created two new md devices, a 256MB “md1″ and a 280GB “md2″, both running in degraded mode on my second drive
  3. Created a volume group on md2, and a full-span logical volume (lv0) on that volume.
  4. formatted md1 as ext2, and lv0 as JFS
  5. used star to back my root filesystem over to the new lv0
  6. set up md1 as my /boot partition
  7. installed grub
  8. pulled the old drive
  9. rebooted, then cursed god, re installed the old drive, and created a /dev directory with MAKEDEV in it
  10. rebooted again
  11. checked everything out, bagged my old drive, installed the new one.
  12. ran “sfdisk -d /dev/sdb >sfdisk /dev/sda
  13. Added the drives to the mirror sets

Of course, I did kind of have to go through a “14-through-16″ because I forgot to re-run grub on the new drive and set the bootable flags, but, hey, let’s gloss over that.

The end result? My little trip into “Captain Ahab” land has seemed to work, and I now have creation date. Of course, they all say “april 23, 2006″ but, meh. I win, sort of. And when I get two bigger drives, perhaps those 750GBs all the kids are raving about, I can just move my volume set over to a new drive, without any of this ’star’ and ‘MAKEDEV’ nonsense.

As a bonus, a little bit of OS/2 lives on. Team OS/2 for-evar!

Opinion: Things I Wish Linux Had

Saturday, April 15th, 2006
  1. Created Date, separate from ctime, that actually indicated the date that the file was first written, that would be saved across moves. HPFS had it, NTFS had it, allegedly ZFS will have it. This kind of goes with…
  2. File Streams for metadata.Why? Because metadata doesn’t belong with the file, despite what my “Just use EXIF and id3!” ranting friend says. This boils down to the “Database versus Objects” filesystem debate where unix heads complain that if it’s not just a single stream of bytes, they don’t want to dick with it. I really don’t care what they think. Just because your 38-year-old ideas work for you doesn’t mean they make sense in a world where files are complex multi-format blocks of stuff which grow in number every day. Hell, you’ve managed to make ‘name’ ‘directory’ ‘mtime’ ‘atime’ ‘owner’ ‘group’ ‘permissions’ work for you, despite their not being part of your precious stream of bytes. There needs to be a standard for things like ‘author’ ’summary’ ‘keywords’ ‘icon’ ‘type’. Yes. I’m a firm believer in the Mac-That-Was. Doesn’t mean I’m not right. Things like Spotlight and Beagle and, um, WinFS or whatever, they’re just shims. Hell, they’re basically duplicating metadata based on the bag of bytes. We need a standard, people. Jeebus!
  3. SATA Hotplug. I don’t care if it doesn’t work for old ATAPI or old “pseudo SATA” devices. Just make a framework so drivers can register that they provide hotplug to devices, and which devices might be hotpluggable. Christ. I don’t want a pony. I just want to be able to swap out my backup drive in my server, and you freaks can make it work for USB. Chop chop!
  4. Samba 4 already. To go with my hot-hot-hot file streams.
  5. A filesystem like ZFS that does automatic in-system integrity checking. Copy-on-write is fucking brilliant. I know, I know, “it makes things slower!”. “Why not just use Windows?” …why not indeed. Actually, this brings up the simple question of “Why not use Solaris 10?” …well, when the community edition comes out with the ZFS revision, I do think I shall.
Magic!