×ðÁú¿­Ê±

linuxÔõô¿´nfsÉèÖÃ

ÔÚ linux ϵͳÖУ¬Éó²é nfs ÉèÖõÄÒªÁ죺Éó²é /etc/exports Îļþ£¬Ïàʶµ¼³öĿ¼£»Éó²é /proc/mounts Îļþ£¬»ñÈ¡ÒѹÒÔØ nfs ¹²Ïí£»Ê¹Óà exportfs ÏÂÁÖÎÀí²¢Éó²é¹²Ïí¡£

ÔõÑùÉó²é Linux ϵͳÖÐµÄ NFS ÉèÖÃ

NFS£¨ÍøÂçÎļþϵͳ£©ÊÇÒ»ÖÖÂþÑÜʽÎļþϵͳ£¬ÔÊÐí¿Í»§¶ËÅÌËãʱ»ú¼ûºÍʹÓô洢ÔÚÔ¶³ÌЧÀÍÆ÷ÉϵÄÎļþ¡£ÔÚ Linux ϵͳÖУ¬Óм¸ÖÖÒªÁì¿ÉÒÔÉó²é NFS ÉèÖãº

1. Éó²é /etc/exports Îļþ

/etc/exports ÎļþÖ¸¶¨ÁËÄÄЩĿ¼±»µ¼³öΪ NFS ¹²Ïí¡£ÒªÉó²é´ËÎļþ£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ

sudo cat /etc/exports

µÇ¼ºó¸´ÖÆ

ʾÀýÊä³ö£º

/data *(rw,sync,no_root_squash)
/home/user *(ro,async)

µÇ¼ºó¸´ÖÆ

2. Éó²é /proc/mounts Îļþ

/proc/mounts ÎļþÏÔʾÁËÄ¿½ñ¹ÒÔصÄÎļþϽµµÍбí£¬°üÀ¨ NFS ¹²Ïí¡£ÒªÉó²é´ËÎļþ£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ

sudo cat /proc/mounts

µÇ¼ºó¸´ÖÆ

ʾÀýÊä³ö£º

nfsd on /nfsmount type nfs (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=2049,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.100,local_lock=none,addr=192.168.1.10)

µÇ¼ºó¸´ÖÆ

3. ʹÓà exportfs ÏÂÁî

exportfs ÏÂÁî¿ÉÓÃÓÚÖÎÀí NFS ¹²Ïí¡£ÒªÊ¹ÓôËÏÂÁîÉó²é¹²Ïí£¬¿ÉÒÔʹÓÃÒÔÏÂÓï·¨£º

sudo exportfs -a

µÇ¼ºó¸´ÖÆ

ʾÀýÊä³ö£º

/data -> 192.168.1.100
/home/user -> 192.168.1.200

µÇ¼ºó¸´ÖÆ

ÒÔÉϾÍÊÇlinuxÔõô¿´nfsÉèÖõÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±ÊµÊ±ÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±

13452372176

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
¡¾ÍøÕ¾µØͼ¡¿¡¾sitemap¡¿