Usually we use the command to view the disk mounted in the Linux system, in fact, in addition to this method, there are many ways to view the Linux mounted disk, the following small series will introduce you How to view the mounted disk in Linux.
The first method: using the df command, for example:
code is as follows:
orientalson: /home # df
Filesystem 1K- Blocks Used Available Use% Mounted on
/dev/sda2 15213032 8043668 7169364 53% /
udev 514496 104 514392 1% /dev
/dev/mapper/vg_test- Lv_test
511980 32840 479140 7% /home/mt
orientalson:/home #
The mount point /home/mt shown above and the volume she mounts are not On the same line, using shell script analysis is very cumbersome.
The second method: use the mount command, mount -l, the drawback of this method is that there is no size of the volume, but the mount point and the mounted volume are on the same line. For example:
The code is as follows:
orientalson:/home # mount -l
/dev/sda2 on /type reiserfs (rw,acl,user_xattr) []
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
securityfs on /sys/kernel/Security type securityfs (rw)
/dev/mapper/vg_test-lv_test on /home/mt type reiserfs (rw) []
orientalson:/home #
Three methods: look at the file /etc/mtab. The principle is that every time a new volume is mounted, the file will be updated basically, so you can use this file to view the mount point and the volume you are working on. This method is slightly clearer than mount -l, but sometimes it is not reliable.
The code is as follows:
orientalson:/home # cat /etc/mtab
/dev/sda2 /reiserfs rw,acl,user_xattr 0 0
Proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
debugfs /sys/kernel/debug debugfs rw 0 0
udev /dev tmpfs rw 0 0
devpts /dev/pts devpts rw,mode=0620,gid=5 0 0
securityfs /sys/kernel/security securityfs rw 0 0
/dev/mapper /vg_test-lv_test /home/mt reiserfs rw 0 0
orientalson:/home #
The above has basically said that this file will be updated, but this problem is not always updated. If the -n option is used when mounting, the volume information will not be newly mounted in the /etc/mtab file.
The code is as follows:
orientalson:/home # umount /home/mt
orientalson:/home # mount -n /dev/vg_test/lv_test /home/mt< Br>
orientalson:/home # cat /etc/mtab
/dev/sda2 /reiserfs rw,acl,user_xattr 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
debugfs /sys/kernel/debug debugfs rw 0 0
udev /dev tmpfs rw 0 0
devpts /dev/Pts devpts rw,mode=0620,gid=5 0 0
securityfs /sys/kernel/security securityfs rw 0 0
orientalson:/home #
The above is the view Linux mount disk method, the use of df command to view the mounted disk is the most practical and convenient method, relatively speaking, the latter two methods have some limitations.
Under the CentOS system, if only single-user mode is used, there will be hidden dan
LVS cluster uses three ip load balancing technologies, namely VS/NAT, VS/TUN and VS
Jenkins is a continuous integration tool based on Java development. In Ubuntu syste
Under Ubuntu system, you can set the shortcut key of the startup program, so you do
The principle of implementing breakpoint resume in Linux
How to change the Linux default startup level
What if CentOS uses MPlayer without sound?
What can I do if RedHat Linux 5 cannot use ifconfig?
How to identify Linux soft links and hard links
What should I do if the U disk file is read-only on Ubuntu and cannot be deleted?
Handling of the Segmentation fault error in Linux programming
Ubuntu installs Pacman package manager step
How to install and use SoundCloud on Linux
After the Linux boot, the terminal prompts -bash-2.05b$ What should I do?
Laptop to establish wireless WiFi hotspots
Win7 system can not start the game prompts missing vcomp100.dll file how to do
The small speaker in the lower right corner of the Win7 system computer is missing. How to fix it?
WinXP computer anti-virus software can not open the solution
How to turn off the firewall in the WIN8 system Detailed Tutorial
You are not familiar with Windows7's own firewall details
Quick starter tool software can't compare Win+R
Privacy Security Pre-installed Win7 easily adds locks to partitions