Bug 1499769 - [ceph-ansible] - NFS - Read-only file system when nfs is mounted
Summary: [ceph-ansible] - NFS - Read-only file system when nfs is mounted
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Documentation
Version: 3.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: 3.0
Assignee: John Wilkins
QA Contact: Vidushi Mishra
URL:
Whiteboard:
Depends On:
Blocks: 1496210
TreeView+ depends on / blocked
 
Reported: 2017-10-09 11:06 UTC by Vasishta
Modified: 2017-12-26 03:41 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-26 03:41:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Vasishta 2017-10-09 11:06:34 UTC
Description of problem:
When its tried to writeon nfs mount which is configured using ceph-ansible, it says "Read-only file system"

Version-Release number of selected component (if applicable):
NFS Ganesha version - nfs-ganesha-2.5.2-2.el7cp.x86_64
ceph-ansible-3.0.0-0.1.rc15.el7cp.noarch

How reproducible:
Always 

Steps to Reproduce:
1. Configure ceph-ansible to have a nfs.
2. run playbook.

Actual results:
$ sudo mount -t nfs -o nfsvers=4.1,sync,noauto,soft,proto=tcp <nfs-daemon-node>:/ mnt/
$ sudo mkdir mnt/hhh1
mkdir: cannot create directory ‘mnt/hhh1’: Read-only file system

Expected results:
It should be able to run I/O's on nfs mount.

Additional info:
In ganesha conf file generated by ceph-ansible, the path and pseudo are initialized as "/" and /ceph respectively. If both path and pseudo are initialized as "/" referring the doc, I/O's can be run on nfs mount.

Please let us know if anything has been missed while mounting, will redirect the same to the docs.

Comment 2 Sébastien Han 2017-10-09 11:25:28 UTC
Assigning to Ali.
Ali, you implemented this, so please have a look at fixing it.

Thanks in advance.

Comment 3 Ali Maredia 2017-10-09 18:15:42 UTC
Vasistha, can you send me a copy of the entire ganesha.conf file on the nfs node? Also did you change any of the nfs related variables in the ceph-ansible repo used to generate the cluster?

-Ali

Comment 4 Vasishta 2017-10-10 03:02:07 UTC
Hi Ali

Copy of ganesha conf file -

$ cat /etc/ganesha/ganesha.conf 
# Please do not change this file directly since it is managed by Ansible and will be overwritten

EXPORT
{
	Export_id=20134;

	Path = "/";

	Pseudo = /ceph;

	Access_Type = RW;

	Protocols = 3,4;

	Transports = TCP;

	SecType = sys,krb5,krb5i,krb5p;

	FSAL {
		Name = RGW;
		User_Id = "cephnfs";
		Access_Key_Id ="N3L2FC7DUHWP59W5UBSX";
		Secret_Access_Key = "PP8zPyNFNhJr47bksSZQtSX56mOpcXU9YNuCZ8uc";
	}

        

}

RGW {
        ceph_conf = "/etc/ceph/2017_sub.conf";
        cluster = "2017_sub";
        name = "client.rgw.magna020";
        
}

LOG {
        Facility {
                name = FILE;
                destination = "/var/log/ganesha/ganesha.log";
                enable = active;
        }

        
}


I didn't change anything in group_vars/nfss.yml.

Regards,
Vasishta

Comment 11 Frank Filz 2017-11-15 18:30:37 UTC
Ok, I think this still needs some wordsmithing, but here's an attempt to meet the requirements we need:

Export Path and Pseudo Configuration and Use
 
EXPORT and mount examples with mount_path_pseudo = false
 
Path            Pseudo          Tag     Mechanism   Mount
/export/test1   /export/test1   test1   v3 Path     mount -o vers=3 server:/export/test1
/export/test1   /export/test1   test1   v3 Tag      mount -o vers=3 server:test1
/export/test1   /export/test1   test1   v4 Pseudo   mount -o vers=4 server:/export/test1
/               /export/ceph1   ceph1   v3 Path     mount -o vers=3 server:/
/               /export/ceph1   ceph1   v3 Tag      mount -o vers=3 server:ceph1
/               /export/ceph1   ceph1   v4 Pseudo   mount -o vers=4 server:/export/ceph1
/               /export/ceph2   ceph2   v3 Path     not accessible
/               /export/ceph2   ceph2   v3 Tag      mount -o vers=3 server:ceph2
/               /export/ceph2   ceph2   v4 Pseudo   mount -o vers=4 server:/export/ceph2
 
