SlideShare a Scribd company logo
Highly Available NFS Server Scenario NFS Server1  nfs1.example.com  192.168.1.X NFS Server2  nfs2.example.com  192.168.1.X Virtual IP-Address  192.168.1.X NFS client For  WebServers or FTP Servers
Install ubuntu-dapper on both system  Crate two seprate partition on both  /dev/hdax  (For DRBD's meta data /dev/hday   ( For Shared Directory like /web) /dev/hdax should be more than 128MB /dev/hday should be identical in size on both system Do not mount /dev/hdax and /dev/hday during installation How To Install Ubuntu
Installation and Configuration of DRBD 1)  Synchronize System Time with date command or ntp 2) Install NFS server on both nfs1 and nfs2  sudo apt-get install  nfs-kernel-server 3) Remove starup scripts , because heartbeat will  controll NFS sudo update-rc.d -f nfs-kernel-server remove sudo update-rc.d -f nfs-common remove
4) Create NFS Share on both nfs server /web/site  192.168.1.0/255.255.255.0(rw,no_root_squash,no_all_squash,sync) 5) Install Linux kernel headers and  DRDB on both NFS Server sudo apt-get install  linux-headers-`uname -r` sudo apt-get install drbd0.7-module-source sudo apt-get install drbd0.7-utils Installation and Configuration of DRBD Contd.....
Installation Contd......   cd /usr/src/ sudo tar xvfz drbd0.7.tar.gz cd modules/drbd/drbd sudo make sudo make install 6)  Configure /etc/drbd.conf file on both NFS Server , and it must  be identical vi /etc/drbd.conf resource r0 { protocol C; incon-degr-cmd "echo '!DRBD! pri on incon-degr' | mail abhishek.singh@fosteringlinux.com ; sleep 60"; startup { degr-wfc-timeout 120;  # 2 minutes. }
Configuration Contd............... disk { on-io-error  detach; } net { } syncer { rate 10M; group 1; al-extents 257; }
Configuration Contd............... on nfs1 {  # ** EDIT ** the hostname of server 1 (uname -n) device  /dev/drbd0;  # disk  /dev/hday;  # ** EDIT ** data partition on server 1 address  192.168.1.x:7788; # ** EDIT ** IP address on server 1 meta-disk  /dev/hdax[0];  #* EDIT * 128MB partition for DRBD onserver1 } on nfs2 {  # ** EDIT ** the hostname of server 2 (uname -n) device  /dev/drbd0;  # disk  /dev/hday;  # ** EDIT ** data partition on server 2 address  192.168.1.x:7788;  # ** EDIT ** IP address on server 2 meta-disk /dev/hdax[0];  # * EDIT * 128MB partition for DRBD on server 2 } } Replcae with slave NFS Server IP Address Replcae x and y with partition number Replcae with master NFS Server IP Address Replcae x and y with partition number
6) Now load DRBD kernel module in memory modprobe drbd Note:  Next time drbd init script will load the module drbdadm up all cat /proc/drbd 7)Make data consistent on both server Run following command on nfs1 machine drbdadm -- --do-what-I-say primary all drbdadm -- connect all cat /proc/drbd  ( To check progress of data initial sync  )
How To sync NFS lock and other information from Primary to Slave Server 1) Create Directory on both server mkdir /web 2) Do following on server nfs1 mount -t ext3 /dev/drbd0 /web mv /var/lib/nfs/ /web/ ln -s /web/nfs/ /var/lib/nfs mkdir /web/site umount /web 3) Do following on server nfs2 rm -fr /var/lib/nfs/ ln -s /web/nfs/ /var/lib/nfs
How To install and configure Hearbeat 1 ) Install Hearbeat on both the server sudo apt-get install heartbeat 2) Now Edit following three files on both NFS servers  /etc/heartbeat/ha.cf  logfacility  local0 keepalive 2 deadtime 30 bcast  eth0 node nfs1 nfs2 /etc/heartbeat/haresources nfs1  IPaddr::192.168.1.x/24/eth0 drbddisk::r0 Filesystem::/dev/drbd0::/web::ext3 nfs-kernel-server Replace with Virtual Ipaddress
Configuration Contd.............. 3)Set Password for heartbeat communication /etc/authkeys auth 3 3 md5 fosteringlinux 4) Make /etc/authkeys readble by root only chmod  600 /etc/authkeys Replace with your string
Start DRBD and heartbeat on both NFS server #sudo /etc/init.d/drbd start #sudo /etc/init.d/heartbeat start Testing 1) Check virtual ipaddress on master nfs server (nfs1) ifconfig mount 2) Do same on slave nfs server (nfs2) Note: There should not be virtual ipaddress and mounted /content directory
Testing Continued............. 2) Replicate Server Failure  Create any directory or file on NFS server (nfs1) mkdir /web/site/failure Stop hearbeat on NFS server (nfs1) #sudo /etc/init.d/heartbeat stop 3) Check slave server Virtual Ipaddess ,exported /web  ifconfig mount created failure directory should be there cd  /web/site ls
4)   Do same on slave Create any file and directory in /web/site mkdir /web/site/success Stop heartbeat on Slave (nfs2) 5) Run these commands on master so now VIP and /web should be on master ifconfig mount df -h -T
Configure NFS Client mkdir /web mount -t nfs  192.168.1.x:/web/site /web Note: Replace 192.168.1.x with Virtual Ipaddress vi /etc/fstab 192.168.1.x:/web/site  /web  nfs  rw  0  0 Replace with Virtual IP addess
Ad

