In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Linux to see what is the specific method of mounting, in view of this problem, this article introduces the corresponding analysis and solutions in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
In the Linux system, as long as the disk is mounted before it can be used, then how to view the mounted disk.
The first method: use the df command, for example:
Orientalson:/home # df Filesystem 1K-blocks Used Available Use% Mounted on / dev/sda2 15213032 8043668 7169364 53% / udev 514496 104 5143921% / dev/ dev/mapper/vg_test-lv_test 511980 32840 4791407% / 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 very 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:
Orientalson:/home # mount-1 / 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 # third method: view 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.
Orientalson:/home # cat / etc/mtab / dev/sda2 / reiserfs rw,acl,user_xattr 0 proc / proc proc rw 0 sysfs / sys sysfs rw 00 debugfs / sys/kernel/debug debugfs rw 00 udev / dev tmpfs rw 0 devpts / dev/pts devpts rw,mode=0620,gid=5 0 securityfs / sys/kernel/security securityfs rw 00 / dev/mapper/vg_test-lv_test / home/mt reiserfs rw 00 orientalson:/home # it has been said 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.
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 proc / proc proc rw 0 sysfs / sys sysfs rw 0 debugfs / sys/kernel/debug debugfs rw 0 udev / dev tmpfs rw 0 devpts / dev/pts devpts rw,mode=0620 Gid=5 0 securityfs / sys/kernel/security securityfs rw 0 orientalson:/home # this is the answer to the question about how to view and mount Linux. I hope the above content can help you to a certain extent, if you still have a lot of doubts to be solved, you can follow the industry information channel to learn more related knowledge.
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.