Create new mount point(/backup) from existing partition
5,958
Another solution is to make a Bind mount, which will "link" the two directories together.
Extract from mount
man page :
Since Linux 2.4.0 it is possible to remount part of the file hierarchy
somewhere else. The call is
mount --bind olddir newdir
After this call the same contents is accessible in two places.
So do something like :
mount --bind /home/backup/ /backup/
All you have to do next is to make this permanent by adding the corresponding line to /etc/fstab
Related videos on Youtube
![Ram](https://i.stack.imgur.com/wlA7d.png?s=256&g=1)
Comments
-
Ram almost 2 years
i have 2 partition on cenos 6.4 in SOFT RAID 1.
my current mounted partitions(df -h):
Filesystem Size Used Avail Use% Mountedon /dev/md1 20G 5.4G 14G 29% / /dev/md2 897G 680M 851G 1% /home
How to mount
/backup
in/dev/md2
? orHow to create new mount point for
/backup
?-
terdon over 10 yearsWhat's
backup
? Is it another partition? Partitions are mounted at directories, not the other way around. Please edit your question to clarify what you are trying to do. Are you trying to create a new partition in/dev/md2
and mount that asbackup
? -
mveroone over 10 yearsWhat you could also do is backup /home's content, remove/shrink the partition and create new ones as needed.
-
-
Ram over 10 yearsi'll take syn backup
/home
to/backup
. any problem? -
mveroone over 10 yearsThen you'll have
/home
subdirectories in/backup
also =)