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
- 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
- [Root @ localhost ~] # Cat/etc/fstab
- #
- #/Etc/fstab
- # Created by anaconda on Thu Nov 15 04:13:16 2012
- #
- # Accessible filesystems, by reference, are maintained under '/dev/disk'
- # See man pages fstab (5), findfs (8), mount (8) and/or blkid (8) for more info
- #
- /Dev/mapper/vg_livecd-lv_root/ext4 ULTS 1 1
- UUID = 9e293568-2685-421a-ae3f-f4a058e3f9e1/boot ext4 defaults 1 2
- /Dev/mapper/vg_livecd-lv_home/home ext4 defaults 1 2
- /Dev/mapper/vg_livecd-lv_swap swap defaults 0 0
- Tmpfs/dev/shm tmpfs defaults 0 0
- Devpts/dev/pts devpts gid = 5, mode = 620 0 0
- Sysfs/sys sysfs defaults 0 0
- Proc/proc defaults 0 0
- /Dev/sdb1/var/ftp ext4 defaults 0 0
- /Home/. isos/var/ftp/pub/software/isos none rw, bind 0 0
- [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