Archive for January 2009

Find architechture of installed RPM package

When trying to find a rpm package on a 64 bit installation of Red Hat, you will sometime encounter two packages with the same name:

# rpm -qa zlib

This happens when a 32 as well as a 64 bit package exists on the server. If you want to find out which is which, you will have to use a somewhat trickier rpm command:

rpm -qa --qf "%{n}-%{v}-%{r}.%{arch}\n" zlib


Howto extend a ext3 filesystem in RHEL5

In RHEL5 ext2online is no longer available. However, do not despair – you can still grow your ext3 filesystems while online: The functionality has been included in resize2fs so to resize a logical volume, start by extending the volume:

# lvextend -L +2G /dev/systemvg/homelv

And the resize the filesystem:

# resize2fs /dev/systemvg/homelv (by omitting the size argument resize2fs defaults to using the available space in the partition/lv)