加入這一行:
/new/dir /old/dir none defaults,bind 0 0
大功告成!
因為原本 Ubuntu 上的sda是一顆256GB的SSD, 而後來空間不足了,又另外掛載了一個RAID上去:
這時候,我們要把原本的備份路徑移動到新的磁區上的某個資料夾,又因為這個資料夾是給 ftp 上傳使用的(有設 chroot),而 vsftpd 是不會理會 symbolic link 的。
於是就使用 mount –bind 來實行。
mount –bind /old_dir /new_dir
如果要移除 /new_dir
的話要用 umount /new_dir
之後再將這個 mount 加入 /etc/fstab
:
sudo vim /etc/fstab
加入這一行:
/new/dir /old/dir none defaults,bind 0 0
大功告成!