2011年9月22日 星期四

Setting up NFS v4 in RHEL6 / CentOS6 with user authentication

Prior to NFS v4, NFS authentication are made via hosts authentication.

Starting from NFS v4,

To allow user id mapping to work in NFS v4, one have to edit /etc/idmapd.conf to match with the DNS domain name of associated hosts.

2011年9月20日 星期二

RHEL / CentOS nic mapping via udev.d

To re-arrange the eth numbering of a nic device, one have to edit /etc/udev/rules.d/70-persistent-net.rules and follow by a system reboot. 


[root@dumphost ~]# cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x14e4:0x1639 (bnx2) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="98:4b:e1:66:09:ee", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x14e4:0x1639 (bnx2) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="98:4b:e1:66:29:40", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x14e4:0x1639 (bnx2) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="98:4b:e1:66:29:42", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

# PCI device 0x14e4:0x1639 (bnx2) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="98:4b:e1:66:09:ec", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

2011年7月31日 星期日

RHEL / CentOS change default settings of nfs client

In CentOS 6 / RHEL6,  nfs client is defaulted to mount as version 4. For any reason one would want to mount nfs as version 3, here is the options to do so

[root@dumphost ~]# showmount -e nfshost
Export list for nfshost:
/nfs *
[root@dumphost ~]# mount -o vers=3 nfshost:/nfs /mnt
[root@dumphost ~]# mount
nfshost/nfs on /mnt type nfs (rw,vers=3,addr=10.1.0.2)

In any case you want version 3 be set as default, uncomment the option Defaultvers from /etc/nfsmount.conf and change it from 4 to 3.

[root@dumphost ~]# grep  Defaultvers  /etc/nfsmount.conf
# Defaultvers=4
Defaultvers=3