the file system mount, uninstall (Mount, Umount) will be introduced this time
How to mount the use of a file system, mount a common parameter, Mount automatic mounting (/etc/fstab) 1 mount Operation (Mount)
After a disk or partition has created a file system--need to mount--mount to a directory (typically mount under/mnt/) to be able to use
Windows or Mac systems are mounted automatically (automatically mount to the system once the file system is created), which is called C: Disk D: Disk.
Linux needs to mount manually--or configure the system to mount it automatically
/ dev/sdb1------> /mnt
Mount
Command Mount the device source (/DEV/SDB1) mount Destination point (/mnt) to be mounted
For example: Mount/dev/sdb1/mnt, as shown below
Mount Mount Common parameters (Option)
- T specifies the file system type , for example:-T ext3,-t Ext4,-t VFAT
- o specifies mount options , for example:
The-o RO,RW is mounted as read-only and is mounted in read- write form; The default is RW
The-o async represents all operations using caching (memory): Improving the efficiency of file system read and write data; default is async use cache (memory);
-O Sync writes directly to the disk for all operations: On behalf of all operations, instead of using caching , write directly to disk; applied to scenarios where data security is high
The-o atime represents the time that the file was accessed when the file was accessed, and the default is Atimeatime=access times
-O noatime does not update the time the file is accessed each time the file is accessed
-O remount to mount the file system again
#使用不带参数的mount命令来显示所有已经挂载上了的文件系统
#也可将挂载配置写入/etc/fstab, automatic mounting is also implemented
2 Uninstall operation (Umount)
For uninstalling a mounted file system (partition), the equivalent of a Windows system pop-up
Command umount a mounted device source (/DEV/SDB1) or mounted destination (/mnt)
Command umount file System/mount point
Umount /dev/sdb1 = = umount /mnt
For example: UMOUNT/DEV/SDB1 or umount/mnt/
If a device is busy error occurs, the file system is being used;
You can use the following command (fuser) to see which processes are using this filesystem: causing device is busy
fuser –m/mnt
You can also use the following command (lsof) to see which files or folders are open or in use in this filesystem:
lsof /mnt