More Related Content

What's hot (20)

nouka inventry manager
nouka inventry managernouka inventry manager
nouka inventry manager
Toshiaki Baba
 
Qt native built for raspberry zero
Qt native built for  raspberry zeroQt native built for  raspberry zero
Qt native built for raspberry zero
SoheilSabzevari2
 
3 manual installation of open vpn
3 manual installation of open vpn3 manual installation of open vpn
3 manual installation of open vpn
Ashwajit Maske
 
От sysV к systemd
От sysV к systemdОт sysV к systemd
От sysV к systemd
Denis Kovalev
 
Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Proxy server ubuntu 12.04
Proxy server ubuntu 12.04
Tio Aldiansyah
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
NLJUG
 
LSA2 - 02 Control Groups
LSA2 - 02   Control GroupsLSA2 - 02   Control Groups
LSA2 - 02 Control Groups
Marian Marinov
 
Unix 6 en
Unix 6 enUnix 6 en
Unix 6 en
Simonas Kareiva
 
LSA2 - 01 Virtualization with KVM
LSA2 - 01 Virtualization with KVMLSA2 - 01 Virtualization with KVM
LSA2 - 01 Virtualization with KVM
Marian Marinov
 
BlankOn Server - Lesson Learned
BlankOn Server - Lesson LearnedBlankOn Server - Lesson Learned
BlankOn Server - Lesson Learned
Andika Triwidada
 
NetBSDworkshop
NetBSDworkshopNetBSDworkshop
NetBSDworkshop
Jun Ebihara
 
OSS AWS 핸즈온 강의
OSS AWS 핸즈온 강의OSS AWS 핸즈온 강의
OSS AWS 핸즈온 강의
Juhong Jung
 
Hadoop Installation and basic configuration
Hadoop Installation and basic configurationHadoop Installation and basic configuration
Hadoop Installation and basic configuration
Gerrit van Vuuren
 
CoreOSによるDockerコンテナのクラスタリング
CoreOSによるDockerコンテナのクラスタリングCoreOSによるDockerコンテナのクラスタリング
CoreOSによるDockerコンテナのクラスタリング
Yuji ODA
 
NetBSD workshop
NetBSD workshopNetBSD workshop
NetBSD workshop
Jun Ebihara
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administration
Mohammed Farrag
 
MongoDB Shard Cluster
MongoDB Shard ClusterMongoDB Shard Cluster
MongoDB Shard Cluster
Anuchit Chalothorn
 
Linux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementLinux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware Management
Kenny (netman)
 
Ansible as a better shell script
Ansible as a better shell scriptAnsible as a better shell script
Ansible as a better shell script
Takuya Nishimoto
 
Run wordcount job (hadoop)
Run wordcount job (hadoop)Run wordcount job (hadoop)
Run wordcount job (hadoop)
valeri kopaleishvili
 
nouka inventry manager
nouka inventry managernouka inventry manager
nouka inventry manager
Toshiaki Baba
 
Qt native built for raspberry zero
Qt native built for  raspberry zeroQt native built for  raspberry zero
Qt native built for raspberry zero
SoheilSabzevari2
 
3 manual installation of open vpn
3 manual installation of open vpn3 manual installation of open vpn
3 manual installation of open vpn
Ashwajit Maske
 
От sysV к systemd
От sysV к systemdОт sysV к systemd
От sysV к systemd
Denis Kovalev
 
Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Proxy server ubuntu 12.04
Proxy server ubuntu 12.04
Tio Aldiansyah
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
NLJUG
 
LSA2 - 02 Control Groups
LSA2 - 02   Control GroupsLSA2 - 02   Control Groups
LSA2 - 02 Control Groups
Marian Marinov
 
