Mount point does not exist, even though folder exists. Able to mount manually

35.9k Views Asked by At

I am running CentOS Guest on a Windows Host in VirtualBox. I have created an additional hard-drive /dev/sdb and it has 1 partition /dev/sdb1 with my mysql data.

I want to mount it to /mysql at runtime and create a symlink from /var/lib/mysql to /mysql

But when I try to mount I get this error:

[root@localhost mysql]# mount -a

mount: mount point /myqsl does not exist

But of course the file does exist!

[root@localhost mysql]# cd /mysql/

[root@localhost mysql]# cd ..

[root@localhost /]# ls -l | grep mysql

drwxr-xr-x 2 root root 4096 Nov 19 04:55 mysql

Oh and did I mention I am able to mount like this:

[root@localhost /]# mount /dev/sdb1 /mysql/

[root@localhost /]# cd /mysql

This is the line in my /etc/fstab file:

/dev/sdb1 /myqsl ext3 bind 0 0

I am basically very confused. Someone please clarify!

3

There are 3 best solutions below

0
On BEST ANSWER

The bind option with mount is used to mount an already mounted directory to a new directory as well and after which the contents of the device can be accessed in both the directories. Here you are trying to mount a block device which is not mounted already. While using the bind option, you can only specify two directories, one of which contains an already mounted file system. Not a device node. You can change the fstab entry to

/dev/sdb1 /myqsl ext3 defaults 0 0

Other options like nodev can also be added to defaults if needed. Separated by comma.

0
On

Not the issue that the OP faced, but since this is one of the top search results for "mount point does not exist" that I was trying to find a solution for.

In my case I was missing a trailing / on the path:

$ mkdir /mnt/Foo
$ mount -t cifs //example.com/Foo$ /mnt/Foo
mount: /mnt/Foo: mount point does not exist.
$ mount -t cifs //example.com/Foo$ /mnt/Foo/
# success!
0
On

You have a typo: myqsl should be mysql in this case.