In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to view Linux mount disk". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to view Linux mount disks".
Usually, we use commands to view the mounted disks in the Linux system. In fact, in addition to this method, there are many ways to view the Linux mounted disks. The following editor will introduce how to view the mounted disks in Linux.
The first method: use the df command, for example:
The 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 / dev
/ dev/mapper/vg_test-lv_test
511980 32840 479140 7% / home/mt
Orientalson:/home #
The mount point / home/mt shown above is not on the same line as the volume she mounted, so it is troublesome to use shell script analysis.
The second method: use the mount command, mount-l, which has the disadvantage of not having the size of the volume, but the mount point is on the same line as the mounted volume. 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 #
The third way: look at the file / etc/mtab. The principle is that each newly mounted volume will basically update the file, so you can naturally view the mount point and mount volume through this file. This approach is a little clearer than mount-l, but it is sometimes unreliable.
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 #
It has been said above that this file will basically be updated, but this issue is not always updated. If the-n option is used when mounting, then the new volume information will not be 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
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 #
At this point, I believe you "how to view Linux mount disk" have a deeper understanding, might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.