LSA2 - 01 Virtualization with KVM
LSA2 - 01 Virtualization with KVMLSA2 - 01 Virtualization with KVM
LSA2 - 01 Virtualization with KVM
Marian Marinov
 
BlankOn Server - Lesson Learned
BlankOn Server - Lesson LearnedBlankOn Server - Lesson Learned
BlankOn Server - Lesson Learned
Andika Triwidada
 
OSS AWS 핸즈온 강의
OSS AWS 핸즈온 강의OSS AWS 핸즈온 강의
OSS AWS 핸즈온 강의
Juhong Jung
 
Hadoop Installation and basic configuration
Hadoop Installation and basic configurationHadoop Installation and basic configuration
Hadoop Installation and basic configuration
Gerrit van Vuuren
 
CoreOSによるDockerコンテナのクラスタリング
CoreOSによるDockerコンテナのクラスタリングCoreOSによるDockerコンテナのクラスタリング
CoreOSによるDockerコンテナのクラスタリング
Yuji ODA
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administration
Mohammed Farrag
 
Linux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware ManagementLinux fundamental - Chap 12 Hardware Management
Linux fundamental - Chap 12 Hardware Management
Kenny (netman)
 
Ansible as a better shell script
Ansible as a better shell scriptAnsible as a better shell script
Ansible as a better shell script
Takuya Nishimoto
 

Similar to testing-nfs (20)

LinuxKit Swarm Nodes
LinuxKit Swarm NodesLinuxKit Swarm Nodes
LinuxKit Swarm Nodes
Moby Project
 
Network File System (NFS)
Network File System (NFS)Network File System (NFS)
Network File System (NFS)
abdullah roomi
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
badamisri
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
badamisri
 
Linux Conf Admin
Linux Conf AdminLinux Conf Admin
Linux Conf Admin
Srinivas Badami
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02
FNian
 
Linux
LinuxLinux
Linux
Kavi Bharathi R
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installation
Ankit Desai
 
DNS (BIND) on CentOS
DNS (BIND) on CentOSDNS (BIND) on CentOS
DNS (BIND) on CentOS
Md Tanjil Islam Bappi
 
FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016
Muhammad Moinur Rahman
 
Alta disponibilidad en GNU/Linux
Alta disponibilidad en GNU/LinuxAlta disponibilidad en GNU/Linux
Alta disponibilidad en GNU/Linux
Guillermo Salas Macias
 
High Availability With DRBD & Heartbeat
High Availability With DRBD & HeartbeatHigh Availability With DRBD & Heartbeat
High Availability With DRBD & Heartbeat
Chris Barber
 
NFS.ppt
NFS.pptNFS.ppt
NFS.ppt
Salman K.h
 
Prosit google-cloud
Prosit google-cloudProsit google-cloud
Prosit google-cloud
UC Davis
 
Sun raysetup
Sun raysetupSun raysetup
Sun raysetup
Portal Oliveira
 
Tinydns and dnscache
Tinydns and dnscacheTinydns and dnscache
Tinydns and dnscache
Yonit Gruber-Hazani
 
Oreilly Webcast 01 19 10
Oreilly Webcast 01 19 10Oreilly Webcast 01 19 10
Oreilly Webcast 01 19 10
Sean Hull
 
Linux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of TechnologyLinux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of Technology
Nugroho Gito
 
Rhel3
Rhel3Rhel3
Rhel3
Yash Gulati
 
LinuxKit Swarm Nodes
LinuxKit Swarm NodesLinuxKit Swarm Nodes
LinuxKit Swarm Nodes
Moby Project
 
Network File System (NFS)
Network File System (NFS)Network File System (NFS)
Network File System (NFS)
abdullah roomi
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
badamisri
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
badamisri
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02
FNian
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installation
Ankit Desai
 
High Availability With DRBD & Heartbeat
High Availability With DRBD & HeartbeatHigh Availability With DRBD & Heartbeat
High Availability With DRBD & Heartbeat
Chris Barber
 
Prosit google-cloud
Prosit google-cloudProsit google-cloud
Prosit google-cloud
UC Davis
 
Oreilly Webcast 01 19 10
Oreilly Webcast 01 19 10Oreilly Webcast 01 19 10
Oreilly Webcast 01 19 10
Sean Hull
 
Linux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of TechnologyLinux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of Technology
Nugroho Gito
 
Ad

Recently uploaded (20)

Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
Understanding SEO in the Age of AI.pdf
Understanding SEO in the Age of AI.pdfUnderstanding SEO in the Age of AI.pdf
Understanding SEO in the Age of AI.pdf
Fulcrum Concepts, LLC
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Middle East and Africa Cybersecurity Market Trends and Growth Analysis
Middle East and Africa Cybersecurity Market Trends and Growth Analysis Middle East and Africa Cybersecurity Market Trends and Growth Analysis
Middle East and Africa Cybersecurity Market Trends and Growth Analysis
Preeti Jha
 
