CentOS 6.3 automatically mounts disks and folders upon startup

Source: Internet
Author: User

CentOS 6.3 automatically mounts disks and folders upon startup

CentOS 6.3 automatically mounts disks and folders upon startup

The CentOS server may have multiple disks but suddenly loses power. The previously manually attached disk is no longer in use. Therefore, the system needs to automatically mount the required disks and folders at startup.

Edit/ect/fstab to view all current mount points and append the information to be mounted. The information represented by each column is as follows:

[Plain] view plaincopy
  1. Devicenamemountpointfs-typeoptionsdump-freqpass-num

-Device name: device name, for example,/dev/sda1.

-Mount point: a mount point, which is a folder on the system.

-Fs-type: the type of the device to be mounted, for example, ext4. Man fstab can be used to check the supported types.

-Options: The parameter used for mounting, usually ults.

-Dump-freq and pass-num are generally set to 0, and the device to be mounted is not checked at startup.

In the following example, Mount/dev/sdb1 to/var/ftp and/home/. isos to/var/ftp/pub/software/isos respectively.

[Plain] view plaincopy
  1. [Root @ localhost ~] # Cat/etc/fstab
  2. #
  3. #/Etc/fstab
  4. # CreatedbyanacondaonThuNov1504: 13: 162012
  5. #
  6. # Accessiblefilesystems, byreference, aremaintainedunder '/dev/disk'
  7. # Seemanpagesfstab (5), findfs (8), mount (8) and/orblkid (8) formoreinfo
  8. #
  9. /Dev/mapper/vg_livecd-lv_root/ext4defaults11
  10. UUID = 9e293568-2685-421a-ae3f-f4a058e3f9e1/bootext4defaults12
  11. // Dev/mapper/vg_livecd-lv_home/homeext4defaults12
  12. /Dev/mapper/vg_livecd-lv_swapswapswapdefaults00
  13. Tmpfs/dev/shmtmpfsdefaults00
  14. Devpts/dev/ptsdevptsgid = 5, mode = 62000
  15. Sysfs/syssysfsdefaults00
  16. Proc/procprocdefaults00
  17. /Dev/sdb1/var/ftpext4defaults00
  18. /Home/. isos/var/ftp/pub/software/isosnonerw, bind00
  19. [Root @ localhost ~] #

References:

1. http://en.wikipedia.org/wiki/Fstab

2. http://stackoverflow.com/questions/145209/mounting-ntfs-filesystem-on-centos-5-2

3. http://www.linuxforums.org/forum/servers/28252-fstab-mount.html

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.