- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- export NFS File System
Operating System - Linux
1820591
Members
1829
Online
109626
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2009 01:46 AM
08-06-2009 01:46 AM
Hello
I need to export a file system in a Linux box and mount it with read annd write permission in 4 other Linux Web Servers but i don´t know if this can be done and what would happen in case 2 machines tried to access and write into the File System at the same time, how NFS would manage this situation?
Thanx
I need to export a file system in a Linux box and mount it with read annd write permission in 4 other Linux Web Servers but i don´t know if this can be done and what would happen in case 2 machines tried to access and write into the File System at the same time, how NFS would manage this situation?
Thanx
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2009 02:39 AM
08-06-2009 02:39 AM
Solution
Shalom,
Here is a sample /etc/exports file.
#
/share/centos/5/iso *(rw)
/share/video *(rw,no_root_squash)
There are other options such as host name limitations.
/exported/directory bob.example.com
# Limits exported directory access to host name bob.example.com
In the example, bob.example.com can mount /exported/directory/. Because no options are specified in this example, the following default NFS options take effect:
*
ro â Mounts of the exported file system are read-only. Remote hosts are not able to make changes to the data shared on the file system. To allow hosts to make changes to the file system, the read/write (rw) option must be specified.
*
wdelay â Causes the NFS server to delay writing to the disk if it suspects another write request is imminent. This can improve performance by reducing the number of times the disk must be accessed by separate write commands, reducing write overhead. The no_wdelay option turns off this feature, but is only available when using the sync option.
*
root_squash â Prevents root users connected remotely from having root privileges and assigns them the user ID for the user nfsnobody. This effectively "squashes" the power of the remote root user to the lowest local user, preventing unauthorized alteration of files on the remote server. Alternatively, the no_root_squash option turns off root squashing. To squash every remote user, including root, use the all_squash option. To specify the user and group IDs to use with remote users from a particular host, use the anonuid and anongid options, respectively. In this case, a special user account can be created for remote NFS users to share and specify (anonuid=,anongid=), where is the user ID number and is the group ID number.
From:
http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Deployment_Guide-en-US/s1-nfs-server-config-exports.html
SEP
Here is a sample /etc/exports file.
#
/share/centos/5/iso *(rw)
/share/video *(rw,no_root_squash)
There are other options such as host name limitations.
/exported/directory bob.example.com
# Limits exported directory access to host name bob.example.com
In the example, bob.example.com can mount /exported/directory/. Because no options are specified in this example, the following default NFS options take effect:
*
ro â Mounts of the exported file system are read-only. Remote hosts are not able to make changes to the data shared on the file system. To allow hosts to make changes to the file system, the read/write (rw) option must be specified.
*
wdelay â Causes the NFS server to delay writing to the disk if it suspects another write request is imminent. This can improve performance by reducing the number of times the disk must be accessed by separate write commands, reducing write overhead. The no_wdelay option turns off this feature, but is only available when using the sync option.
*
root_squash â Prevents root users connected remotely from having root privileges and assigns them the user ID for the user nfsnobody. This effectively "squashes" the power of the remote root user to the lowest local user, preventing unauthorized alteration of files on the remote server. Alternatively, the no_root_squash option turns off root squashing. To squash every remote user, including root, use the all_squash option. To specify the user and group IDs to use with remote users from a particular host, use the anonuid and anongid options, respectively. In this case, a special user account can be created for remote NFS users to share and specify (anonuid=
From:
http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Deployment_Guide-en-US/s1-nfs-server-config-exports.html
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2009 03:27 AM
08-06-2009 03:27 AM
Re: export NFS File System
The answer depends on which version of the NFS protocol you're using and which mount options you've chosen.
NFS versions 2 and 3 will require you to run separate RPC lockd and statd services on both server and the clients to allow file locking. The locks in these NFS versions are advisory only. In general, file locking has been something of a weak point of NFSv2 and NFSv3. Only some file locking functions of the OS are supported by NFS, so the application must explicitly be programmed to expect that someone else may be accessing the files, and to use NFS-compatible file locking functions (fcntl() instead of flock()).
NFS version 4 allows mandatory locking, but it's significantly newer and less well known than the older versions. The application still must not assume it's the only one accessing its files, and it must request the correct types of locks based on what it is going to do.
NFSv4 also has more complex security features than the older versions of the protocol. Make sure you understand your NFSv4 configuration and test it carefully before using it in production systems.
MK
NFS versions 2 and 3 will require you to run separate RPC lockd and statd services on both server and the clients to allow file locking. The locks in these NFS versions are advisory only. In general, file locking has been something of a weak point of NFSv2 and NFSv3. Only some file locking functions of the OS are supported by NFS, so the application must explicitly be programmed to expect that someone else may be accessing the files, and to use NFS-compatible file locking functions (fcntl() instead of flock()).
NFS version 4 allows mandatory locking, but it's significantly newer and less well known than the older versions. The application still must not assume it's the only one accessing its files, and it must request the correct types of locks based on what it is going to do.
NFSv4 also has more complex security features than the older versions of the protocol. Make sure you understand your NFSv4 configuration and test it carefully before using it in production systems.
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2009 12:46 AM
08-07-2009 12:46 AM
Re: export NFS File System
Thanks to you 2
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP