29 June, 2009

RANT: Man, I HATE Microsoft Word!!!

Oh my God how I hate MS Word. It is the spawn of the devil, a productivity vampire leech, the most vile and inconsequent piece of crap that has ever graced a computer with its idiocy.
And I am forced to use it at work because we're standardized on Word and the rest of MS Office of course.
At work I often write reports. They include simple things like headings, Table of Contents, headers, footers and pictures and tables with captions. Also, we often collaborate so we use change marks quite liberally, and also a versioning document storage system. There are internally developed macros that make it fairly easy to keep formatting consistent etc. However, picture handling is appalling. I become a nervous wreck every time I have to insert pictures because no matter how I try, the pictures float around willy-nilly, captions end up wherever in relation to the picture and settings for the picture get completely lost! If I set the text to wrap top and bottom and position it relative to line and margin it should stay that way, but nooooo, as soon as I resize or try do do any minor changes the settings are comlpetely forgotten and picture starts to play hide and seek again. I HATE IT!!!
I yearn for the simplicity of Framemaker (version 5 last I used it), where you tell the picture where it goes and it and its caption stay there until you change it. You can easily anchor it to the text and while the text may change and reflow, the picture (and its caption!) nicely follows along without destroying formatting.
We use Office 2003 and man do I hope that 2007 or 2010 are better because I have no doubt that no changes will be forthcoming regarding the approved office programs that my company uses.
Maybe I just need a course to learn how to work in Word again, but I think that Word 5 actually handled things allright, and ever since then the quality has been going down-hill.
By the way, I feel better now. Maybe I can actually go back and fight some more to get the pictures where I want them. Blogging is good for your heart ;-)

08 June, 2009

Adding LVM2 for flexible volume management on top of RAID

So as I mentioned a while back I also added LVM2 (Logical Volume Management) on top of my software RAID arrays (well, only one of them so far). This is really easy as LVM can use any existing partitions, be they actual regular partitions or RAID partitions. Here's what I did:
First tell lvm which existing partitions you want to use (pv stands for "physical volume"). In my case there are three RAID arrays
lvm pvcreate /dev/md0
lvm pvcreate /dev/md1
lvm pvcreate /dev/md2
You can probably leave out lvm, it seems to work anyway. The same goes for all commands below, I just included them for completeness.
Then you create an actual volume group out of each physical volume (I guess this adds data structures so that lvm can keep track of the logical volumes you create in the next step, and any changes later on). I only use one of the physical volumes due to the issue with hal that I mentioned in the previous post. data is my name for the volume group.
lvm vgcreate /dev/md0 data
I then add the logical volumes that I want. These are then used like ordinary partitions and must be formatted with a file system before use. You decide how large the logical volumes should be and their name. The final part of the command tells lvm which volume group should be used according to the name in the previous command.
lvm lvcreate --size 200G --name home data
lvm lvcreate --size 200G --name bkp data
lvm lvcreate --size 800G --name media data
These "partitions" will then show up in in /dev/mapper/home, /dev/mapper/bkp, /dev/mapper/media and can be formatted and mounted like any regular partition. Note that I did leave quite a bit of space unused, mainly this is for testing resizing later on. The nice thing with lvm is that you can eaily resize these things as disk space is added to the volume group, but of course the file system must be able to handle it.
Finally to get my Arch Linux system to recognize the volumes I modified the lvm line in /etc/rc.conf to read:
USELVM="yes"
And then I added a couple of hooks in /etc/mkinitcpio.conf, one for RAID and one for LVM2, so that the volumes are recognized when the system boots: mdadm lvm2
Finally I rebuilt the kernel and initrd to include the hooks by just letting pacman reinstall with the new settings:
pacman -Sy kernel26
This is probably the easiest way although you can rebuild manually as well of course, if you have specific requirements.
And then it was a breeze to install Arch, telling it to use the logical volumes home, bkp, and media wherever I wanted them in the file system. home is obviously used for home directories (currently mainly used for "backing up" home directories on other computers), bkp is used for backup storage of family photos and videos (and probably other stuff too in the future), while media is used to store recorded TV (Mythtv recordings as well as old movies) and our audio library (including iTunes audio - only iTunes Plus so it is portable). The setup seems to work very well, but we'll see if any problems arise in case I have all four tuners recording at the same time... :D
Btw, you can actually boot from a RAID/LVM2 partition as well but I did not want to do this, I want the system to boot even if there's something wrong with this slightly complex setup.