progetti:cloud-areapd:ced-c:install_nfs_cluster
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| progetti:cloud-areapd:ced-c:install_nfs_cluster [2015/06/12 10:41] – [On 1 nodes] sella@infn.it | progetti:cloud-areapd:ced-c:install_nfs_cluster [2015/09/01 19:31] (current) – [On 1 nodes] sella@infn.it | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Installation and Configuration of NFS Cluster ====== | ||
| + | |||
| + | Author: | ||
| + | * Paolo E. Mazzon (DEI) | ||
| + | * Matteo Menguzzato (DFA) | ||
| + | * Gianpietro Sella (DISC) | ||
| + | |||
| + | |||
| + | ===== Prerequisites ===== | ||
| + | |||
| + | 2 node with: | ||
| + | * Updated CentOS7 | ||
| + | * Make sure that yum autoupdate is disabled | ||
| + | <code bash> | ||
| + | root@controller-01 ~]# grep ENA / | ||
| + | # ENABLED | ||
| + | ENABLED=" | ||
| + | </ | ||
| + | * At least 20GB HD for operating system and OpenStack software and related log files | ||
| + | * SELinux configured as " | ||
| + | * EPEL 7 | ||
| + | * a data network network, IP 192.168.61.150 for node 1 and IP 192.168.61.151 for node 2 | ||
| + | * a SAN network 192.168.40.xxx | ||
| + | * a SAN dell equallogic with IP 192.168.40.110 | ||
| + | * a VIP address 192.168.61.180 for data network | ||
| + | * 2 iscsi volume on dell equallogin | ||
| + | * execute iscsi login of the equallogic volume on the 2 node and obtain, for example, the next device: / | ||
| + | |||
| + | |||
| + | ===== On 2 nodes ===== | ||
| + | |||
| + | <code bash> | ||
| + | yum install nfs-utils nfs-utils-lib | ||
| + | yum install pcs fence-agents-all | ||
| + | |||
| + | #modify / | ||
| + | |||
| + | nfsserver_monitor () | ||
| + | { | ||
| + | local pid | ||
| + | | ||
| + | if [ -n " | ||
| + | | ||
| + | else | ||
| + | | ||
| + | | ||
| + | fi | ||
| + | ........... | ||
| + | |||
| + | firewall-cmd --add-service=high-availability | ||
| + | firewall-cmd --permanent --add-service=high-availability | ||
| + | firewall-cmd --add-port=2049/ | ||
| + | firewall-cmd --permanent --add-port=2049/ | ||
| + | |||
| + | #set password for user hacluster for example ' | ||
| + | passwd hacluster | ||
| + | |||
| + | #insert in /etc/hosts | ||
| + | 192.168.61.180 nfscluster | ||
| + | |||
| + | systemctl start pcsd.service | ||
| + | systemctl enable pcsd.service | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== On 1 nodes ===== | ||
| + | |||
| + | <code bash> | ||
| + | |||
| + | pcs cluster auth cld-blu-01.data.pd.infn.it cld-blu-02.data.pd.infn.it -u hacluster -p hapassword | ||
| + | pcs cluster setup --start --name nfscluster cld-blu-01.data.pd.infn.it cld-blu-02.data.pd.infn.it | ||
| + | pcs cluster enable --all | ||
| + | pcs cluster status | ||
| + | |||
| + | #create stonith fence where dracpassword is the password for login in drac device of the nodes | ||
| + | pcs stonith create drac-cld-blu-01 fence_drac5 ipaddr=cld-blu-01-rmc.lan login=root passwd=dracpassword cmd_prompt=" | ||
| + | pcs stonith create drac-cld-blu-02 fence_drac5 ipaddr=cld-blu-02-rmc.lan login=root passwd=dracpassword cmd_prompt=" | ||
| + | pcs constraint location drac-cld-blu-01 prefers cld-blu-01.data.pd.infn.it=-INFINITY | ||
| + | pcs constraint location drac-cld-blu-02 prefers cld-blu-02.data.pd.infn.it=-INFINITY | ||
| + | |||
| + | #create volume with LVM | ||
| + | vgremove nfsclustervg | ||
| + | pvcreate / | ||
| + | vgcreate nfsclustervg / | ||
| + | lvcreate -l 100%VG -n nfsclusterlv nfsclustervg | ||
| + | mkfs.ext4 / | ||
| + | mkdir /nfscluster | ||
| + | mount / | ||
| + | mkdir -p / | ||
| + | mkdir -p / | ||
| + | mkdir -p / | ||
| + | umount /nfscluster | ||
| + | vgchange -an nfsclustervg | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== On 2 nodes ===== | ||
| + | < | ||
| + | #in the / | ||
| + | volume_list=[] | ||
| + | #then execute: | ||
| + | dracut -H -f / | ||
| + | #and reboot node | ||
| + | </ | ||
| + | |||
| + | ===== On 1 nodes ===== | ||
| + | |||
| + | <code bash> | ||
| + | |||
| + | pcs resource create nfsclusterlv LVM volgrpname=nfsclustervg exclusive=true --group nfsclusterha | ||
| + | pcs resource create nfsclusterdata Filesystem device="/ | ||
| + | pcs resource create nfsclusterserver nfsserver nfs_shared_infodir=/ | ||
| + | pcs resource create nfsclusterroot exportfs clientspec=192.168.61.0/ | ||
| + | pcs resource create nfsclusternova exportfs clientspec=192.168.61.0/ | ||
| + | pcs resource create nfsclusterglance exportfs clientspec=192.168.61.0/ | ||
| + | pcs resource create nfsclustervip IPaddr2 ip=192.168.61.180 cidr_netmask=24 --group nfsclusterha | ||
| + | pcs resource create nfsclusternotify nfsnotify source_host=192.168.61.180 --group nfsclusterha | ||
| + | pcs cluster status | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ===== On compute nodes ===== | ||
| + | < | ||
| + | mkdir /Instances | ||
| + | #create in the / | ||
| + | chown nova:nova /Instances | ||
| + | #insert in /etc/fstab: | ||
| + | 192.168.61.180: | ||
| + | mount -a | ||
| + | chown nova:nova /Instances | ||
| + | </ | ||
| + | ===== On controller/ | ||
| + | < | ||
| + | mkdir /Images | ||
| + | #create in the / | ||
| + | chown glance: | ||
| + | #insert in /etc/fstab: | ||
| + | 192.168.61.180: | ||
| + | mount -a | ||
| + | chown glance: | ||
| + | </ | ||
| + | |||
