Archive

Archive for the ‘CentOS’ Category

DRBD , Centos and unmount nfs resources

April 20th, 2009 1 comment

I have recently built a DRBD + Linux HA NFS cluster , part of the structure was to create a drbd disk resource and mount it on /var/lib/nfs. This allows to switch nfs over to the secondary node without getting “stale nfs handle” errors. Heartbeat was having a hardtime doing a clean umount of the file system and ended up rebooting the machine.

Apr 20 06:47:07 fs Filesystem[9823]: [9887]: INFO: No processes on /var/lib/nfs were signalled
Apr 20 06:47:08 fs Filesystem[9823]: [9890]: ERROR: Couldn’t unmount /var/lib/nfs; trying cleanup with SIGKILL

After some poking around the systems It looked like nfs was not showtdown cleanly. looking into the rc script i changed the signal from 2 to 9

From :

stop)
# Stop daemons.
echo -n $”Shutting down NFS mountd: ”
killproc rpc.mountd
echo
echo -n $”Shutting down NFS daemon: ”
killproc nfsd -2
echo

To :

stop)
# Stop daemons.
echo -n $”Shutting down NFS mountd: ”
killproc rpc.mountd
echo
echo -n $”Shutting down NFS daemon: ”
killproc nfsd -9
echo

and now, all is well :)

Apr 20 06:52:49 fs Filesystem[8696]: [8754]: INFO: unmounted /var/lib/nfs successfully

searching the web shows this is a somewhat known issue

Check postgesql table size

March 23rd, 2009 No comments

SELECT relname, reltuples, relpages * 8 / 1024 AS “MB” FROM pg_class ORDER BY relpages DESC;

original post

Centos5: nfs clients get premission denied

February 18th, 2009 No comments

While working on ny NFS cluster project , I could not mount my nfs exports from clients ( FreBSD & Centos ).

on the FreeBSD client I got these responses :
[udp] server:/data/dir1: Permission denied
on the CentOS client I got these responses:
mount: server:/data/dir1 failed, reason given by server: Permission denied

On the Centos NFS server the logs showed :
mountd[12377]: authenticated mount request from client1:984 for /data/dir1 (/data/dir1)

Turns out there’s a bug in CentOS and modprobe does not mount the nfsd procs , you can fix the issue by adding :

none /proc/fs/nfsd nfsd auto 0 0

to /etc/fstab
or manually ( if you want to make sure that is the issue ) :

/bin/mount -t nfsd nfsd /proc/fs/nfsd

Setup NTP on CentOS 5.2

February 17th, 2009 No comments

I am working on building a DRBD cluster and as with all cluster tools , you must have a synced time between nodes.

1. install ntp
yum -y install ntp
2. enable ntp on boot
chkconfig ntpd on
3.run a manual time sync before starting the service
ntpdate 0.pool.ntp.org
4. start the service
service ntpd start

Install Dell Openmanage on CentOS 5.2

January 24th, 2009 No comments

follow this link : Dell OMSA 5.5 Linux repository