cannot write files to a mounted nfs partition

I mounted an nfs partition from a remote server to this host (thea). I wrote this line to /etc/fstab file and mounted with -a option. all things looks ok except when I tried to write file to this partition. it doesn't let me create file to this partition even with "root" permission, please help.  




[root@thea titanbackup]# touch testfile
touch: cannot touch `testfile': Permission denied

[root@thea mnt]# ls -alt
total 20
dr-xr-xr-x. 28 root root 4096 Aug 21 08:48 ..
drwxr-xr-x   2 root root    6 Jun 17 14:31 titanbackup
drwxr-xr-x.  6 root root 4096 Jun 14 21:07 .
drwxr-xr-x.  2 root root 4096 Feb 11  2014 hgfs
drwxr-xr-x.  2 root root 4096 Feb 10  2014 cdrom
drwxr-xr-x.  2 root root 4096 Feb  5  2014 ExternalHD
[root@thea mnt]#

[root@thea titanbackup]# 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)
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/vg_OS-home on /home type ext4 (rw)
/dev/mapper/vg_OS-tmp on /tmp type ext4 (rw)
/dev/mapper/vg_Gentran-LogVol00 on /u1 type ext4 (rw)
/dev/mapper/vg_OS-usr on /usr type ext4 (rw)
/dev/mapper/vg_OS-var on /var 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)
titan.minkagroup.net:/u1/backup/thea/nfsbackup on /u1/nfsbackup type nfs (rw,vers=4,addr=10.10.4.55,clientaddr=10.10.4.234)
titan.minkagroup.net:/u1/backup/thea/nfsbackup on /mnt/titanbackup type nfs (rw,vers=4,addr=10.10.4.55,clientaddr=10.10.4.234)
[root@thea titanbackup]# cat /etc/*-release
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Red Hat Enterprise Linux Server release 6.5 (Santiago)
[root@thea titanbackup]#



root@thea titanbackup]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Mon Feb  3 23:20:58 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=011240a7-1286-43ef-9e77-889eada1b760 /                       ext4    defaults        1 1
UUID=8678f3c4-d9a0-44fe-96ea-f292b022c84e /boot                   ext4    defaults        1 2
/dev/mapper/vg_OS-home  /home                   ext4    defaults        1 2
/dev/mapper/vg_OS-tmp   /tmp                    ext4    defaults        1 2
/dev/mapper/vg_Gentran-LogVol00 /u1                     ext4    defaults        1 2
/dev/mapper/vg_OS-usr   /usr                    ext4    defaults        1 2
/dev/mapper/vg_OS-var   /var                    ext4    defaults        1 2
UUID=969cf12d-482f-4b54-a6e0-79a8600509aa swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
#titan.minkagroup.net:/u1/backup/thea/nfsbackup   /u1/nfsbackup nfs     _netdev         0 0
titan:/u1/backup/thea/nfsbackup   /mnt/titanbackup nfs    _netdev         0 0
[root@thea titanbackup]#
Jason YuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Seth SimmonsSr. Systems AdministratorCommented:
on the titan server, what is the output of /etc/exports?
for that export (titanbackup) does it have the option no_root_squash?
if not, that is your problem since by default root over an nfs share will be like nobody
adding no_root_squash to your export options will allow root access over nfs

example: /u1/backup/thea/nfsbackup *(no_root_squash)
you want to add that option there with whatever other options you already have
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jason YuAuthor Commented:
I just added the no_root_sqush to this titan server but it's still not working, could you check?

[root@titan ~]# cat /etc/exports
/u1/backup/jupiter              10.10.4.121(rw,sync)
/u1/backup/halo                 halobk(rw,sync)
/u1/backup/ora9igl              10.0.4.8(rw,sync)
/u1/centos                      *(rw,sync)
/u1/centos/centos-6_32          *(rw,sync)
/u3/appsperi                    10.10.4.23(rw,sync) 10.10.4.111(rw,sync) elysium(rw,sync) phobos(rw,sync)
/u1/centos/rhel64_5.5           *(rw,sync)
/u2/backup/luna                 10.0.4.21(rw,sync)
/u2/backup/luna/oracle          10.0.4.21(rw,sync)
/u1/backup/thea                 10.10.4.234(rw,sync,no_root_squash)
[root@titan ~]#
-------------------------

[root@thea titanbackup]# mount titan:/u1/backup/thea/nfsbackup   /mnt/titanbackup
mount.nfs: /mnt/titanbackup is busy or already mounted
[root@thea titanbackup]# umount -f /u1/nfsbackup
umount2: Invalid argument
umount: /u1/nfsbackup: not mounted
[root@thea titanbackup]# cd ..
[root@thea mnt]# umount -f /mnt/titanbackup/
[root@thea mnt]# mount -a
[root@thea mnt]# cd titanbackup/
[root@thea titanbackup]# touch test
touch: cannot touch `test': Permission denied
[root@thea titanbackup]#
0
Seth SimmonsSr. Systems AdministratorCommented:
after you change the exports file, you need to run exportfs -a on titan for the nfs server to refresh the export list
remove the mount on thea and mount again
the syntax you added in exports is correct
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Jason YuAuthor Commented:
It's working now, wonderful job.

[root@thea titanbackup]# touch test
[root@thea titanbackup]# ls -alt
total 4
-rw-r--r--  1 root root    0 Aug 21  2014 test
drwxr-xr-x  2 root root   17 Aug 21  2014 .
drwxr-xr-x. 6 root root 4096 Jun 14 21:07 ..
[root@thea titanbackup]# rm -rf test
[root@thea titanbackup]#
0
Jason YuAuthor Commented:
what is exportfs command for? and option -a -r?
0
Jason YuAuthor Commented:
thanks, I figured it out by google. have a nice night.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.