Using/etc/fstab to Mount folders

Source: Internet
Author: User

The company's Tomcat server has been placed under the root path of the partition, the recent want to re-add a piece of data backup disk, the need to move the server files to the backup disk, but its own project set an absolute path so need to be able to access the original path, so plan to move the data to the backup disk, the original path to mount the new server

Use Mount--bind olddir newdir or Mount-b olddir newdir on the command line, the command should be on when the boot starts, but because the Web container is a boot Service, and Rc.local's start-up is in/ETC/RC? D is after the 0-6 level script, so this may cause the service to start when the required path is not mounted, if the path is mounted in/etc/fstab this system script should not have this problem, the Mount partition script should be loaded before the service.

Baidu found a lot of fstab file introduction, generally only mount disk partition and disc mirroring method, did not find the way to mount the folder. The third column in the Fstab file requires a file format for the write-loading path. Look at the man fstab, let's go to see Man 8 mount, Introduction supports a lot of file formats:

ADFS, Affs, autofs,cifs, coda, coherent, Cramfs, Debugfs, devpts, EFS, ext, ext2, ext3, EXT4,HFS, Hfsplus, HPFS, iso966 0, JFS, Minix, Msdos, Ncpfs, NFS, NFS4, NTFS, proc, qnx4, Ramfs, ReiserFS, Romfs, SQUASHFS, Smbfs, SysV, Tmpfs, Ubifs, UDF , Ufs,umsdos, Usbfs, VFAT, Xenix, XFS, Xiafs

But there is no introduction to these file formats, a good headache, Baidu can not find.

Then saw the man mount finally found the method: Mount--bind olddir newdir equivalent to the fstab file /olddir/newdir None bind , the original Mount folder is actually not required to write the file grid Because it is dependent on the source folder. 650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/58/B3/wKioL1S4usrzacaoAAGQ5pgwDg0920.jpg "Title=" Man.png "alt=" Wkiol1s4usrzacaoaagq5pgwdg0920.jpg "/>

Later this problem in the group discussed under, in fact, in the original path to establish a new path to the soft link should also be able to solve the problem, because in Baidu can not find Fstab automatically mount folder method, so just write some content. Man help is very important, unfortunately, his English is too poor, even the Mongolian guess, blindfolded.



Using/etc/fstab to Mount folders

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.