AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
Expand all | Collapse all

NFS server exports to Linux only as read-only?

  • 1.  NFS server exports to Linux only as read-only?

    Posted Fri September 24, 2010 06:08 PM

    Originally posted by: ThatSeattleGuy


    I'm administering a client's VERY old AIX 4.3.3 system. I'm trying to NFS mount a directory (/transfer) on the AIX system from a modern (RHEL 5.5) Linux client. I'm able to make the mount happen fine, and I've deliberately (for testing) made everything as loose as possible:

    # more /etc/exports
    +/transfer -rw=*,access=*,root=*

    # exportfs -va
    exportfs: 1831-187 re-exported /transfer

    # showmount -e
    export list for aix:
    /transfer *

    But while the Linux client can mount this fine, and read it, it only sees it as read-only, no matter what I do:

    root@linux ~# cat /etc/fstab
    aix:/transfer /mnt/aixxfer nfs defaults,noacl 0 0

    root@linux ~# mount /mnt/borisxfer

    root@linux ~# mount
    aix:/transfer on /mnt/aixxfer type nfs (rw,noacl,addr=192.168.1.2)

    root@linux ~# ls -la /mnt/borisxfer/
    total 460
    drwxrwsrwx 10 root sys 512 Sep 23 14:29 .
    drwxr-xr-x 3 root root 4096 Sep 23 14:36 ..
    drwxr-sr-x 11 root root 512 Nov 3 2009 bci
    drwxrwx--- 2 root root 512 Jun 25 2009 lost+found

    root@linux ~# touch /mnt/borisxfer/xyzzy
    touch: cannot touch `/mnt/borisxfer/xyzzy': Read-only file system
    I've banged on this for a few hours trying MANY different options on both sides, and using any number of different userids on the linux side (root, a common user with the same UID, an anonymous user). No joy.

    What am I doing wrong and/or how can I trace what's going wrong here?

    Many thanks.
    TSG
    #AIX-Forum


  • 2.  Re: NFS server exports to Linux only as read-only?

    Posted Fri September 24, 2010 06:13 PM

    Originally posted by: ThatSeattleGuy


    Sorry, some creative edits went awry. Here's a better version of the question:

    I'm administering a client's VERY old AIX 4.3.3 system. I'm trying to NFS mount a directory (/transfer) on the AIX system from a modern (RHEL 5.5) Linux client. I'm able to make the mount happen fine, and I've deliberately (for testing) made everything as loose as possible:

    1. more /etc/exports
    /transfer -rw=*,access=*,root=*

    1. exportfs -va
    exportfs: 1831-187 re-exported /transfer

    1. showmount -e
    export list for aix:
    /transfer *

    But while the Linux client can mount this fine, and read it, it only sees it as read-only, no matter what I do:

    root@linux ~# cat /etc/fstab
    aix:/transfer /mnt/aixxfer nfs defaults,noacl 0 0

    root@linux ~# mount /mnt/aixxfer

    root@linux ~# mount
    aix:/transfer on /mnt/aixxfer type nfs (rw,noacl,addr=192.168.1.2)

    root@linux ~# ls -la /mnt/aixxfer/
    total 460
    drwxrwsrwx 10 root sys 512 Sep 23 14:29 .
    drwxr-xr-x 3 root root 4096 Sep 23 14:36 ..
    drwxr-sr-x 11 root root 512 Nov 3 2009 bci
    drwxrwx--- 2 root root 512 Jun 25 2009 lost+found

    root@linux ~# touch /mnt/aixxfer/xyzzy
    touch: cannot touch `/mnt/aixxfer/xyzzy': Read-only file system
    I've banged on this for a few hours trying MANY different options on both sides, and using any number of different userids on the linux side (root, a common user with the same UID, an anonymous user). No joy.

    What am I doing wrong and/or how can I trace what's going wrong here?

    Many thanks.
    TSG
    #AIX-Forum


  • 3.  Re: NFS server exports to Linux only as read-only?

    Posted Sun September 26, 2010 03:38 AM

    Originally posted by: john1212


    do:

    root@aix~# ln -s /transfer /tmp/transfer_nfs
    ls -l / |grep transfer
    ls -l /tmp | grep transfer_nfs

    more /etc/exports
    /tmp/transfer_nfs -rw=*,access=*,root=*

    root@linux ~# cat /etc/fstab
    aix:/transfer_nfs /mnt/aixxfer nfs defaults,noacl 0 0

    root@linux ~# mount /mnt/borisxfer

    root@linux ~# mount
    aix:/transfer on /mnt/aixxfer type nfs (rw,noacl,addr=192.168.1.2)

    root@linux ~# ls -la /mnt/borisxfer/

    ........
    touch /mnt/borisxfer/xyzzy
    #AIX-Forum


  • 4.  Re: NFS server exports to Linux only as read-only?

    Posted Sun September 26, 2010 11:32 AM

    Originally posted by: ThatSeattleGuy


    All good thoughts - many thanks. But no better result:

    root@aix ls -l /tmp | grep nfs
    lrwxrwxrwx 1 root system 9 Sep 26 11:07 xfer_nfs -> /transfer

    root @aix ls -l / | grep transfer
    drwxrwsrwx 11 root sys 512 Sep 24 22:19 transfer

    root@aix exportfs -va
    Exported /tmp/xfer_nfs

    root@aix exportfs
    /tmp/xfer_nfs -rw=*,access=*,root=*

    root@aix more /etc/exports | grep nfs
    /tmp/xfer_nfs -rw=*,access=*,root=*
    now on linux side

    [root@linux$ cat /etc/fstab | grep nfs
    aix:/tmp/xfer_nfs /mnt/aixxfer nfs defaults,rw,noacl 0 0

    root@linux mount /mnt/aixxfer/
    root@linux

    rooot@linux$ mount | grep nfs
    aix:/tmp/xfer_nfs on /mnt/aixxfer type nfs (rw,noacl,addr=192.168.1.2)

    root@linux$ cd /mnt/aixxfer
    root@linux aixxfer$ touch xyz
    touch: cannot touch `xyz': Read-only file system
    #AIX-Forum


  • 5.  Re: NFS server exports to Linux only as read-only?

    Posted Sun September 26, 2010 11:35 AM

    Originally posted by: ThatSeattleGuy


    One more crucial datum - and I feel pretty stupid for not having tried this earlier, so apologies in advance:

    If I mount the exported filesystem LOCALLY on the AIX side - no linux involved - it's STILL read-only. So we can focus on AIX and ignore Linux for now.

    Question: The user created this directory with the SUID bit set in the group permissions - not sure why - but is it possible NFS is locking down on it because of that?
    1. ls -lad /transfer
    drwxrwsrwx 11 root sys 512 Sep 24 22:19 /transfer
    #
    #AIX-Forum


  • 6.  Re: NFS server exports to Linux only as read-only?

    Posted Sun September 26, 2010 11:56 AM

    Originally posted by: ThatSeattleGuy


    ( of course, I meant "SGID bit set", not suid bit...)
    #AIX-Forum


  • 7.  Re: NFS server exports to Linux only as read-only?

    Posted Sun September 26, 2010 12:37 PM

    Originally posted by: SystemAdmin


    well, you're just 1 command away from a real-world test, I'd go for it.

    in general with nfs, I like to look at the network packets. wireshark does a fine job about decoding nfs/rpc and the protocols are pretty much assisting with reasonable error codes.
    #AIX-Forum


  • 8.  Re: NFS server exports to Linux only as read-only?

    Posted Sun September 26, 2010 08:34 PM

    Originally posted by: ThatSeattleGuy


    well, you're just 1 command away from a real-world test, I'd go for it.

    ??? Not sure what's being implied - go for what? I did test it already using a same-system (localhost) mount, and it's still read-only.

    I'll look to see if there's a wireshark package available for AIX 4.3.3. Lots of stuff isn't so accessible for an 11-year-old OS version. :)

    thanks /tsg/
    #AIX-Forum


  • 9.  Re: NFS server exports to Linux only as read-only?

    Posted Mon September 27, 2010 04:03 AM

    Originally posted by: SystemAdmin


    excuse my imprecision, i meant: test removing the SGID bit.

    i doubt there is a wireshark for aix 4.3 but you can capture with iptrace or tcpdump and analyze on windows or linux.

    regards
    Delgado
    #AIX-Forum


  • 10.  Re: NFS server exports to Linux only as read-only?

    Posted Mon September 27, 2010 10:26 AM

    Originally posted by: ThatSeattleGuy


    delgado: thanks, sorry for not understanding. I did remove the SGID bit and re-exported and the result was the same - the mount was read-only whether on the Linux box or the localhost loopback mount on the same AIX box.

    thanks much
    #AIX-Forum


  • 11.  Re: NFS server exports to Linux only as read-only?

    Posted Sun September 26, 2010 03:02 PM

    Originally posted by: john1212


    No comment.
    #AIX-Forum