The document discusses the Network File System (NFS) which allows sharing and accessing files across a network. It describes the key components of NFS including the mounting protocol, mount server, daemons, and utilities. The mounting protocols have evolved from NFSv2 to NFSv4 with improvements like asynchronous writes and stateful operations. The document also explains how to configure and use NFS as both a server and client on FreeBSD, Linux, Solaris and other operating systems.
The document discusses the Network File System (NFS) protocol. NFS allows users to access and share files located on remote computers as if they were local. It operates using three main layers - the RPC layer for communication, the XDR layer for machine-independent data representation, and the top layer consisting of the mount and NFS protocols. NFS version 4 added features like strong security, compound operations, and internationalization support.
The document discusses network file systems (NFS) and its components. It describes how NFS allows remote access to shared file systems across networks using the NFS protocol. It explains the key aspects of NFS including exporting file systems from the NFS server, mounting remote file systems on clients, and the architecture involving NFS servers and clients. It also briefly mentions utilities like mountd, nfsd, and issues that can arise with user and group IDs when sharing files across systems.
This document provides an overview of UNIX file systems and disks. It discusses the structure of hard disks and different file system types including FAT, NTFS, UFS, EXT2/3, and ReiserFS. It also covers disk devices in Linux, FreeBSD and Solaris. Additional topics include creating and mounting file systems, the /etc/fstab file, the NFS network file sharing protocol, and different RAID configurations including RAID 0, 1, 5 and the use of parity disks.
The Network File System (NFS) is the most widely used network-based file system. NFS’s initial simple design and Sun Microsystems’ willingness to publicize the protocol and code samples to the community contributed to making NFS the most successful remote access file system. NFS implementations are available for numerous Unix systems, several Windows-based systems, and others.
The document discusses the Network File System (NFS) which allows files on a remote computer to be accessed over a network as if they are local. It provides details on how NFS works by exporting file systems from the NFS server and mounting them on client computers. The document also covers NFS versions, configuration of NFS servers, and tools for managing NFS shares through graphical interfaces.
This document provides an outline for a FreeBSD training course. It covers topics such as why to use FreeBSD and UNIX, installing FreeBSD 10.2, disk partitioning, the directory structure, basic commands, creating and managing user accounts, and configuring networking, filesystems, and services. The outline is divided into multiple sections with subsections covering specific commands, configuration files, and how to accomplish tasks like installing software and shutting down the system.
This document provides summaries of commands and configuration files related to Linux system administration. It covers topics like printing commands (lpr, lpq, lprm), init and inittab configuration, runlevels, networking commands (route, netstat), user management (userdel, passwd), file systems (e2fsck, ext2, ext3), and other administrative tools (top, ps, umount, vmstat).
This document provides an introduction and overview of the Network File System (NFS) protocol. It discusses that NFS allows files to be shared over a network like local storage. It describes the typical implementation with an NFS server exporting directories for clients to mount. It also summarizes the different versions of NFS and how they improved performance, security, and functionality. Finally, it covers installing and configuring NFS, the advantages of centralized management and easy access, and some disadvantages like potential security issues and performance limitations over the network.
The document discusses the Network File System (NFS) protocol. NFS allows users to access and share files located on remote computers as if they were local. It operates using three main layers - the RPC layer for communication, the XDR layer for machine-independent data representation, and the top layer consisting of the mount and NFS protocols. NFS version 4 added features like strong security, compound operations, and internationalization support.
The document discusses network file systems (NFS) and its components. It describes how NFS allows remote access to shared file systems across networks using the NFS protocol. It explains the key aspects of NFS including exporting file systems from the NFS server, mounting remote file systems on clients, and the architecture involving NFS servers and clients. It also briefly mentions utilities like mountd, nfsd, and issues that can arise with user and group IDs when sharing files across systems.
This document provides an overview of UNIX file systems and disks. It discusses the structure of hard disks and different file system types including FAT, NTFS, UFS, EXT2/3, and ReiserFS. It also covers disk devices in Linux, FreeBSD and Solaris. Additional topics include creating and mounting file systems, the /etc/fstab file, the NFS network file sharing protocol, and different RAID configurations including RAID 0, 1, 5 and the use of parity disks.
The Network File System (NFS) is the most widely used network-based file system. NFS’s initial simple design and Sun Microsystems’ willingness to publicize the protocol and code samples to the community contributed to making NFS the most successful remote access file system. NFS implementations are available for numerous Unix systems, several Windows-based systems, and others.
The document discusses the Network File System (NFS) which allows files on a remote computer to be accessed over a network as if they are local. It provides details on how NFS works by exporting file systems from the NFS server and mounting them on client computers. The document also covers NFS versions, configuration of NFS servers, and tools for managing NFS shares through graphical interfaces.
This document provides an outline for a FreeBSD training course. It covers topics such as why to use FreeBSD and UNIX, installing FreeBSD 10.2, disk partitioning, the directory structure, basic commands, creating and managing user accounts, and configuring networking, filesystems, and services. The outline is divided into multiple sections with subsections covering specific commands, configuration files, and how to accomplish tasks like installing software and shutting down the system.
This document provides summaries of commands and configuration files related to Linux system administration. It covers topics like printing commands (lpr, lpq, lprm), init and inittab configuration, runlevels, networking commands (route, netstat), user management (userdel, passwd), file systems (e2fsck, ext2, ext3), and other administrative tools (top, ps, umount, vmstat).
This document provides an introduction and overview of the Network File System (NFS) protocol. It discusses that NFS allows files to be shared over a network like local storage. It describes the typical implementation with an NFS server exporting directories for clients to mount. It also summarizes the different versions of NFS and how they improved performance, security, and functionality. Finally, it covers installing and configuring NFS, the advantages of centralized management and easy access, and some disadvantages like potential security issues and performance limitations over the network.
A brief talk on systems performance for the July 2013 meetup "A Midsummer Night's System", video: http://www.youtube.com/watch?v=P3SGzykDE4Q. This summarizes how systems performance has changed from the 1990's to today. This was the reason for writing a new book on systems performance, to provide a reference that is up to date, covering new tools, technologies, and methodologies.
NFS (Network File System) allows hosts to mount remote file systems and access them locally. There are three versions of NFS in use (v2, v3, v4). NFS implements a client-server model and uses RPC (Remote Procedure Call) to make file operations on remote servers appear local. NFS aims to support UNIX file semantics over the network in a stateless manner for scalability.
This document outlines the steps to configure a highly available NFS server using DRBD and heartbeat on Ubuntu. Key steps include:
1. Installing DRBD, heartbeat and configuring the /etc/drbd.conf and heartbeat configuration files on both NFS servers so they are identical.
2. Making the data partition consistent between servers using drbdadm commands.
3. Installing and configuring heartbeat to monitor services and fail over the virtual IP address when either NFS server fails.
4. Testing the configuration by stopping heartbeat on each server to trigger a failover and verifying services move to the other server.
This document provides an overview of the Network File System (NFS) protocol. It discusses NFS's design goals of being stateless and transport independent. The document describes how NFS uses remote procedure calls and operates in a client-server model to provide a remote file system that maintains the same interface and semantics as a local Unix file system. It also covers NFS transport, operations, and differences between versions NFSv3 and NFSv4.
This document provides information about system administration in Linux, including:
1. It discusses important administrative directories like /etc, /sbin, and /usr/sbin that contain configuration files and commands for system management.
2. It outlines some common ongoing tasks for a Linux system administrator like configuring hardware, managing file systems and disk space, and monitoring system performance.
3. It also covers security tools like SELinux that can help enforce access controls and security policies on a Linux system.
The document discusses Linux/Unix interview questions and answers. It covers topics such as the GRUB bootloader, the Linux boot process, user profile files, changing the default runlevel, displaying user information with the finger command, inode numbers, increasing disk read performance, password expiration times, locking user passwords, default shells, user attributes defined in /etc/login.defs, changing the system's authentication method, modifying file attributes with chattr, network interface configuration files, changing network interface settings, the DNS configuration file, exporting NFS directories, checking open ports, soft vs hard links, setting expired passwords, restricting file insertion, displaying or killing processes accessing files/folders, killing all processes for a user, daily system analysis reports
Network file sharing allows files to be accessed over a network. It employs Remote Procedure Calls and requires setup of both server and client software. While convenient for users, it complicates administration and can introduce security issues if not configured properly. NFS and SMB are common network file sharing protocols, each with their own advantages and disadvantages.
Linux is a free, open-source operating system that provides functionality similar to Unix systems. The document then lists and describes several common Linux commands used to navigate directories, view files and system information, manage processes, and edit text files. It also includes a diagram of the standard Linux directory structure and brief descriptions of the purpose of each top-level directory.
Introduction to Linux Kernel by Quontra SolutionsQUONTRASOLUTIONS
Course Duration: 30-35 hours Training + Assignments + Actual Project Based Case Studies
Training Materials: All attendees will receive,
Assignment after each module, Video recording of every session
Notes and study material for examples covered.
Access to the Training Blog & Repository of Materials
Pre-requisites:
Basic Computer Skills and knowledge of IT.
Training Highlights
* Focus on Hands on training.
* 30 hours of Assignments, Live Case Studies.
* Video Recordings of sessions provided.
* One Problem Statement discussed across the whole training program.
* Resume prep, Interview Questions provided.
WEBSITE: www.QuontraSolutions.com
Contact Info: Phone +1 404-900-9988(or) Email - info@quontrasolutions.com
The document describes the standard Linux filesystem hierarchy, including the purpose and some examples of the contents of the top-level directories like /bin, /boot, /dev, /etc, /home, /lib, /media, /mnt, /opt, /proc, /root, /sbin, /usr, and /var. Many directories contain essential system files and programs needed for booting, administration, and operation of the system, while others provide variable storage and mounting points for removable devices. The filesystem layout separates core operating system, user, and variable files for security and manageability.
The document discusses File Transfer Protocol (FTP), Network File System (NFS), and Samba server configuration. It provides details on FTP such as its history, components, modes, and how to configure an FTP server in Linux. It describes NFS including its history, versions, configuration files, and steps to configure NFS client and server. It also explains Samba, its components, purpose, and how to configure a Samba server using both command line and graphical tools.
Network File System (NFS) is a distributed file system protocol that allows users to access files over a network as if they were on a local disk. NFS was originally developed by Sun Microsystems in 1984 and is now maintained by the IETF. NFS uses RPC calls to issue requests from clients to servers and maintains a stateless design to simplify crash recovery. While easy to set up and administer, NFS has limitations regarding performance, scalability, security and file locking.
While probably the most prominent, Docker is not the only tool for building and managing containers. Originally meant to be a "chroot on steroids" to help debug systemd, systemd-nspawn provides a fairly uncomplicated approach to work with containers. Being part of systemd, it is available on most recent distributions out-of-the-box and requires no additional dependencies.
This deck will introduce a few concepts involved in containers and will guide you through the steps of building a container from scratch. The payload will be a simple service, which will be automatically activated by systemd when the first request arrives.
This document provides an introduction to Linux, including its history and architecture. It describes Linux's origins from Unix in the 1960s and the development of the Linux kernel by Linus Torvalds in 1991. It outlines the key components of a Linux system, including the kernel, shell, file system, processes, networking, and desktop environments. It also discusses booting a Linux system and provides resources for learning more about Linux distributions and building your own operating system.
This document provides an overview of a seminar presented on Red Hat Linux and NIS servers. It discusses key topics like the history and features of Linux, an overview of the Linux kernel and file system, Linux shells, users and permissions, RAID and LVM concepts, and configurations for common Linux server types including NIS, NFS, DNS, DHCP, FTP, SSH, Telnet, SMTP, Samba, and Apache web servers. Screenshots are also included to demonstrate aspects of the configurations.
This document discusses how to set up NFS and Samba servers. It explains that NFS allows sharing directories between UNIX systems using daemons like nfs, nfslock, and portmap. It describes configuring the /etc/exports file to define exported filesystems and configuring clients via /etc/fstab. For Samba, it discusses using smbd to share files and printers from UNIX to Windows via the smb.conf configuration file. Authentication can be done using local Unix usernames and passwords stored in /etc/samba/smbpasswd.
This document provides instructions for installing and configuring various services and tools in Linux including RPM package management, cron jobs, network configuration, NFS file sharing, and FTP server setup. It includes commands for installing packages, editing configuration files, starting and stopping services, and testing functionality from the client.
A brief talk on systems performance for the July 2013 meetup "A Midsummer Night's System", video: http://www.youtube.com/watch?v=P3SGzykDE4Q. This summarizes how systems performance has changed from the 1990's to today. This was the reason for writing a new book on systems performance, to provide a reference that is up to date, covering new tools, technologies, and methodologies.
NFS (Network File System) allows hosts to mount remote file systems and access them locally. There are three versions of NFS in use (v2, v3, v4). NFS implements a client-server model and uses RPC (Remote Procedure Call) to make file operations on remote servers appear local. NFS aims to support UNIX file semantics over the network in a stateless manner for scalability.
This document outlines the steps to configure a highly available NFS server using DRBD and heartbeat on Ubuntu. Key steps include:
1. Installing DRBD, heartbeat and configuring the /etc/drbd.conf and heartbeat configuration files on both NFS servers so they are identical.
2. Making the data partition consistent between servers using drbdadm commands.
3. Installing and configuring heartbeat to monitor services and fail over the virtual IP address when either NFS server fails.
4. Testing the configuration by stopping heartbeat on each server to trigger a failover and verifying services move to the other server.
This document provides an overview of the Network File System (NFS) protocol. It discusses NFS's design goals of being stateless and transport independent. The document describes how NFS uses remote procedure calls and operates in a client-server model to provide a remote file system that maintains the same interface and semantics as a local Unix file system. It also covers NFS transport, operations, and differences between versions NFSv3 and NFSv4.
This document provides information about system administration in Linux, including:
1. It discusses important administrative directories like /etc, /sbin, and /usr/sbin that contain configuration files and commands for system management.
2. It outlines some common ongoing tasks for a Linux system administrator like configuring hardware, managing file systems and disk space, and monitoring system performance.
3. It also covers security tools like SELinux that can help enforce access controls and security policies on a Linux system.
The document discusses Linux/Unix interview questions and answers. It covers topics such as the GRUB bootloader, the Linux boot process, user profile files, changing the default runlevel, displaying user information with the finger command, inode numbers, increasing disk read performance, password expiration times, locking user passwords, default shells, user attributes defined in /etc/login.defs, changing the system's authentication method, modifying file attributes with chattr, network interface configuration files, changing network interface settings, the DNS configuration file, exporting NFS directories, checking open ports, soft vs hard links, setting expired passwords, restricting file insertion, displaying or killing processes accessing files/folders, killing all processes for a user, daily system analysis reports
Network file sharing allows files to be accessed over a network. It employs Remote Procedure Calls and requires setup of both server and client software. While convenient for users, it complicates administration and can introduce security issues if not configured properly. NFS and SMB are common network file sharing protocols, each with their own advantages and disadvantages.
Linux is a free, open-source operating system that provides functionality similar to Unix systems. The document then lists and describes several common Linux commands used to navigate directories, view files and system information, manage processes, and edit text files. It also includes a diagram of the standard Linux directory structure and brief descriptions of the purpose of each top-level directory.
Introduction to Linux Kernel by Quontra SolutionsQUONTRASOLUTIONS
Course Duration: 30-35 hours Training + Assignments + Actual Project Based Case Studies
Training Materials: All attendees will receive,
Assignment after each module, Video recording of every session
Notes and study material for examples covered.
Access to the Training Blog & Repository of Materials
Pre-requisites:
Basic Computer Skills and knowledge of IT.
Training Highlights
* Focus on Hands on training.
* 30 hours of Assignments, Live Case Studies.
* Video Recordings of sessions provided.
* One Problem Statement discussed across the whole training program.
* Resume prep, Interview Questions provided.
WEBSITE: www.QuontraSolutions.com
Contact Info: Phone +1 404-900-9988(or) Email - info@quontrasolutions.com
The document describes the standard Linux filesystem hierarchy, including the purpose and some examples of the contents of the top-level directories like /bin, /boot, /dev, /etc, /home, /lib, /media, /mnt, /opt, /proc, /root, /sbin, /usr, and /var. Many directories contain essential system files and programs needed for booting, administration, and operation of the system, while others provide variable storage and mounting points for removable devices. The filesystem layout separates core operating system, user, and variable files for security and manageability.
The document discusses File Transfer Protocol (FTP), Network File System (NFS), and Samba server configuration. It provides details on FTP such as its history, components, modes, and how to configure an FTP server in Linux. It describes NFS including its history, versions, configuration files, and steps to configure NFS client and server. It also explains Samba, its components, purpose, and how to configure a Samba server using both command line and graphical tools.
Network File System (NFS) is a distributed file system protocol that allows users to access files over a network as if they were on a local disk. NFS was originally developed by Sun Microsystems in 1984 and is now maintained by the IETF. NFS uses RPC calls to issue requests from clients to servers and maintains a stateless design to simplify crash recovery. While easy to set up and administer, NFS has limitations regarding performance, scalability, security and file locking.
While probably the most prominent, Docker is not the only tool for building and managing containers. Originally meant to be a "chroot on steroids" to help debug systemd, systemd-nspawn provides a fairly uncomplicated approach to work with containers. Being part of systemd, it is available on most recent distributions out-of-the-box and requires no additional dependencies.
This deck will introduce a few concepts involved in containers and will guide you through the steps of building a container from scratch. The payload will be a simple service, which will be automatically activated by systemd when the first request arrives.
This document provides an introduction to Linux, including its history and architecture. It describes Linux's origins from Unix in the 1960s and the development of the Linux kernel by Linus Torvalds in 1991. It outlines the key components of a Linux system, including the kernel, shell, file system, processes, networking, and desktop environments. It also discusses booting a Linux system and provides resources for learning more about Linux distributions and building your own operating system.
This document provides an overview of a seminar presented on Red Hat Linux and NIS servers. It discusses key topics like the history and features of Linux, an overview of the Linux kernel and file system, Linux shells, users and permissions, RAID and LVM concepts, and configurations for common Linux server types including NIS, NFS, DNS, DHCP, FTP, SSH, Telnet, SMTP, Samba, and Apache web servers. Screenshots are also included to demonstrate aspects of the configurations.
This document discusses how to set up NFS and Samba servers. It explains that NFS allows sharing directories between UNIX systems using daemons like nfs, nfslock, and portmap. It describes configuring the /etc/exports file to define exported filesystems and configuring clients via /etc/fstab. For Samba, it discusses using smbd to share files and printers from UNIX to Windows via the smb.conf configuration file. Authentication can be done using local Unix usernames and passwords stored in /etc/samba/smbpasswd.
This document provides instructions for installing and configuring various services and tools in Linux including RPM package management, cron jobs, network configuration, NFS file sharing, and FTP server setup. It includes commands for installing packages, editing configuration files, starting and stopping services, and testing functionality from the client.
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...IJECEIAES
Climate change's impact on the planet forced the United Nations and governments to promote green energies and electric transportation. The deployments of photovoltaic (PV) and electric vehicle (EV) systems gained stronger momentum due to their numerous advantages over fossil fuel types. The advantages go beyond sustainability to reach financial support and stability. The work in this paper introduces the hybrid system between PV and EV to support industrial and commercial plants. This paper covers the theoretical framework of the proposed hybrid system including the required equation to complete the cost analysis when PV and EV are present. In addition, the proposed design diagram which sets the priorities and requirements of the system is presented. The proposed approach allows setup to advance their power stability, especially during power outages. The presented information supports researchers and plant owners to complete the necessary analysis while promoting the deployment of clean energy. The result of a case study that represents a dairy milk farmer supports the theoretical works and highlights its advanced benefits to existing plants. The short return on investment of the proposed approach supports the paper's novelty approach for the sustainable electrical system. In addition, the proposed system allows for an isolated power setup without the need for a transmission line which enhances the safety of the electrical network
Batteries -Introduction – Types of Batteries – discharging and charging of battery - characteristics of battery –battery rating- various tests on battery- – Primary battery: silver button cell- Secondary battery :Ni-Cd battery-modern battery: lithium ion battery-maintenance of batteries-choices of batteries for electric vehicle applications.
Fuel Cells: Introduction- importance and classification of fuel cells - description, principle, components, applications of fuel cells: H2-O2 fuel cell, alkaline fuel cell, molten carbonate fuel cell and direct methanol fuel cells.
Using recycled concrete aggregates (RCA) for pavements is crucial to achieving sustainability. Implementing RCA for new pavement can minimize carbon footprint, conserve natural resources, reduce harmful emissions, and lower life cycle costs. Compared to natural aggregate (NA), RCA pavement has fewer comprehensive studies and sustainability assessments.
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesChristina Lin
Traditionally, dealing with real-time data pipelines has involved significant overhead, even for straightforward tasks like data transformation or masking. However, in this talk, we’ll venture into the dynamic realm of WebAssembly (WASM) and discover how it can revolutionize the creation of stateless streaming pipelines within a Kafka (Redpanda) broker. These pipelines are adept at managing low-latency, high-data-volume scenarios.
Comparative analysis between traditional aquaponics and reconstructed aquapon...bijceesjournal
The aquaponic system of planting is a method that does not require soil usage. It is a method that only needs water, fish, lava rocks (a substitute for soil), and plants. Aquaponic systems are sustainable and environmentally friendly. Its use not only helps to plant in small spaces but also helps reduce artificial chemical use and minimizes excess water use, as aquaponics consumes 90% less water than soil-based gardening. The study applied a descriptive and experimental design to assess and compare conventional and reconstructed aquaponic methods for reproducing tomatoes. The researchers created an observation checklist to determine the significant factors of the study. The study aims to determine the significant difference between traditional aquaponics and reconstructed aquaponics systems propagating tomatoes in terms of height, weight, girth, and number of fruits. The reconstructed aquaponics system’s higher growth yield results in a much more nourished crop than the traditional aquaponics system. It is superior in its number of fruits, height, weight, and girth measurement. Moreover, the reconstructed aquaponics system is proven to eliminate all the hindrances present in the traditional aquaponics system, which are overcrowding of fish, algae growth, pest problems, contaminated water, and dead fish.
4. Computer
Center,
CS,
NCTU
4
Components of NFS –
mounting protocol (1)
NFSv2
• Synchronous write
• V2 NFS server must commit each modified block to disk before
replying to NFS client
• Cause long delay when there is a NFS write operation
NFSv3 in 1990s
• Asynchronous write
• Provide increase performance and better support for large files
NFSv4 in 2000s
• Available in FreeBSD 8.1-R
• Stateful protocol
• Unicode support
NFSv4.1 2010
5. Computer
Center,
CS,
NCTU
5
Components of NFS –
mounting protocol (2)
Sun’s ONC distributed computing standards
• NFS client RPC Transport Layer …
• System-independent
• Transport Layer
UDP: Lack congestion control
TCP: become more suitable
6. Computer
Center,
CS,
NCTU
6
Components of NFS –
mounting protocol (3)
The NFS approach
• Transport protocol
In NFSv4, the default is TCP
• Stateless
cookie
• File locking
rpc.lockd and rpc.statd
• File system exports
7. Computer
Center,
CS,
NCTU
7
Components of NFS –
mounting protocol (4)
Security issues
• Authentication
AUTH_NONE
AUTH_SYS (NFSv2 and NFSv3)
RPCSEC_GSS
– In NFSv4, both client and server need to participate in a Kerberos realm
» Centralize
» Encryption
• Root access
• Firewall
8. Computer
Center,
CS,
NCTU
8
Components of NFS –
mounting protocol (5)
Advanced NFS feature support by OS
• In Freebsd
Forces the use of the old NFS server that does not include NFSv4 support in it
– nfsd –o
System NFS Version TCP Default
FreeBSD v4 Yes TCP
Linux (debian) v4(2.6 kernel) Yes TCP
Solaris Yes Yes TCP
SunOS Yes Yes TCP
9. Computer
Center,
CS,
NCTU
9
Components of NFS –
Server-side NFS (1)
NFS Server
• Export sharing filesystem
System dependent
/etc/exports
• Waiting for “mount request”
mountd (rpc.mountd) daemon
• Waiting for “file access request”
nfsd (rpc.nfsd) daemon
10. Computer
Center,
CS,
NCTU
10
Components of NFS –
Server-side NFS (2)
Exporting filesystem
1. Edit export configuration file
Each line is “what to export and how”
2. Reload related daemons
System Exports info file How to reload
FreeBSD /etc/exports kill -1 <mountd’s pid>
Linux /etc/exports /usr/sbin/exportfs -a
Solaris /etc/dfs/dfstab /usr/sbin/shareall
SunOS /etc/exports /usr/sbin/exportfs -a
11. Computer
Center,
CS,
NCTU
11
Components of NFS –
Server-side NFS (FreeBSD.1)
Exporting filesystem
• /etc/exports
White-space separated
Format: directory-list options-list client-list
Option Description
-ro Exports read-only, default is (read-write)
-alldirs Allow any subdirectory to be mounted
-maproot=user Maps root to the specified user.
-mapall=user Maps all UIDs to the specified user.
Client Description
hostname Host name (ex: mailgate ccserv)
netgroup NIS netgroups
-network -mask -network 140.113.235.0 -mask 255.255.255.0
12. Computer
Center,
CS,
NCTU
12
Components of NFS –
Server-side NFS (FreeBSD.2)
Example of /etc/exports
• Network and mask cannot appear on the same line with hosts and netgroups
Reload daemons
• % kill -1 `cat /var/run/mountd.pid`
• /etc/rc.d/mountd restart
/raid -alldirs –maproot=root mailgate ccserv backup
/raid -alldirs –maproot=65534 –network 140.113.209 –mask 255.255.255.0
/home -ro –mapall=nobody –network 140.113.235.0 –mask 255.255.255.0
/usr/src /usr/obj –maproot=0 bsd_cc_csie
14. Computer
Center,
CS,
NCTU
14
Components of NFS –
Server-side NFS (Linux.2)
Option Description
ro,rw Read-only, Read-write (default)
rw=list Hosts in the list can do rw, others ro only
root_squash Maps UID 0 and GID 0 to the value of anonuid and anongid
(default)
no_root_squash Allow root access
all_squash Maps all UID and GID to anonymous one
subtree_check Check that the accessed file is in the appropriate filesystem
and in the exported tree.
no_subtree_check Disables subtree checking
anonuid=xxx Related to root_squash
anongid=xxx Related to root_squash
secure Require remote access from privileged port
insecure Allow remote access from any port
noaccess Prevent access to this dir and it’s subdir
15. Computer
Center,
CS,
NCTU
15
Components of NFS –
Server-side NFS (Linux.3)
Example of /etc/exports
Run /usr/sbin/exportfs
• % /usr/sbin/exportfs –a
Maintain /var/lib/nfs/xtab table which is read by mountd
(/var/lib/nfs/etab in gentoo)
/home1 ccsun*.csie.nctu.eud.tw(rw)
/home2 @sun_cc_csie(ro) dragon(rw,no_root_squash)
/home ccpc1(rw,all_squash,anonuid=150,anongid=100)
/ftp/pub (ro,insecure,all_squash)
/users *.xor.com(rw)
/users/evi (noaccess)
16. Computer
Center,
CS,
NCTU
16
Components of NFS –
Server-side NFS (Solaris.1)
Exporting filesystem
• /etc/dfs/dfstab
• Each line will execute “share” command to export one NFS
[format] share –F nfs –o option-list directory
Ex: share –F nfs –o rw=ccbsd5.csie.nctu.edu.tw /home2
Run shareall command
• % /usr/sbin/shareall
Client Description
hostname Host name (ex: mailgate ccserv)
netgroup NIS netgroups
IP networks @CIDR-style specification (ex: @140.113.235.2/24)
DNS domains .xxx.yyy any host within the domain (ex: .nctu.edu.tw)
17. Computer
Center,
CS,
NCTU
17
Components of NFS –
Server-side NFS (Solaris.2)
Option Description
ro,rw Read-only to all, Read-write to all
ro=list, rw=list Hosts in the list can do ro/rw
root=list
Lists hosts permitted to access this filesystem as root. Otherwise,
root access from a client is equivalent to by “nobody”
anon=xxx Specify the UID to which root is remapped. Default is “nobody”
anongid=xxx Related to root_squash
nosub Forbids clients to mount subdirectories
nosuid Prevents setuid and setgid from being created
18. Computer
Center,
CS,
NCTU
18
Components of NFS –
Server-side NFS (3)
nfsd daemon
• Handle NFS file access request from NFS clients
• Number of nfsd is important
Too small, some NFS request may be not served
Too large, load will be high
netstat –s, ps, uptime
In FreeBSD
• Specify nfsd options in /etc/rc.conf
nfs_server_enable=“YES”
nfs_server_flags=“-u –t –n 4”
19. Computer
Center,
CS,
NCTU
19
Components of NFS –
client-side NFS (1)
NFS Client
• Mount NFS filesystem first
• Access file under NFS filesystem
mount command
• [format]
mount [-o options] host:directory mount-point
• Ex:
% mount –t nfs ccbsd4:/home/www /home/nfs/www
/etc/fstab (/etc/vfstab in Solaris)
% mount –a –t nfs (FreeBSD, Linux)
% mount –a –F nfs (Solaris)
Aborting 20-hour simulation after running for 18 hours due to transient
network glitch
# Device Mountpoint FStype Options Dump Pass#
dragon:/usr/man /usr/man nfs ro,bg,soft 0 0
ccserv:/spool/mail /var/mail nfs rw,bg,intr 0 0
20. Computer
Center,
CS,
NCTU
20
Components of NFS –
client-side NFS (2)
NFS mount flags
Flag Systems Description
ro or rw S,L,F Mount the NFS as ro or rw
bg S,L,F If failed, keep trying in background
hard S,L If server down, access will keep trying until server comes back
soft S,L,F If server down, let access fail and return error
intr, nointr S,L,F Allow/Disallow user to interrupt blocked access
retrans=n S,L,F # of times to repeat a request before error return
timeo=n S,L,F Timeout period of requests (tens of seconds)
rsize=n S,L,F Set read buffer size to n bytes
wsize=n S,L,F Set write buffer size to n bytes
vers=n S Selects NFS v2 or v3
nfsv3,nfsv2 F Selects NFS v2 or v3
proto=prot S tcp or udp
tcp L,F Select TCP. UDP is default
21. Computer
Center,
CS,
NCTU
21
Components of NFS –
client-side NFS (3)
Client side daemons that enhance performance
• biod (block I/O daemon, or called nfsiod)
• Perform read-ahead and write-behind caching
22. Computer
Center,
CS,
NCTU
22
Components of NFS –
client-side NFS (4)
nfsiod
• The nfsiod utility controls the maximum number of nfsiod kernel
processes
nfsd –n number
derek[~] -chiahung- sysctl -a | grep nfs.iod
vfs.nfs.iodmax: 20
vfs.nfs.iodmin: 0
vfs.nfs.iodmaxidle: 120