Saturday, April 14, 2012

Centos drbd nfs

We are using a dual machine mounting Centos and the drbd NFS package (it's free!) to ensure a shared NFS storage with a mirror, sinchronized in case 1 disk crashes.

On any server mounting this device, if I do "mount" I see:

/dev/mapper/rootvg-rootlv on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/mapper/rootvg-optlv on /opt type ext3 (rw)
/dev/mapper/rootvg-homelv on /home type ext3 (rw)
/dev/mapper/rootvg-tmplv on /tmp type ext3 (rw)
/dev/mapper/rootvg-varlv on /var type ext3 (rw)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
// on /data/bo/bu type cifs (rw,mand,noexec,nosuid,nodev)
/dev/mapper/rootvg-hypericlv on /home/hyperic type ext3 (rw)
peppettone-vip2:/drbd/main/shared/ on /opt/oracle/domains/osbdomain/shared type nfs (rw,user=root,noexec,nosuid,nodev,user,addr=

As you can see, the last entry peppettone is of type nfs (the cifs is the Samba share).

This is a quite interesting article on how a Highly Available NFS share is setup (it's 5 pages long...).

Notice that the NFS share is represented by a Virtual IP address (the, actually shielding the 2 (or more?) instances of physical servers.

More in DRDB here.
More on NFS here.

No comments: