0

So we have a single host instance on EC2 with two EBS volumes attached. When we mount the shares on the clients both shares are pointing to the same host directory even though they are defined and attached as separate volumes.

We are using NFSv4 and the settings as such:

Host settings:

/etc/fstab

/dev/xvdf    /mona/images            auto    defaults,nobootwait,comment=cloudconfig 0       2
/dev/xvdg    /mona/image-archive     auto    defaults,nobootwait,comment=cloudconfig 0       2

/etc/exports

/mona                 *(rw,sync,fsid=0,crossmnt,no_subtree_check)
/mona/images          *(rw,no_root_squash,sync,no_subtree_check)
/mona/image-archive   *(rw,no_root_squash,sync,no_subtree_check)

Client settings:

/etc/fstab

{host-ip}:/images         /mona/images        nfs4  defaults,_netdev  0       0
{host-ip}:/image-archive  /mona/image-archive nfs4  defaults,_netdev  0       0

The when that is all done we run # df -h on the host and client we get this:

Host

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      8.0G  3.8G  3.9G  50% /
udev            826M  8.0K  826M   1% /dev
tmpfs           339M  196K  339M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            847M     0  847M   0% /run/shm
/dev/xvdb       335G  195M  318G   1% /mnt
/dev/xvdf       197G  187G  1.3M 100% /mona/images
/dev/xvdg       296G  187G   94G  67% /mona/image-archive

Client

Filesystem                   Size  Used Avail Use% Mounted on
/dev/xvda1                   8.0G  5.7G  1.9G  76% /
udev                         275M  8.0K  275M   1% /dev
tmpfs                        119M  180K  118M   1% /run
none                         5.0M     0  5.0M   0% /run/lock
none                         296M     0  296M   0% /run/shm
{host-ip}:/images            197G  187G  1.3M 100% /mona/images
{host-ip}:/image-archive     197G  187G  1.3M 100% /mona/image-archive

Both mounts on the client point to the same first shared export on the host.

Help?

4
  • nfsv4 builds a pseudofs. as your case you actually mount /mona. remove it from export file and re-mount.
    – kofemann
    Oct 30, 2013 at 21:11
  • I have tried removing that first exports line and then we have to change the fstab to refer to the root directory (/mona) since without fsid=0 NSF does not build the psuedo filesystem. None of that impacted it. Still pointing to the same host directory.
    – Grant
    Oct 30, 2013 at 23:03
  • Noting the identical in-use sizes and similar naming... did one of these EBS volumes originate as a snapshot of the other, or perhaps both as snapshots of the same original volume at some point in the past? Oct 31, 2013 at 0:36
  • Yes, the larger EBS (/mona/image-archive) was a snapshot of the smaller one (/mona/images). The whole process started with needing to expand the size of the EBS volume from 200G to 300G. I ran # e2fsck -f and # resize2fs to resize the EBS properly as that is a known issue that a snapshot of an EBS even when created on a larger volume thinks it is the size of the original.
    – Grant
    Oct 31, 2013 at 1:48

0

You must log in to answer this question.

Browse other questions tagged .