Novice Learning---NFS read-only file system under Linux

Source: Internet
Author: User

[[email protected] alidata]# Touch 24touch:cannot Touch ': Read-only file system

First, see if Mount has permission

[[email protected] /]# mount/dev/sda3 on / type ext4  (rw) proc on  /proc type proc  (rw) sysfs on /sys type sysfs  (rw) devpts on  /dev/pts type devpts  (rw,gid=5,mode=620) Tmpfs on /dev/shm type tmpfs   (rw,rootcontext= "System_u:object_r:tmpfs_t:s0")/dev/sda1 on /boot type ext4  (rw ) none on /proc/sys/fs/binfmt_misc type binfmt_misc  (rw) sunrpc on /var/lib/ nfs/rpc_pipefs type rpc_pipefs  (rw) 10.10.10.11:/sharedata on /alidata type  nfs  (rw,vers=4,addr=10.10.10.11,clientaddr=10.10.10.12) [[Email protected] /]# lltotal  106drwxr-xr-x.   2 nfsnobody nfsnobody  4096 Oct 18  22:51 alidatadr-xr-xr-x.   2 root      root        4096 oct 18 21:32 bindr-xr-xr-x.   5 root       root       1024 Jul 14 21:44  bootdrwxr-xr-x.   2 root      root        4096 nov 23  2013 cgroup

Two |, try to give 777 permissions

[Email protected]/]# chmod 777/alidata/chmod:changing permissions of '/alidata/': Read-only file system

Third, restart NFS

[[Email protected] /]# /etc/init.d/nfs restartshutting down nfs daemon:                                    [   ok  ]shutting down nfs mountd:                                    [  ok  ]shutting down nfs quotas:                                    [   ok  ]shutting down nfs services:                                  [  OK  ]Shutting down RPC idmapd:                                    [  ok  ]starting nfs  services:  exportfs: No options for /sdata 10.10.10.0/24:  SUGGEST 10.10.10.0/24 (Sync)  to avoid warningexportfs: No host name  given with /sdata  (Rw,sync),  suggest * (Rw,sync)  to avoid warning                                                              [   OK  ]Starting NFS quotas:                                         [  ok  ]starting  NFS mountd:                                         [  OK  ]Starting NFS daemon:                                          [  ok  ] starting rpc idmapd:                                         [  OK  ]

NOTE: hint at 24 and (there is a space between; finally find the reason

[Email protected]/]# Cat/etc/exports # #share data for 20171018/sharedata 10.10.10.0/24 (Rw,sync)

Then edit, remove spaces, restart NFS

[[Email protected] /]# /etc/init.d/nfs restartshutting down nfs daemon:                                    [   ok  ]shutting down nfs mountd:                                    [  ok  ]shutting down nfs quotas:                                    [   ok  ]shutting down nfs services:                                  [  OK  ]Shutting down RPC idmapd:                                    [  ok  ]starting nfs  services:                                       [  OK  ]Starting NFS quotas:                                         [   ok  ]starting&nBsp nfs mountd:                                         [  OK  ]Starting NFS daemon:                                          [  OK  ]Starting RPC idmapd:                                         [  OK   ]

Check out what's wrong and then re-establish the file

[[email protected] alidata]# touch ASD [[email protected] alidata]# ll total 72-rw-r--r--. 1 root root 0 Oct 23:53 ad-rw-r--r--. 1 nfsnobody nfsnobody 0 Oct 00:11 asd-rw-r--r--. 1 nfsnobody nfsnobody 46850 log.txt-rw-r--r--. 1 nfsnobody nfsnobody 14476 mytlv-20160119.log-rw-r--r--. 1 nfsnobody nfsnobody 4537 Sep 5 22:12 qzj.txt

Finally, the reason is because they are not aware of the configuration/etc/exports, the middle of the space added,

This article is from "Rookie Starling" blog, please be sure to keep this source http://cainiaibage.blog.51cto.com/5307589/1973964

Novice Learning---NFS read-only file system

under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.