[Centos6, 4] mount mounting, umonut unmounting, and automatic mounting

Source: Internet
Author: User
Part 1: Mount operation: 1 mount: 1 after a file system is created for a disk or partition, it must be mounted to a directory for use. 2 Windows or mac systems will be automatically mounted, after a file system is created, it is automatically mounted to the system. disks C and D are called windows.

Part 1: Mount operation:

I. Mount:

1. after a file system is created for a disk or partition, it must be mounted to a directory for use. windows or mac systems will be automatically mounted. Once a file system is created, it will be automatically mounted to the System. windows is called disk C and disk D. 3. manual mounting or system configuration for automatic mounting is required for linux. /Mnt directory used to mount the disk directory.

II. mount the command to mount the disk:

1. in linux, We mount the formatted disk or partition to a directory using the mount command: mount/dev/sda3/mnt/(partition to be mounted) (mount point) common parameters: the mount command without parameters will display all mounted file systems-t specifies the type of the file system-o specifies the mount option: ro, rw is mounted in read-only or read/write form, the default value is rw sync, indicating that the cache is not applicable, but that all operations are directly written to the disk async, indicating that the cache is applicable, by default, async noatime indicates that the file access time is not updated every time the file is accessed. atime indicates that the file access time is updated every time the file is accessed. this will affect the performance. we recommend that you disable it. default value: atime, remount the file system

2. for example, the mount command does not include the parameter [root @ master/] # mount/dev/sda2 on/type ext3 (rw) # The partition mounted to the root is called the root partition, the first operation when the system starts is to mount the root partition proc on/proc type proc (rw) sysfs on/sys type sysfs (rw) devpts on/dev/pts type devpts (rw, gid = 5, mode = 620)/dev/sda1 on/boot type ext3 (rw) tmpfs on/dev/shm type tmpfs (rw) none on/proc/sys/fs/binfmt_misc type binfmt_misc (rw) none on/proc/fs/vmblock/mountPoint type vmblock (rw) sunrpc on/var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

3. for example, remount a partition as read-only: the-o parameter is separated by commas (,) with multiple options. [Root @ master/] # mount-o remount, ro/dev/sdb1/mnt/

4. remount a partition without caching: [root @ master/] # mount-o remount, sync/dev/sdb1/mnt/

III. umount uninstall the file system

1. run the umonut command to uninstall the mounted file system. It is equivalent to a windows pop-up. Command: umount file system or mount point umonut/dev/sda3 = umount/mnt if device is busy, it indicates that the file system is in use and cannot be uninstalled, run the following command to view the processes using the file system: fuser-m/dev/sda3 or run the command lsof to view the files in use: lsof/mnt

4. Automatic mounting:

1. the configuration file/etc/fstab is used to define the file system to be automatically mounted. Each row in fstab represents a mount configuration. the format is as follows:

The devices to be mounted can also be identified by using the LABEL (volume LABEL). Replacing/dev/sda3 mount-a with LABEL = LINUXCAST will mount all automatic mount items defined in fstab.

For example, the options for automatic mounting/dev/sdb1 to mnt are: noatime, rw/dev/sdb1/mnt ext4 noatime, rw 0 0

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.