Three NFS file sharing under UNIX platform

xiaoxiao2021-03-06  63

Three NFS file sharing under UNIX platform

Li Shouliang SLLI@founder.com.cn

Last Version: 2003-2-24

Brief description

In daily work, the NFS file sharing between the same or different UNIX platforms is often encountered. For example, our AIX light is broken, and there is only one AIX in the laboratory. To install the software, it is only available to NFS Mount to other UNIX platforms. This section gives a simple example of file sharing between different platforms, not very comprehensive, only for colleagues in work.

NFS has a lot of commands, and there is also a lot of techniques in different platforms and methods of use. Please refer to the appropriate help documentation during the specific use. Some advanced uses of NFS, for example: NFS how to work with Diffie-Hellman authentication, Kerberos authentication work, and some of the privileges I am still exploiting, and also more familiar colleagues' enlightenment and supplements.

table of Contents

1. How do I achieve the NFS file sharing between the Sun Solaris platform?

2, how do I achieve the NFS file sharing between AIX to Sun Solaris platform?

3, how do I achieve the NFS file sharing between Sun Solaris to the AIX platform?

4. How do I achieve the NFS file sharing between Sun Solaris and Linux platforms?

5, how to achieve the NFS file sharing between AIX and AIX platforms?

6, how to achieve NFS files between Linux and Linux?

7. How do I achieve NFS file sharing between NT to Linux?

8, how do I achieve file sharing between UNIX platforms to NT?

9, to be supplement

content

============================================================================================================================================================================================================= =====================================================================================================================================================

1. How to implement the NFS file sharing between the Sun Solaris platform?

method one:

Sun A: (IP: 162.105.183.13)

#SU -

#Share -f NFS -O RW = 162.105.183.12, root = 162.105.183.12 / myshare

#Share

Sun B: (IP: 162.105.183.12)

#SU -

#mkdir / mymount

#mount -f nfs -o rw 162.105.183.13:/myshare / mymount

#mount

Method 2: (Write startup file)

Sun A: (IP: 162.105.183.13)

#SU -

#vi / etc / hosts

162.105.183.12 SLLISUN

Format: IP ServerName

#CP / ETC / DFS / DFSTAB / Etc/dfs/dfstab.sav

#vi / etc / DFS / DFSTAB

increase:

Share -f nfs -o rw = slockun, root = SLLISUN / MYSHARE

Share -f nfs -o ro /cdrom/disk1#/etc/init.d/nfs.server start # boot NFS

#Share

# / etc / init.d / nfs.server stop # Corresponds to NFS

Sun B: (IP: 162.105.183.12)

#SU -

#CP / etc / vfstab /etc/vfstab.sav

#VI / ETC / VFSTAB

increase:

162.105.183.13:/Myshare - / MyMount NFS - YES RW

162.105.183.13:/cdrom/disk1 - / mnt / disk NFS - NO RO

#mountall

============================================================================================================================================================================================================= =====================================================================================================================================================

2. How to achieve the NFS file sharing between AIX to Sun Solaris platform?

grammar:

AIX shared end:

Exportfs [-AIUV] [-f file] [-o options] [Directory]

Sun load end:

Mount -f NFS [-o Options] IP: / Share Mount_Point

Umount [-f] [-v] [-o Options] Special | Mount_Point

Example:

AIX: Share / AIXShare directory

# exportfs -o rw / aixshare

#exportfs -a # View shared status

Sun: Loading AIX Share / Aixshare to this Mount Point / Sunmount

#mount -f nfs 162.105.183.35:/Aixshare / sunmount

#mount # View MOUNT Status

AIX: Delete Sharing / AIXShare

#exportfs -u / aixshare

#exportfs -a # View shared status

SUN: Delete NFS MOUNT

#umount / sunmount

#mount # View MOUNT Status

In addition, you can also modify the / etc / exports file in the AIX side, share using ExportFS -A, example

#VI / ETC / Exports

/ aaa -root = 162.105.183.75, public

/ bbb -access = 162.05.183.75, public

/ SLLI -ACCESS = 162.105.183.98, Secure

/ mytest1 -root = 162.105.183.12, access = 162.105.183.13, second, scurer

#exportfs -a

Second, AIX can also share shares via the / usr / sbin / mknfsexp command, and can be operated via the SMIT visual interface. Note: The read and write weights and options of the NFS system are related to the permissions, uid, etc. of the shared directory; if the shared disc cannot be removed, check if it is shared and remote Mount.

============================================================================================================================================================================================================= =====================================================================================================================================================

3. How to implement the NFS file sharing between Sun Solaris to AIX platform?

grammar:

Sun shared:

Share [-f fstype] [-o specific_options] [-d description] [pathname]

Unshare [-f fstype] [-o specific_options] [Pathname | ResourceName]

