#find your ip
ifconfig
#create folder to share
sudo mkdir -p /drbd/main/shared
#who cares about security
sudo chmod -R 777 /drbd/
#create folder where local files should appear
mkdir -p /home/centos/ocpnfs
sudo vi /etc/exports
#enter this in /etc/exports
/drbd/main/shared/ 10.0.2.15(rw)
#end of /etc/exports
sudo systemctl restart nfs
sudo exportfs -v
sudo mount -t nfs 10.0.2.15:/drbd/main/shared/ /home/centos/ocpnfs
touch /home/centos/ocpnfs/pippo.txt
Showing posts with label nfs. Show all posts
Showing posts with label nfs. Show all posts
Saturday, December 16, 2017
Sunday, October 12, 2014
Mount nfs and rpcbind
I was trying to mount a NFS4 share:
mount -t nfs 10.0.2.15:/drbd/main/shared/ /opt/oracle/domains/osbpl1do/shared
mount.nfs: Connection timed out
Of course, I forgot to start the nfs service:
/etc/init.d/nfs start
rpcinfo -p
hell on Earth... let me restart the rpcbind service:
service rpcbind restart
rpcinfo -p
at last I can start the nfs service: /etc/init.d/nfs start
mount -t nfs 10.0.2.15:/drbd/main/shared/ /opt/oracle/domains/osbpl1do/shared
mount.nfs: Connection timed out
Of course, I forgot to start the nfs service:
/etc/init.d/nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: Cannot register service: RPC: Unable to receive; errno = Connection refused
rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp).
[FAILED]
Starting NFS mountd: [FAILED]
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
rpc.nfsd: unable to set any sockets for nfsd
[FAILED]
Mmmmm, what is going on here..... I try to get some info on the rpc service:
rpcinfo -p
rpcinfo: can't contact portmapper: RPC: Remote system error - No such file or directory
hell on Earth... let me restart the rpcbind service:
service rpcbind restart
Stopping rpcbind: [FAILED] Starting rpcbind: [ OK ]
rpcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
at last I can start the nfs service: /etc/init.d/nfs start
Starting NFS services: [ OK ] Starting NFS quotas: [ OK ] Starting NFS mountd: [ OK ] Starting NFS daemon: [ OK ] Starting RPC idmapd: [ OK ]
Labels:
nfs
Saturday, September 27, 2014
Installing a NFS server, and creating a mountpoint, in 30 seconds
This on RHEL/CentOS. For lazyness simplicity I install client and server on the same box :o) whose IP is 10.0.2.15
Installing a NFS server:
http://www.howtoforge.com/setting-up-an-nfs-server-and-client-on-centos-5.5
yum install nfs-utils nfs-utils-lib
chkconfig --levels 235 nfs on
/etc/init.d/nfs start
mkdir /var/nfs
chmod 777 /var/nfs
vi /etc/exports
/var/nfs 10.0.2.15(rw,sync,no_subtree_check)
exportfs -a
Creating a mountpoint
mkdir /home/users
mount -t nfs 10.0.2.15:/var/nfs /home/users
echo ciao > /home/users/ciao.txt
cat /var/nfs/ciao.txt
ciao
done :o)
Useful links:
https://www.suse.com/communities/conversations/configuring-nfsv4-server-and-client-suse-linux-enterprise-server-10/
http://www.javamonamour.org/2014/10/mount-nfs-and-rpcbind.html
Installing a NFS server:
http://www.howtoforge.com/setting-up-an-nfs-server-and-client-on-centos-5.5
yum install nfs-utils nfs-utils-lib
chkconfig --levels 235 nfs on
/etc/init.d/nfs start
mkdir /var/nfs
chmod 777 /var/nfs
vi /etc/exports
/var/nfs 10.0.2.15(rw,sync,no_subtree_check)
exportfs -a
Creating a mountpoint
mkdir /home/users
mount -t nfs 10.0.2.15:/var/nfs /home/users
echo ciao > /home/users/ciao.txt
cat /var/nfs/ciao.txt
ciao
done :o)
Useful links:
https://www.suse.com/communities/conversations/configuring-nfsv4-server-and-client-suse-linux-enterprise-server-10/
http://www.javamonamour.org/2014/10/mount-nfs-and-rpcbind.html
Labels:
nfs
Thursday, March 13, 2014
Is storing JMS and TLOG files on a shared folder a good practice?
A friend of mine has JMS and TLOG files on a NFS4 shared folder, and shared among the 4 machines of his cluster.
Allegedly this should make his solution more "fault tolerant".
However, after 2 years in Production he has never, I say NEVER had a single machine outage (in any case, who cares about losing one, he has 4 machines in the cluster!) , on the other hand he had a few (at least 3) network glitches who made the NFS server unreachable for a period between a few minutes to a couple of hours.... this making ALL his solution completely unavailable.
So... if I had to make a choice, I would rather avoid NFS at all. If your main use case for NFS is that it makes it easier to deploy configuration files and applications, then consider using Puppet or use a different staging model.
Allegedly this should make his solution more "fault tolerant".
However, after 2 years in Production he has never, I say NEVER had a single machine outage (in any case, who cares about losing one, he has 4 machines in the cluster!) , on the other hand he had a few (at least 3) network glitches who made the NFS server unreachable for a period between a few minutes to a couple of hours.... this making ALL his solution completely unavailable.
So... if I had to make a choice, I would rather avoid NFS at all. If your main use case for NFS is that it makes it easier to deploy configuration files and applications, then consider using Puppet or use a different staging model.
Labels:
nfs
Saturday, April 14, 2012
WebLogic and NFS, the odd couple...
It's a sort of metropolitan legend that NFS is "not fully supported" with WebLogic (I guess "not fully supported" means "it works unless you do something naughty").
Here is the Official Oracle Reference:
http://docs.oracle.com/cd/E14571_01/web.1111/e13814/storetune.htm#CACFDGCA
In fact I had heard in the past that SAN is recommended over NFS.
Some salient excerpts from the above document:
“Oracle strongly recommends verifying the behavior of a server restart after abrupt machine failures when the JMS messages and transaction logs are stored on an NFS mounted directory.”
“The NFS storage device does not become aware of machine failure in a timely manner and the locks are not released by the storage device. As a result, after abrupt machine failure, followed by a restart, any subsequent attempt by WebLogic Server to acquire locks on the previously locked files may fail.”
ONE workaround they suggest is to “disable file locking” on the FileStores of any kind (diagnostics, default, custom file stores, JMS logs...)
Here is the Official Oracle Reference:
http://docs.oracle.com/cd/E14571_01/web.1111/e13814/storetune.htm#CACFDGCA
In fact I had heard in the past that SAN is recommended over NFS.
Some salient excerpts from the above document:
“Oracle strongly recommends verifying the behavior of a server restart after abrupt machine failures when the JMS messages and transaction logs are stored on an NFS mounted directory.”
“The NFS storage device does not become aware of machine failure in a timely manner and the locks are not released by the storage device. As a result, after abrupt machine failure, followed by a restart, any subsequent attempt by WebLogic Server to acquire locks on the previously locked files may fail.”
ONE workaround they suggest is to “disable file locking” on the FileStores of any kind (diagnostics, default, custom file stores, JMS logs...)
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:
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 10.46.38.45), actually shielding the 2 (or more?) instances of physical servers.
More in DRDB here.
More on NFS here.
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)
//blablabla.acme.com/PIPPOPPRD 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=10.46.38.45)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 10.46.38.45), actually shielding the 2 (or more?) instances of physical servers.
More in DRDB here.
More on NFS here.
Subscribe to:
Posts (Atom)
