Skip to content

L3 Workshop: mount: bad usage

0

sh-5.2$ sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-09792a6090d86cd00.efs.eu-central-1.amazonaws.com:/ efscd efs mount: bad usage Try 'mount --help' for more information.

asked a year ago166 views

2 Answers
0

The error "mount: bad usage" indicates there's a syntax issue with your mount command. Looking at your command, there are a few problems:

  1. You have too many arguments after the mount target. You've specified "efscd efs" when you should only have one mount point.

  2. The correct syntax for mounting an NFS file system is:

sudo mount -t nfs4 [options] [file-system-DNS-name]:/ [mount-point]

Try this corrected command:

sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-09792a6090d86cd00.efs.eu-central-1.amazonaws.com:/ /path/to/mount/point

Replace "/path/to/mount/point" with your actual mount directory (either "efscd" or "efs" depending on which one you intended to use).

Also, ensure that:

  1. The mount point directory exists before attempting to mount
  2. You have the NFS client utilities installed (nfs-utils or nfs-common on Ubuntu)
  3. Your security groups are properly configured to allow NFS traffic (port 2049) between your EC2 instance and the EFS file system
    Sources
    "mount.nfs: Connection timed out" Facing The above Error when trying to Mount an Amazon FSx for NetApp ONTAP on my EC2 linux instance via PuTTY SSH connection from my Local Computer. | AWS re:Post
    Mounting considerations for Linux - Amazon Elastic File System
    Mount settings used by EFS mount helper - Amazon Elastic File System
    Troubleshooting mount issues - Amazon Elastic File System

answered a year ago

0

The error "mount: bad usage" indicates there's a syntax issue with the mount command. Looking at the command, there are a few problems:

The command have too many arguments after the mount target, it is specified as "efscd efs" when it should only have one mount point.

The correct syntax for mounting an NFS file system is:

sudo mount -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport [file-system-DNS-name]:/[volume-path] [mount-point]

So, in this case, the right command would be :

sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-09792a6090d86cd00.efs.eu-central-1.amazonaws.com:/ /path/to/mount/point

Replace "/path/to/mount/point" with the actual mount directory (either "efscd" or "efs" depending on which one you intended to use).

▸ Also, ensure that:

- The mount point directory exists before attempting to mount.
- You have the NFS client utilities installed (nfs-utils or nfs-common on Ubuntu).
- Your security groups are properly configured to allow NFS traffic (port 2049) between your EC2 instance and the EFS file system.

[+] Mounting on Amazon EC2 with a DNS name - https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-mount-cmd-dns-name.html

[+] Installing the NFS client - https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-install-nfsclient.html

[+] Troubleshooting mount issues - https://docs.aws.amazon.com/efs/latest/ug/troubleshooting-efs-mounting.html

If you continue experiencing issues, feel free to open a case with AWS Premium Support.

AWS

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.