Next Previous Contents

5. About glibc

Virtualfs requires a slightly modified glibc package. RPMs for RedHat 5.2 and 6.0 are supplied on the ftp site. Note that Virtualfs is not red-hat specific. One can applied the diffs (supplied for glibc 2.0.7 or 2.1.1) to produce a suitable glibc for any distribution (using glibc, distribution using older libc5 are not supported).

5.1 What was changed

Not much!

Virtualfs relies on the weak_alias functionality (see the "principles" section). Many symbols were simply not available (private) from glibc. So the patch make those symbols visible. The patch is harmless. It does not change the behavior of glibc, but enable Virtualfs to override some behavior. The is a small exception for the stat and lstat function, because those function are often compiled inline in the various programs.

So running this new glibc is a safe bet. Well, there is always place for a bug :-), so test it on your workstation first, before updating your most important server :-)

5.2 Ftp site

You will find the patched glibc at ftp://ftp.solucorp.qc.ca/pub/virtualfs/glibc. There is a sub-directory for each supported distribution. You will also find the diffs for glibc 2.0.7 and 2.1.1 there.

5.3 Upgrading glibc

(A little note)

After upgrading glibc, run the command "/sbin/init -u", and this will cure the problem outlined below.

(end of note)

Note that upgrading glibc is simple, but cause a little problem. You better know this before you update. Note that this problem is not caused by the modified glibc. It is caused by the fact that glibc is so central to linux operation. To make a short story, glibc may be upgrade like any other package, using the rpm -U command. Note that while I provide all the rpms on the ftp site, only the main glibc package need to be update. You may want to install the -devel and -profile package, but it is not necessary for Virtualfs.

So what is the problem then ?

glibc is used by all programs. So if you upgrade glibc, currently running programs will continue to operate (using the old/erased version of the library). No problem there. New programs will be started using the new library and all will be fine.

So what is the problem then ?

The problem will only show at shutdown time. I have not investigate the exact cause. The shutdown won't end cleanly. This means that at the next reboot, fsck will kicks in claiming that there were an unclean shutdown. On large disk, fsck takes some time to complete.

Note that once you have rebooted with the new glibc, shutdown will proceed normally from now on. The problem only show up when you upgrade, and this is unrelated to Virtualfs. For example, if you do

        rpm -U glibc-2.0.7-29.i386.rpm --force
        

on a Red-Hat-5.2 system, you will experience the shutdown problem. Note that this command is updating glibc to the same version already installed (this is why --force is used). This is just to show that the shutdown problem is related to updating glibc, independent on the glibc version you upgrade to.

Note also that this is not a glibc flaw. It is just that glibc is at the center of linux operation, so switching to a new one on a live system exhibit a side effect. This side effect is harmless. It just takes a couple minutes to complete the first reboot after the update.

If you have a rescue disk, you can perform the upgrade from there and you won't see this problem.

5.4 Upgrading glibc on Mandrake 7.x

You can safely use the patched glibc version available for RedHat 6.2. Because Mandrake package glibc a little differently, you will end up with some conflicts (some locale resource files). Use rpm option "--nodeps" to solve this. I have done this on a few mandrake machines.


Next Previous Contents