AIX load end:

Mount [-fipr] [-n node] [-t type] [-{v | v} vfs] [-A | all | [[Node:] device] [DIR]]]

Umount [-sf] {-a | -n node | -t type | all | allr | device | file | directory | filesystem}

Example:

SUN: Share / SunShare directory, shared / cdrom / disk1

#SHARE -F NFS -O RW = 162.105.183.35, root = 162.105.183.35 / sunshare

#SHARE -F NFS -O RO / CDROM / DISK1

#Share # View Share State

AIX: Load 162.105.183.12 / SunShare to Mount Point / Aixmount, Load / CDROM to ORADISK

#mkdir / aixmount

#mkdir / oraDisk

#mount -f 162.105.183.12:/sunshare / aixmount

#mount -f 162.105.183.12:/cdrom/disk1 / oradisk

#mount # View MOUNT Status

SUN: Delete Sharing / SunShare

#unshare / sunshare

#Share # View shared status

AIX: Delete NFS Mount

#umount / aixmount

#mount # View MOUNT Status

============================================================================================================================================================================================================= ====================== 4, how do I achieve the SUN Solaris to Linux? NFS file sharing?

method one:

SUN end (IP: 162.105.183.12)

#SU -

#Share -f NFS -O RO -D "Share Dir Description" / SunShare

#Share # See if Share

#unshare / sunshare # Cancel Sharing

2.Linux

#SU -

#mkdir / mnt / linuxmount

#mount 162.105.183.12:/sunshare / mnt / linuxmount -t nfs

#umount / mnt / linuxmount # Uninstall MOUNT Point

Method Two:

SUN end (IP: 162.105.183.12)

#SU -

#CD / ETC / DFS

#cp dfstab dfstab.bak

#vi dfstab

Increasing

Share -f nfs -o ro -d "Your description" / sunshare

Save exit VI

# / etc / init.d / nfs.server start

# / etc / init.d / nfs.server start # stop sharing

2.Linux

#SU -

#mount 162.105.183.12:/sunshare / mnt / linuxmount -t nfs

#umount / mnt / linuxmount # Uninstall MOUNT

============================================================================================================================================================================================================= =====================================================================================================================================================

5, what achieves the NFS file sharing between AIX and AIX?

Example:

AIX A: IP: 162.105.183.35, Share / MyShare Directory

#exportfs -o rw / myshare

#exportfs -a # View shared status

AIX B: Load / MyShare directory to / mymount

#mount -f 162.105.183.35:/Myshare / mymount

============================================================================================================================================================================================================= ======================= 6, how do I achieve the sharing of NFS files between Linux and Linux?

Linux A: (IP: 162.105.183.55)

#SU -

#VI / ETC / Exports

Add a line, format:

/ PATH / TO / Sha Host1 (Permission) Host2 (Permission) Host3 (Permission)

Deployment

#exportfs -a

Linux B:

#SU -

#mkdir / mnt / mymount

Format: Mount Serverip: / Server / Path / Shared / Local / Mount / Point -T NFS

Example:

#mount 162.105.183.55:/Myshare / MNT / MyMount -t NFS

============================================================================================================================================================================================================= =====================

7, how to achieve NFS file sharing between NT to Linux?

Turbolinux:

Format: SMBMONUNT // Server / Dir / Mount / Point -o UserName = XXX, Password = XXX

Example: (User USER password PWD)

#SMBMount //162.105.183.125/share / mnt / test -o username = user, password = PWD

#smbmount - help # get more help

2.Redhat:

format:

SMBMOUNT "server / dir" -c 'mount / mount / points username_on_nt -g group'

Example: (User USER password PWD)

#SU -

#smbmount "162.105.183.125/share" PWD-C 'MOUNT / MNT / TEST -U User -g 123 "

#smbmount - help # get more help

============================================================================================================================================================================================================= ===================== 8, how do I achieve the file sharing between UNIX platforms to NT?

Sharing from UNIX to NT, can be implemented by tools such as SAMB or PC LINK. Configuration and use of Samb and PC Link See Separate Documents.

9, to be supplement

Generally speaking, local superuser (root) has no root access to file systems shared in the network. Unless the server provides the privilege of the superuser, users who have a superuser login on the customer system are free of root access. This issue is solved in the NOBODY ID in the NFS system. User Nobody's permissions is the same as other users (public) or untrusted users. For example, other users have only permissions permission to a file, then Nobody can only run this file. On an NFS server, you can use the root = option of the Share command to give superuser privileges on a shared file system.

Some questions from NFS see the documentation:

#man share_nfs

Related command Mount Umount MountAll Exportfs Share unshare Share_nfs

Li Shouliang SLLI@founder.com.cn

2003-2-24

转载请注明原文地址:https://www.9cbs.com/read-106528.html

New Post(0)