Right to liberty and security of a person.pdf
Right to liberty and security of a person.pdfRight to liberty and security of a person.pdf
Right to liberty and security of a person.pdf
danielbraico197
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Computer Systems Quiz Presentation in Purple Bold Style (4).pdf
Computer Systems Quiz Presentation in Purple Bold Style (4).pdfComputer Systems Quiz Presentation in Purple Bold Style (4).pdf
Computer Systems Quiz Presentation in Purple Bold Style (4).pdf
fizarcse
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
AI and Gender: Decoding the Sociological Impact
AI and Gender: Decoding the Sociological ImpactAI and Gender: Decoding the Sociological Impact
AI and Gender: Decoding the Sociological Impact
SaikatBasu37
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
HusseinMalikMammadli
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
Developing Product-Behavior Fit: UX Research in Product Development by Krysta...
Developing Product-Behavior Fit: UX Research in Product Development by Krysta...Developing Product-Behavior Fit: UX Research in Product Development by Krysta...
Developing Product-Behavior Fit: UX Research in Product Development by Krysta...
UXPA Boston
 
In-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptx
In-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptxIn-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptx
In-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptx
aptyai
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
論文紹介:"InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning" ...
論文紹介:"InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning" ...論文紹介:"InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning" ...
論文紹介:"InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning" ...
Toru Tamaki
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025
Damco Salesforce Services
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
Understanding SEO in the Age of AI.pdf
Understanding SEO in the Age of AI.pdfUnderstanding SEO in the Age of AI.pdf
Understanding SEO in the Age of AI.pdf
Fulcrum Concepts, LLC
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Middle East and Africa Cybersecurity Market Trends and Growth Analysis
Middle East and Africa Cybersecurity Market Trends and Growth Analysis Middle East and Africa Cybersecurity Market Trends and Growth Analysis
Middle East and Africa Cybersecurity Market Trends and Growth Analysis
Preeti Jha
 
Right to liberty and security of a person.pdf
Right to liberty and security of a person.pdfRight to liberty and security of a person.pdf
Right to liberty and security of a person.pdf
danielbraico197
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Computer Systems Quiz Presentation in Purple Bold Style (4).pdf
Computer Systems Quiz Presentation in Purple Bold Style (4).pdfComputer Systems Quiz Presentation in Purple Bold Style (4).pdf
Computer Systems Quiz Presentation in Purple Bold Style (4).pdf
fizarcse
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
AI and Gender: Decoding the Sociological Impact
AI and Gender: Decoding the Sociological ImpactAI and Gender: Decoding the Sociological Impact
AI and Gender: Decoding the Sociological Impact
SaikatBasu37
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)
HusseinMalikMammadli
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
Developing Product-Behavior Fit: UX Research in Product Development by Krysta...
Developing Product-Behavior Fit: UX Research in Product Development by Krysta...Developing Product-Behavior Fit: UX Research in Product Development by Krysta...
Developing Product-Behavior Fit: UX Research in Product Development by Krysta...
UXPA Boston
 
In-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptx
In-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptxIn-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptx
In-App Guidance_ Save Enterprises Millions in Training & IT Costs.pptx
aptyai
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
論文紹介:"InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning" ...
論文紹介:"InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning" ...論文紹介:"InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning" ...
論文紹介:"InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning" ...
Toru Tamaki
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025
Damco Salesforce Services
 
Ad

