Siege Lion on the Way (iii) Linux (22)---Linux disk mount and unload Mount Umount

Source: Internet
Author: User

Mounting is the operation of combining a file system with a directory. A mount point is a directory, which is the entry into a partition or file system.

I. Precautions before MOUNTING:

1, a single file system should not be repeatedly mounted on different mount points.

2. A single directory should not repeatedly mount multiple file systems.

3, the directory is about to be a mount point in theory should be empty directory.

Note: for 2 and 3, if the directory you want to mount is not empty, the original directory will be temporarily gone (not overwritten) after the new file system is mounted, and the system will display the latest mounted file system. After the new partition is uninstalled, the original file system will be displayed again.

Ii. introduction of the order

Mount [-t file system] [-l label name] [-o extra option] [-n] Device name mount point

Mount-l; <== Extra Display label name

Mount-a; <== Install the configuration file/etc/fstab mount all the disks that are not mounted, the boot mount described later is configured here.

Third, mount the Ext2/ext3 file system:

Mkdir/mnt/sda6; <== first create mount point

Mount/dev/sda6/mnt/sda6;

Linux does not typically specify the T type by analyzing the Super block to test mounts.

See:

The/ect/filesystems ==> system specifies the type of test mount file system.

/proc/filesystems ==> The type of file system that the Linux system has loaded.

The driver for the file system is under/lib/module/$ (uname-r)/kernal/fs/.

Iv. mount a CD or DVD disc:

Mkdir/media/cdrom;

Mount-t Iso9660/dev/cdrom/media/cdrom;

Note: After you mount the optical drive, you cannot exit the disc unless you uninstall it.

V. Mount the USB stick:

The steps are consistent with the above.

If you have an NTFS file system, you may need to download additional drivers and install them.

Vi. mount the root directory and mount the directory with no specific directories:

Mount-o remount, rw, auto/; <== re-mounts the root directory, and when it enters single-user maintenance mode, the root directory is mounted as read-only and is re-mounted with this command.

Mount--bind/home/mnt/home; <== to mount a directory to another directory.

Vii. Unloading: Umount

Umount [-FN] device name or mount point

-F: Forced uninstallation

-N: Uninstall without updating/etc/mtab.

Example: Umount/dev/sda6;

Eight, can also be mounted through the label name, temporarily do not understand.

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.