Skip to contentSkip to conversation

two exports on server, only one directory appears on client

DISCUSSION f3ar007 2 participants 2 messages Dec 21, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

f3ar007

author
#0 lore raw

hi,

i have a problem mounting two separate directories on the client. the exports, on the server, are defined as two different directories. and exportfs -rav outputs the correct ipaddr:/path/to/mount on the server.
when i mount the separate directories on the client "mount -t nfs
ipaddr:/full/path /mnt/hd1" and "mount -t nfs ipaddr:/full/path /mnt/hd2" both directories on the client /mnt/hd1 and /mnt/hd2 list the contents of only hd2. for example, on the client, ls /mnt/hd1 outputs the same directories as ls /mnt/hd2. the server has the correct mount points /dev/sda1 as /mnt/1tb and /dev/sdb1 as /mnt/320gb.

here is the code to clarify:

# server output of `mount | grep /dev/sd`
/dev/sda1  on  /mnt/1tb      type vfat  (rw,noexec,nosuid,nodev,umask=000)
/dev/sdb1  on  /mnt/320gb  type vfat  (rw,noexec,nosuid,nodev,umask=000)
# notes two different harddrives here, so the directories in each are different.
# server output of `cat /etc/exports`
/mnt/1tb     client-ipaddress(rw,fsid=0,subtree_check,no_root_squash,crossmnt,async)
/mnt/320gb client-ipaddress(rw,fsid=0,subtree_check,no_root_squash,crossmnt,async)
# server output of `exportfs -rav`
exporting client-ipaddress:/mnt/1tb
exporting client-ipaddress:/mnt/320gb

### end of server ###

### client ###

# client commands
mount -t nfs server-ip:/mnt/1tb /mnt/nfs-1tb
mount -t nfs server-ip:/mnt/320gb /mnt/nfs-320gb
# client output of `mount | grep server-ip`
server-ip:/mnt/1tb  on  /mnt/nfs-1tb  (rw,addr=server-ip)
server-ip:/mnt/320gb  on  /mnt/nfs-320gb  (rw,addr=server-ip)
# client output of `ls /mnt/nfs-1tb` == `ls /mnt/nfs-320gb`
# note the client output of these two commands should be the contents
of server /dev/sda1 then server /dev/sdb1

my question is: how do i mount the two directories separately in order to list contents of both harddrives? is there a separator in /etc/exports that i am missing, causing it to read only the second export?
is there anything i am missing here?

A message that is not in the archive (sent off-list or not yet received): 94de02aa0912202033g1002f945o5a752606fead7215-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#2 lore raw
Quoted 3 lines · On Sun, Dec 20, 2009 at 11:33 PM, f3ar007 <[email protected]> wrote:

hi,

i have a problem mounting two separate directories on the client. =A0=

the

Quoted 1 line

exports, on the server, are defined as two different directories. =A0=

and

Quoted 1 line

exportfs -rav outputs the correct ipaddr:/path/to/mount on the server=

=2E

Quoted 8 lines

=A0when i mount the separate directories on the client "mount -t nfs ipaddr:/full/path /mnt/hd1" and "mount -t nfs ipaddr:/full/path /mnt/hd2" both directories on the client /mnt/hd1 and /mnt/hd2 list the contents of only hd2. =A0for example, on the client, ls /mnt/hd1 outputs the same directories as ls /mnt/hd2. =A0the server has the correct mount points /dev/sda1 as /mnt/1tb and /dev/sdb1 as /mnt/320gb.

Quoted 4 lines

here is the code to clarify:

# server output of `mount | grep /dev/sd`
/dev/sda1 =A0on =A0/mnt/1tb =A0 =A0 =A0type vfat =A0(rw,noexec,nosuid=

,nodev,umask=3D000)

Quoted 1 line

/dev/sdb1 =A0on =A0/mnt/320gb =A0type vfat =A0(rw,noexec,nosuid,nodev=

,umask=3D000)

Quoted 1 line
# notes two different harddrives here, so the directories in each are=

different.

Quoted 3 lines
# server output of `cat /etc/exports`
/mnt/1tb =A0 =A0 client-ipaddress(rw,fsid=3D0,subtree_check,no_root_s=

quash,crossmnt,async)

Quoted 1 line

/mnt/320gb client-ipaddress(rw,fsid=3D0,subtree_check,no_root_squash,=

crossmnt,async)

I think the problem is that you have specified that both are fsid=3D0. There should only be one export with fsid=3D0