testing-nfs

  • 1. Highly Available NFS Server Scenario NFS Server1 nfs1.example.com 192.168.1.X NFS Server2 nfs2.example.com 192.168.1.X Virtual IP-Address 192.168.1.X NFS client For WebServers or FTP Servers
  • 2. Install ubuntu-dapper on both system Crate two seprate partition on both /dev/hdax (For DRBD's meta data /dev/hday ( For Shared Directory like /web) /dev/hdax should be more than 128MB /dev/hday should be identical in size on both system Do not mount /dev/hdax and /dev/hday during installation How To Install Ubuntu
  • 3. Installation and Configuration of DRBD 1) Synchronize System Time with date command or ntp 2) Install NFS server on both nfs1 and nfs2 sudo apt-get install nfs-kernel-server 3) Remove starup scripts , because heartbeat will controll NFS sudo update-rc.d -f nfs-kernel-server remove sudo update-rc.d -f nfs-common remove
  • 4. 4) Create NFS Share on both nfs server /web/site 192.168.1.0/255.255.255.0(rw,no_root_squash,no_all_squash,sync) 5) Install Linux kernel headers and DRDB on both NFS Server sudo apt-get install linux-headers-`uname -r` sudo apt-get install drbd0.7-module-source sudo apt-get install drbd0.7-utils Installation and Configuration of DRBD Contd.....
  • 5. Installation Contd...... cd /usr/src/ sudo tar xvfz drbd0.7.tar.gz cd modules/drbd/drbd sudo make sudo make install 6) Configure /etc/drbd.conf file on both NFS Server , and it must be identical vi /etc/drbd.conf resource r0 { protocol C; incon-degr-cmd "echo '!DRBD! pri on incon-degr' | mail abhishek.singh@fosteringlinux.com ; sleep 60"; startup { degr-wfc-timeout 120; # 2 minutes. }
  • 6. Configuration Contd............... disk { on-io-error detach; } net { } syncer { rate 10M; group 1; al-extents 257; }
  • 7. Configuration Contd............... on nfs1 { # ** EDIT ** the hostname of server 1 (uname -n) device /dev/drbd0; # disk /dev/hday; # ** EDIT ** data partition on server 1 address 192.168.1.x:7788; # ** EDIT ** IP address on server 1 meta-disk /dev/hdax[0]; #* EDIT * 128MB partition for DRBD onserver1 } on nfs2 { # ** EDIT ** the hostname of server 2 (uname -n) device /dev/drbd0; # disk /dev/hday; # ** EDIT ** data partition on server 2 address 192.168.1.x:7788; # ** EDIT ** IP address on server 2 meta-disk /dev/hdax[0]; # * EDIT * 128MB partition for DRBD on server 2 } } Replcae with slave NFS Server IP Address Replcae x and y with partition number Replcae with master NFS Server IP Address Replcae x and y with partition number
  • 8. 6) Now load DRBD kernel module in memory modprobe drbd Note: Next time drbd init script will load the module drbdadm up all cat /proc/drbd 7)Make data consistent on both server Run following command on nfs1 machine drbdadm -- --do-what-I-say primary all drbdadm -- connect all cat /proc/drbd ( To check progress of data initial sync )
  • 9. How To sync NFS lock and other information from Primary to Slave Server 1) Create Directory on both server mkdir /web 2) Do following on server nfs1 mount -t ext3 /dev/drbd0 /web mv /var/lib/nfs/ /web/ ln -s /web/nfs/ /var/lib/nfs mkdir /web/site umount /web 3) Do following on server nfs2 rm -fr /var/lib/nfs/ ln -s /web/nfs/ /var/lib/nfs
  • 10. How To install and configure Hearbeat 1 ) Install Hearbeat on both the server sudo apt-get install heartbeat 2) Now Edit following three files on both NFS servers /etc/heartbeat/ha.cf logfacility local0 keepalive 2 deadtime 30 bcast eth0 node nfs1 nfs2 /etc/heartbeat/haresources nfs1 IPaddr::192.168.1.x/24/eth0 drbddisk::r0 Filesystem::/dev/drbd0::/web::ext3 nfs-kernel-server Replace with Virtual Ipaddress
  • 11. Configuration Contd.............. 3)Set Password for heartbeat communication /etc/authkeys auth 3 3 md5 fosteringlinux 4) Make /etc/authkeys readble by root only chmod 600 /etc/authkeys Replace with your string
  • 12. Start DRBD and heartbeat on both NFS server #sudo /etc/init.d/drbd start #sudo /etc/init.d/heartbeat start Testing 1) Check virtual ipaddress on master nfs server (nfs1) ifconfig mount 2) Do same on slave nfs server (nfs2) Note: There should not be virtual ipaddress and mounted /content directory
  • 13. Testing Continued............. 2) Replicate Server Failure Create any directory or file on NFS server (nfs1) mkdir /web/site/failure Stop hearbeat on NFS server (nfs1) #sudo /etc/init.d/heartbeat stop 3) Check slave server Virtual Ipaddess ,exported /web ifconfig mount created failure directory should be there cd /web/site ls
  • 14. 4) Do same on slave Create any file and directory in /web/site mkdir /web/site/success Stop heartbeat on Slave (nfs2) 5) Run these commands on master so now VIP and /web should be on master ifconfig mount df -h -T
  • 15. Configure NFS Client mkdir /web mount -t nfs 192.168.1.x:/web/site /web Note: Replace 192.168.1.x with Virtual Ipaddress vi /etc/fstab 192.168.1.x:/web/site /web nfs rw 0 0 Replace with Virtual IP addess
  翻译: