linux mount nfs and cifs

linux nfs

1. edit /etc/exports file

/home/test/tnfs 192.168.64.0/24(rw,sync,root_squash,no_subtree_check,anonuid=1017,anongid=1001)

2. exportfs -a

3. mount

mount -t nfs -o nolock,soft,intr,timeo=10,rsize=16318,wsize=16318,rw "192.168.64.250:/home/test/tnfs"  "/nas/nfs0"

 

windows smbfs

mount -t cifs -o rsize=16318,wsize=16318,username=public,password=public,rw "//192.168.64.68/shared"   "/nas/cifs0"



4. automount

/etc/fstab

//192.168.64.218/shared  /mnt/cifs01 smbfs  auto,rw,noperm,uid=1000,gid=1001,file_mode=0664,dir_mode=0774,username=public,password=public

192.168.64.67:/home/test/tnfs /mnt/nfs01 nfs auto,rw 0 0

你可能感兴趣的:(linux,windows,File)