EXPORT and mount examples with mount_path_pseudo = true
 
Path            Pseudo          Tag     Mechanism   Mount
/export/test1   /export/test1   test1   v3 Pseudo   mount -o vers=3 server:/export/test1
/export/test1   /export/test1   test1   v3 Tag      mount -o vers=3 server:test1
/export/test1   /export/test1   test1   v4 Pseudo   mount -o vers=4 server:/export/test1
/               /export/ceph1   ceph1   v3 Pseudo   mount -o vers=3 server:/export/ceph1
/               /export/ceph1   ceph1   v3 Tag      mount -o vers=3 server:ceph1
/               /export/ceph1   ceph1   v4 Pseudo   mount -o vers=4 server:/export/ceph1
/               /export/ceph2   ceph2   v3 Pseudo   mount -o vers=3 server:/export/ceph2
/               /export/ceph2   ceph2   v3 Tag      mount -o vers=3 server:ceph2
/               /export/ceph2   ceph2   v4 Pseudo   mount -o vers=4 server:/export/ceph2
 
Ganesha exports are configured somewhat more flexibly than
other NFS servers. This document is intended to help understand
the namespace aspects of Ganesha export configuration.
 
First, it is highly recommended that the following option be set in
the NFS_CORE_PARAM block:
 
    mount_path_pseudo = true;
 
This option will make NFS v3 and NFS v4.x mounts both use the same
server side path to reach an export, for example:
 
    mount -o vers=3 192.168.0.1:/export /mnt
    mount -o vers=4 192.168.0.1:/export /mnt
 
Without this option, NFS v3 mounts use the Path option and NFS v4.x
mounts use the Pseudo option.
 
The Path option instructs Ganesha where to find the export. For
the VFS FSAL, this is the location within the server's namespace.
For other FSALs, it may be the location within the filesystem
managed by that FSAL's namespace. For example, if the CEPH FSAL
is used to export an entire CephFS volume, Path would be /.
 
The Pseudo option instructs Ganesha where to place the export within
NFS v4's pseudo file system namespace. NFS v4 specifies the server may
construct a pseudo namespace that may not correspond to any actual
locations of exports, and portions of that pseudo filesystem may
exist only within the realm of the NFS server and not correspond
to any physical directories. Further, an NFS v4 server places all
its exports within a single namespace. It is possible to have a
single export exported as the pseudo filesystem root, but it is much
more common to have multiple exports placed in the pseudo filesystem.
With a traditional VFS, often the Pseudo location is the same as the
Path location, but again, returning to the example CephFS export
with "/" as the Path, if multiple exports are desired, the export
would likely have something else (for example /ceph) as the Pseudo
option.
 
An NFS v4 client can mount the root of the pseudo file system (and
in fact, under the covers this is always what happens, NFS v4 has
no special MOUNT protocol, instead, there is an operation
PUTROOTFH which instructs the server to navigate to the root of
the pseudo filesystem, from whence LOOKUP operations are used to
navigate to the directory of interest. Thus the NFS v4 mount
command:
 
    mount -o vers=4 192.168.0.1:/export /mnt
 
results in a PUTROOTFH followed by LOOKUP export, while
 
    mount -o vers=4 192.168.0.1:/ceph /mnt
 
would result in PUTROOTFH followed by LOOKUP ceph
 
Without the
 
    mount_path_pseudo = true;
 
option, the NFS v3 mount command to access the CephFS export would be:
 
    mount -o vers=3 192.168.0.1:/ /mnt
 
Note also that if several CephFS volumes were exported, all the
exports might have the same Path (/). Without the mount_path_pseudo
option, only the first would be accessible to NFS v3 mounts (unless
the obscure Tag export option was used).

Comment 13 Vidushi Mishra 2017-11-17 10:06:51 UTC
Document looks fine to me. Moving it to verified.


Note You need to log in before you can comment on or make changes to this bug.