NFS mounted as readonly, why?
I have an NFS share that I export myself and then want to mount as readwrite. But for some reason it's mounted as readonly.
$ mount | grep test
127.0.0.1:/var/sharepath on /test type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=127.0.0.1,local_lock=none,addr=127.0.0.1)
$ cat /etc/exports | grep sharepath
/var/sharepath *(rw,sync,no_root_squash,no_subtree_check)
Until here it looks good. right?
However: touch: cannot touch ‘/test/asdf’: Read-only file system
What might be the reason?
PS: var itself is also read write:
$ mount | grep lvol0
/dev/mapper/vg01r5-lvol0 on /var type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
mount nfs
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 7 more comments
I have an NFS share that I export myself and then want to mount as readwrite. But for some reason it's mounted as readonly.
$ mount | grep test
127.0.0.1:/var/sharepath on /test type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=127.0.0.1,local_lock=none,addr=127.0.0.1)
$ cat /etc/exports | grep sharepath
/var/sharepath *(rw,sync,no_root_squash,no_subtree_check)
Until here it looks good. right?
However: touch: cannot touch ‘/test/asdf’: Read-only file system
What might be the reason?
PS: var itself is also read write:
$ mount | grep lvol0
/dev/mapper/vg01r5-lvol0 on /var type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
mount nfs
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
2
The "rw" in our output means it's mounted (and exported) as read-write. What makes you think that it's mounted read only?
– L.Ray
Mar 19 '18 at 17:40
@L.Ray I added some error output from a simple example.
– erikbwork
Mar 19 '18 at 18:06
/test/<name>
will cause it to try from root directory, try from./test/asdf
or/var/sharepath/test/asdf
(unless it's a spelling mistake, we all make those)
– thebtm
Mar 19 '18 at 19:05
/test
is a directory in root. That's correct. It is not~/test
or something.
– erikbwork
Mar 19 '18 at 19:13
1
What are the permissions for/test
?ls -l /test
– Nasir Riley
Mar 19 '18 at 20:28
|
show 7 more comments
I have an NFS share that I export myself and then want to mount as readwrite. But for some reason it's mounted as readonly.
$ mount | grep test
127.0.0.1:/var/sharepath on /test type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=127.0.0.1,local_lock=none,addr=127.0.0.1)
$ cat /etc/exports | grep sharepath
/var/sharepath *(rw,sync,no_root_squash,no_subtree_check)
Until here it looks good. right?
However: touch: cannot touch ‘/test/asdf’: Read-only file system
What might be the reason?
PS: var itself is also read write:
$ mount | grep lvol0
/dev/mapper/vg01r5-lvol0 on /var type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
mount nfs
I have an NFS share that I export myself and then want to mount as readwrite. But for some reason it's mounted as readonly.
$ mount | grep test
127.0.0.1:/var/sharepath on /test type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=127.0.0.1,local_lock=none,addr=127.0.0.1)
$ cat /etc/exports | grep sharepath
/var/sharepath *(rw,sync,no_root_squash,no_subtree_check)
Until here it looks good. right?
However: touch: cannot touch ‘/test/asdf’: Read-only file system
What might be the reason?
PS: var itself is also read write:
$ mount | grep lvol0
/dev/mapper/vg01r5-lvol0 on /var type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
mount nfs
mount nfs
edited Mar 19 '18 at 18:05
erikbwork
asked Mar 19 '18 at 17:10
erikbworkerikbwork
3801416
3801416
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
2
The "rw" in our output means it's mounted (and exported) as read-write. What makes you think that it's mounted read only?
– L.Ray
Mar 19 '18 at 17:40
@L.Ray I added some error output from a simple example.
– erikbwork
Mar 19 '18 at 18:06
/test/<name>
will cause it to try from root directory, try from./test/asdf
or/var/sharepath/test/asdf
(unless it's a spelling mistake, we all make those)
– thebtm
Mar 19 '18 at 19:05
/test
is a directory in root. That's correct. It is not~/test
or something.
– erikbwork
Mar 19 '18 at 19:13
1
What are the permissions for/test
?ls -l /test
– Nasir Riley
Mar 19 '18 at 20:28
|
show 7 more comments
2
The "rw" in our output means it's mounted (and exported) as read-write. What makes you think that it's mounted read only?
– L.Ray
Mar 19 '18 at 17:40
@L.Ray I added some error output from a simple example.
– erikbwork
Mar 19 '18 at 18:06
/test/<name>
will cause it to try from root directory, try from./test/asdf
or/var/sharepath/test/asdf
(unless it's a spelling mistake, we all make those)
– thebtm
Mar 19 '18 at 19:05
/test
is a directory in root. That's correct. It is not~/test
or something.
– erikbwork
Mar 19 '18 at 19:13
1
What are the permissions for/test
?ls -l /test
– Nasir Riley
Mar 19 '18 at 20:28
2
2
The "rw" in our output means it's mounted (and exported) as read-write. What makes you think that it's mounted read only?
– L.Ray
Mar 19 '18 at 17:40
The "rw" in our output means it's mounted (and exported) as read-write. What makes you think that it's mounted read only?
– L.Ray
Mar 19 '18 at 17:40
@L.Ray I added some error output from a simple example.
– erikbwork
Mar 19 '18 at 18:06
@L.Ray I added some error output from a simple example.
– erikbwork
Mar 19 '18 at 18:06
/test/<name>
will cause it to try from root directory, try from ./test/asdf
or /var/sharepath/test/asdf
(unless it's a spelling mistake, we all make those)– thebtm
Mar 19 '18 at 19:05
/test/<name>
will cause it to try from root directory, try from ./test/asdf
or /var/sharepath/test/asdf
(unless it's a spelling mistake, we all make those)– thebtm
Mar 19 '18 at 19:05
/test
is a directory in root. That's correct. It is not ~/test
or something.– erikbwork
Mar 19 '18 at 19:13
/test
is a directory in root. That's correct. It is not ~/test
or something.– erikbwork
Mar 19 '18 at 19:13
1
1
What are the permissions for
/test
? ls -l /test
– Nasir Riley
Mar 19 '18 at 20:28
What are the permissions for
/test
? ls -l /test
– Nasir Riley
Mar 19 '18 at 20:28
|
show 7 more comments
1 Answer
1
active
oldest
votes
I'm aware this problem can have multiple sources. In our case it was really tricky.
In /etc/exports
there was also a line that only said /var
without any options etc. And that took precedence over /var/sharepath
with all its options. After deleting that /var
line it works. Probably a copy&paste error.
Another solution to similar problems might be setting priorities via export configuration.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f432137%2fnfs-mounted-as-readonly-why%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I'm aware this problem can have multiple sources. In our case it was really tricky.
In /etc/exports
there was also a line that only said /var
without any options etc. And that took precedence over /var/sharepath
with all its options. After deleting that /var
line it works. Probably a copy&paste error.
Another solution to similar problems might be setting priorities via export configuration.
add a comment |
I'm aware this problem can have multiple sources. In our case it was really tricky.
In /etc/exports
there was also a line that only said /var
without any options etc. And that took precedence over /var/sharepath
with all its options. After deleting that /var
line it works. Probably a copy&paste error.
Another solution to similar problems might be setting priorities via export configuration.
add a comment |
I'm aware this problem can have multiple sources. In our case it was really tricky.
In /etc/exports
there was also a line that only said /var
without any options etc. And that took precedence over /var/sharepath
with all its options. After deleting that /var
line it works. Probably a copy&paste error.
Another solution to similar problems might be setting priorities via export configuration.
I'm aware this problem can have multiple sources. In our case it was really tricky.
In /etc/exports
there was also a line that only said /var
without any options etc. And that took precedence over /var/sharepath
with all its options. After deleting that /var
line it works. Probably a copy&paste error.
Another solution to similar problems might be setting priorities via export configuration.
edited Mar 20 '18 at 10:20
answered Mar 20 '18 at 10:07
erikbworkerikbwork
3801416
3801416
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f432137%2fnfs-mounted-as-readonly-why%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
The "rw" in our output means it's mounted (and exported) as read-write. What makes you think that it's mounted read only?
– L.Ray
Mar 19 '18 at 17:40
@L.Ray I added some error output from a simple example.
– erikbwork
Mar 19 '18 at 18:06
/test/<name>
will cause it to try from root directory, try from./test/asdf
or/var/sharepath/test/asdf
(unless it's a spelling mistake, we all make those)– thebtm
Mar 19 '18 at 19:05
/test
is a directory in root. That's correct. It is not~/test
or something.– erikbwork
Mar 19 '18 at 19:13
1
What are the permissions for
/test
?ls -l /test
– Nasir Riley
Mar 19 '18 at 20:28