How to use a space in /etc/fstab

Solution Verified - Updated -

Issue

o A filesystem mountpoint contains a space, for example /test directory

o It can be successfully mounted manually with a command like so:

mount /dev/mapper/testvg-testlv /"test directory"

o However adding an entry like so in /etc/fstab results in a parsing error.

Entry from /etc/fstab:
 /dev/mapper/testvg-testlv /"test directory" xfs defaults 0 0

 # mount /test\ directory
        mount: /etc/fstab: parse error at line 17 -- ignored
        mount: /test directory: can't find in /etc/fstab.

Environment

All RHEL versions

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content