Jason Yu
asked on
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-Log Vol00 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/b ackup/thea /nfsbackup on /u1/nfsbackup type nfs (rw,vers=4,addr=10.10.4.55 ,clientadd r=10.10.4. 234)
titan.minkagroup.net:/u1/b ackup/thea /nfsbackup on /mnt/titanbackup type nfs (rw,vers=4,addr=10.10.4.55 ,clientadd r=10.10.4. 234)
[root@thea titanbackup]# cat /etc/*-release
LSB_VERSION=base-4.0-amd64 :base-4.0- noarch:cor e-4.0-amd6 4:core-4.0 -noarch:gr aphics-4.0 -amd64:gra phics-4.0- noarch:pri nting-4.0- amd64:prin ting-4.0-n oarch
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-9e 77-889eada 1b760 / ext4 defaults 1 1
UUID=8678f3c4-d9a0-44fe-96 ea-f292b02 2c84e /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-Log Vol00 /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-a6 e0-79a8600 509aa 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/the a/nfsbacku p /u1/nfsbackup nfs _netdev 0 0
titan:/u1/backup/thea/nfsb ackup /mnt/titanbackup nfs _netdev 0 0
[root@thea titanbackup]#
[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-Log
/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/b
titan.minkagroup.net:/u1/b
[root@thea titanbackup]# cat /etc/*-release
LSB_VERSION=base-4.0-amd64
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-9e
UUID=8678f3c4-d9a0-44fe-96
/dev/mapper/vg_OS-home /home ext4 defaults 1 2
/dev/mapper/vg_OS-tmp /tmp ext4 defaults 1 2
/dev/mapper/vg_Gentran-Log
/dev/mapper/vg_OS-usr /usr ext4 defaults 1 2
/dev/mapper/vg_OS-var /var ext4 defaults 1 2
UUID=969cf12d-482f-4b54-a6
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/
titan:/u1/backup/thea/nfsb
[root@thea titanbackup]#
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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]#
[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]#
ASKER
what is exportfs command for? and option -a -r?
ASKER
thanks, I figured it out by google. have a nice night.
ASKER
[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_roo
[root@titan ~]#
-------------------------
[root@thea titanbackup]# mount titan:/u1/backup/thea/nfsb
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]#