[SOLVED] NFS Share mounting as read only

Discussion about using NAS on Linux and Unix OS.
Locked
Bruenor
New here
Posts: 2
Joined: Mon Aug 19, 2019 3:59 am

[SOLVED] NFS Share mounting as read only

Post by Bruenor »

Not sure what happened but my NFS share is now mounting as read only in Linux. I haven't made any changes, to the configuration or how I mount the volume. How can I regain read/write access to my drive ?

QNAP TS-231
Single Drive no RAID
Firmware 4.3.6.0993

I ran fsck from the Web gui and from the command line, in case there were file system errors due to a recent power outtage. Not sure where to go next.

mount the nfs share

Code: Select all

sudo mount -t nfs 192.168.0.99:SecureMedia /media/securemedia
mount the encrypted file system

Code: Select all

encfs /media/securemedia/enc ~/decrypted
UnMount

Code: Select all

fusermount -u ~/decrypted
Some permissions
/media

Code: Select all

drwxrwxrwx   4 root root 4096 Oct  2  2016 securemedia
/media/securemedia/

Code: Select all

drwxr-xr-x 5 farslayer farslayer 4096 Apr  1  2017 enc
/home/farslayer/decrypted

Code: Select all

drwxr-xr-x 22 farslayer farslayer  4096 Feb 14 18:49 MyFiles
Qnap NFS Share permissions

Code: Select all

linsecure read/write
/etc/fstab

Code: Select all

#  NAS
192.168.20.20:/SecureMedia  /media/securemedia  nfs username=linsecure,password=<removed>  0 0
cat /etc/mtab

Code: Select all

192.168.0.99:SecureMedia /media/securemedia nfs rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255, hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.99,mountvers=3,mountport=30000,mountproto=udp,local_lock=none,addr=192.168.0.99 0 0

encfs /home/farslayer/decrypted fuse.encfs rw,nosuid,nodev,relatime,user_id=1000, group_id=1000,default_permissions 0 0
If I try to create a document or folder anywhere on the mounted drive I get an error that says 'Read-only file system'.

Code: Select all

:farslayer~/decrypted$ touch test.txt
touch: cannot touch 'test.txt': Read-only file system

root@debhome:/media/securemedia# touch test.txt
touch: cannot touch 'test.txt': Read-only file system
I can read everything on the volume, I can just no longer write to it. There is plenty of free space on the drive.

Code: Select all

[~] # /etc/init.d/services.sh stop

[~] # df -h
Filesystem                Size      Used Available Use% Mounted on
none                     60.0M     46.3M     13.7M  77% /
devtmpfs                233.0M     12.0k    233.0M   0% /dev
tmpfs                    64.0M    596.0k     63.4M   1% /tmp
tmpfs                   239.6M     28.0k    239.6M   0% /dev/shm
tmpfs                    16.0M      1.1M     14.9M   7% /share
/dev/md9                515.5M    283.8M    231.7M  55% /mnt/HDA_ROOT
cgroup_root             239.6M         0    239.6M   0% /sys/fs/cgroup
/dev/mapper/ce_cachedev1     2.6T      1.4T      1.3T  52% /share/CE_CACHEDEV1_DATA
/dev/md13               433.0M    326.5M    106.5M  75% /mnt/ext
tmpfs                    16.0M     60.0k     15.9M   0% /share/CE_CACHEDEV1_DATA/.samba/lock/msg.lock
tmpfs                    16.0M         0     16.0M   0% /mnt/ext/opt/samba/private/msg.sock
tmpfs                     1.0M         0      1.0M   0% /mnt/rf/nd

[~] # umount /dev/mapper/ce_cachedev1

[~] # e2fsck -f -v -C 0 /dev/mapper/ce_cachedev1   
e2fsck 1.42.13 (17-May-2015)
Pass 1: Checking inodes, blocks, and sizes   
Inode 170786825 has INDEX_FL flag set on filesystem without htree support.     
Inode 170789530 has INDEX_FL flag set on filesystem without htree support.
.
.
.
Pass 2: Checking directory structure                                           
Pass 3: Checking directory connectivity                                        
Pass 4: Checking reference counts                                              
Pass 5: Checking group summary information                                     
                                                                               
       30543 inodes used (0.02%, out of 180699136)
        7487 non-contiguous files (24.5%)
          47 non-contiguous directories (0.2%)
             # of inodes with ind/dind/tind blocks: 0/0/0
             Extent depth histogram: 21860/8439
   376907002 blocks used (52.15%, out of 722776576)
           0 bad blocks
           2 large files

       27798 regular files
        2414 directories
           0 character device files
           0 block device files
           0 fifos
           0 links
         317 symbolic links (231 fast symbolic links)
           5 sockets
------------
       30534 files

[~] # mount -t ext4 /dev/mapper/ce_cachedev1 /share/CE_CACHEDEV1_DATA
[~] # reboot
only thing fsck found was a number of INDEX_FL / htree entries (More than I posted here)

Thoughts ? Recommendations ?

Thanks for your assistance.
Last edited by Bruenor on Sun Aug 25, 2019 11:44 am, edited 1 time in total.
Bruenor
New here
Posts: 2
Joined: Mon Aug 19, 2019 3:59 am

Re: NFS Share mounting as read only

Post by Bruenor »

Tech support requested I ssh into the NAS and provide the output or the file nfssetting in .config location The path to the file is /mnt/HDA_ROOT/.config

Once I looked at the file I noticed an ALLOW IP entry with the old IP address of my workstation. I forgot I had setup IP based permissions and the address of my workstation from dhcp had changed. I was not seeing that setting in the web interface I guess it was just not obvious to me. I used the following KB article to find the setting and update the IP address of my workstation in the NFS settings of the NAS.

https://www.qnap.com/en-us/how-to/knowl ... onnection/

My mount is back to read / write again, it was user error.

Thanks to qnap tech support for being so responsive once I finally submitted a ticket, and then pointing me to the solution so quickly
kevinashaw
Starting out
Posts: 44
Joined: Sun Mar 27, 2011 4:44 am
Location: San Jose, CA

Re: [SOLVED] NFS Share mounting as read only

Post by kevinashaw »

Thank you. That was my problem too. I'd forgotten about it!!
Kevin Shaw
TS453-Pro / 4x 8TB / RAID5
TS453DU-RP / 4x 10TB / RAID5
Locked

Return to “Linux & Unix (NFS)”