CentOS6.3 automatically mount disks and folders when started

Source: Internet
Author: User
Tags centos server
When CentOS6.3 is started, the disk and folder CentOS server may have multiple disks, but suddenly the power is down. The original manually mounted 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 pending

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. Device name mount point fs-type options dump-freq pass-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 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. # Created by anaconda on Thu Nov 15 04:13:16 2012
  5. #
  6. # Accessible filesystems, by reference, are maintained under '/dev/disk'
  7. # See man pages fstab (5), findfs (8), mount (8) and/or blkid (8) for more info
  8. #
  9. /Dev/mapper/vg_livecd-lv_root/ext4 ULTS 1 1
  10. UUID = 9e293568-2685-421a-ae3f-f4a058e3f9e1/boot ext4 defaults 1 2
  11. /Dev/mapper/vg_livecd-lv_home/home ext4 defaults 1 2
  12. /Dev/mapper/vg_livecd-lv_swap swap defaults 0 0
  13. Tmpfs/dev/shm tmpfs defaults 0 0
  14. Devpts/dev/pts devpts gid = 5, mode = 620 0 0
  15. Sysfs/sys sysfs defaults 0 0
  16. Proc/proc defaults 0 0
  17. /Dev/sdb1/var/ftp ext4 defaults 0 0
  18. /Home/. isos/var/ftp/pub/software/isos none rw, bind 0 0
  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

Related Article

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.