6

I have CentOS 6.7. This question is about creating a new mount point on an existing partition. Following is my current disk configuration.

Filesystem                    Size   Used     Avail Use%   Mounted on

/dev/mapper/vg_i200-lv_root    50G   41G      6.1G  87%     /   

tmpfs                          3.8G     0     3.8G   0%     /dev/shm
/dev/sda1                      477M   67M     385M  15%     /boot
/dev/mapper/vg_i200-lv_home    172G   21G     143G  13%     /home

I want to create a new mount point mymount that point to the folder /home/myfolder. I followed the instructions given in this thread in superuser. But when I execute this command:

mount --bind /home/myfolder/ /mymount/

I get the following error:

mount: mount point /mymount/ does not exist

So, I want to know how can I create a new mount point that points to a folder in an existing filesystem.

1
  • mkdir /mymount?
    – pfnuesel
    Commented Mar 8, 2016 at 14:54

2 Answers 2

7

mkdir /mymount with root user before mount --bind /home/myfolder/ /mymount/

2
  • That worked. Can you also tell me how do I view the existing mount points?
    – KurioZ7
    Commented Mar 8, 2016 at 15:20
  • mount but i think df if more user-friendly
    – seb
    Commented Mar 8, 2016 at 15:23
3

A mount point is "just" a directory. So all you need to do is to create a directory with "mkdir /mymount", or use an existing one (but be aware that if you do mount over an existing directory, anything "below" that directory will be hidden -- although that may well be the effect you're trying to achieve).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .