How to use a space in /etc/fstab
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.