Each file system under Linux has a separate inode,block,super block and other information, which is mounted to the directory tree to be used
, the operation that combines a file system with a directory tree is called a mount, or vice versa.
That is, the mount point must be a directory, and the directory is the entry into the disk partition (that is, the file system).
There are three points to note when mounting:
1. A single file system should not be mounted repeatedly to a different mount point (directory);
2. A single directory should not repeatedly mount multiple file systems
#这两点可以类比windows磁盘与盘符的关系, each corresponding.
3. The directory as a mount point should theoretically be an empty directory
#如果目录不是空的, the contents of the directory will disappear temporarily after the file system is mounted, until the original content is displayed after the mounted device is uninstalled.
Here are the specific actions
Operating environment: Ubuntu Kylin14.04.1 LTS
Kernel version: Linux 3.13.0-32-generic
The next operation requires root permission, if the new installation of Ubuntu needs to do the following to set the root password
1. Under the graphical Interface press CTRL+ALT+F1~F6 (F1~f6 any one can) into the command line mode, the desktop open terminal can also
2. Execute sudo passwd root
3. Enter the current user password
4. Follow the prompts to enter the root user password two times, set complete
Uninstall operation:
1. Perform the SU root switch to the root user
2. Execution Df-h Displays all current file systems, and the Ubuntu Kylin installed automatically helps us mount the SDA device
In addition to the SDA9 mount to/directory, the others are automatically mounted to the media/lkx/directory
#本机是linux +win7+windows XP three system, Ubuntu Kylin automatic mount feature is too powerful so put the other two
NTFS format system partitions are also mounted, in theory, a system should not mount partitions of other systems!
In the figure
/DEV/SDA1 16G 7.2G 7.9G 48%/media/lkx/b6fc23aafc2363b9 for Windows XP partition
/dev/sda7 45G 33G 12G 74%/media/lkx/win7 to Win7 partition
3. Let's unload the Sda1,sda7,sda6 all down.
Perform
Umount sda1
Umount SDA7
Umount Sda6
#Linux中奉行 "No news is good news", so there is no hint after uninstalling, when the parameter is wrong, will be error
View the devices that are still in the system after uninstalling
Execute df-h and you can see that these three devices have been uninstalled.
Mount Operation:
We just unloaded the/dev/sda6-->soft, and now we're going to mount it to the root directory under the test folder
Perform some initialization operations first
CD/
mkdir test
Direct mount
Mount/dev/sda6/test
View Results
Df-h
The discovery disk is already mounted.
Once the disk is mounted, we can access the data from the directory into the file system.
Perform
CD test
Ls-l
Understanding the concept of mount in a Linux file system can be likened to a new disk allocation letter under the Windows system,
The data can be accessed from the disk according to the drive letter, but there are a few differences, Windows is a disk before
directory, and Linux can mount the file system (disk) to a directory, which is the Ext2/3 file system's own characteristics
Decided, more detailed introduction can refer to "Bird's Linux Private cuisine"
Traceability Http://www.cnblogs.com/lkxsnow
This page is copyrighted by the author and the blog Park, reproduced please indicate the source
Mount and unload disks under Linux