제한된 사용자로 알파인 컨테이너를 만들었습니다.
실행하면 mount
다음과 같은 설치 목록이 표시됩니다.
/home $ mount
overlay on / type overlay (rw,relatime,lowerdir=/var/lib/docker/overlay2/l/KCJQAGEW3UGOWIQ7UW5GDGWTOX:/var/lib/docker/overlay2/l/3JHGYTRTJDTUB7XAC2O3KY5H5V:/var/lib/docker/overlay2/l/CKRPXHOCDWFPZKZXBYX7MPUCA5:/var/lib/docker/overlay2/l/CFGI4PXVRIJRHPKXWK43PE4DZV:/var/lib/docker/overlay2/l/ZZFYGGBCUSMZ7IYP7WI6MWZFQN:/var/lib/docker/overlay2/l/33RI7BKMPTVKCWIELOGMUJ4J4N:/var/lib/docker/overlay2/l/5UVFPCW3G5AI4AV5FJPS26LBOA:/var/lib/docker/overlay2/l/AJ43E4MYURSH2SELF7GBM5V2N5:/var/lib/docker/overlay2/l/FX3YMXLJ5YQAWHGVLIEREQP6JM:/var/lib/docker/overlay2/l/I5OK5J522A4AMEDRJT4IS7C5FT:/var/lib/docker/overlay2/l/6C2J4DBBK4GUNQDQ4GO2WL7VTL:/var/lib/docker/overlay2/l/XTPDACLCJEZPLVH4I52PDC4XAL:/var/lib/docker/overlay2/l/DEHT4RSODLVYYQ65X7FNDTWUC7:/var/lib/docker/overlay2/l/J2ITJDS3MK3ZMTJKHLKAPTFZRY,upperdir=/var/lib/docker/overlay2/b8d14eb619c6fff58c9940cd78f4696975b157dffd5f6f6a6de00bca6d776c62/diff,workdir=/var/lib/docker/overlay2/b8d14eb619c6fff58c9940cd78f4696975b157dffd5f6f6a6de00bca6d776c62/work)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,size=65536k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666)
sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,relatime,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (ro,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (ro,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/freezer type cgroup (ro,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/memory type cgroup (ro,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (ro,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/pids type cgroup (ro,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/blkio type cgroup (ro,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (ro,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (ro,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/devices type cgroup (ro,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpuset type cgroup (ro,nosuid,nodev,noexec,relatime,cpuset)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
/dev/xvda1 on /etc/resolv.conf type ext4 (rw,relatime,discard,data=ordered)
/dev/xvda1 on /etc/hostname type ext4 (rw,relatime,discard,data=ordered)
/dev/xvda1 on /etc/hosts type ext4 (rw,relatime,discard,data=ordered)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
내가 달릴 때 많은 것을 보여 cat /etc/mtab
주거나/proc/mounts
더 큰그런 다음 다음을 나열하십시오.
/home $ cat /etc/mtab
overlay / overlay rw,relatime,lowerdir=/var/lib/docker/overlay2/l/KCJQAGEW3UGOWIQ7UW5GDGWTOX:/var/lib/docker/overlay2/l/3JHGYTRTJDTUB7XAC2O3KY5H5V:/var/lib/docker/overlay2/l/CKRPXHOCDWFPZKZXBYX7MPUCA5:/var/lib/docker/overlay2/l/CFGI4PXVRIJRHPKXWK43PE4DZV:/var/lib/docker/overlay2/l/ZZFYGGBCUSMZ7IYP7WI6MWZFQN:/var/lib/docker/overlay2/l/33RI7BKMPTVKCWIELOGMUJ4J4N:/var/lib/docker/overlay2/l/5UVFPCW3G5AI4AV5FJPS26LBOA:/var/lib/docker/overlay2/l/AJ43E4MYURSH2SELF7GBM5V2N5:/var/lib/docker/overlay2/l/FX3YMXLJ5YQAWHGVLIEREQP6JM:/var/lib/docker/overlay2/l/I5OK5J522A4AMEDRJT4IS7C5FT:/var/lib/docker/overlay2/l/6C2J4DBBK4GUNQDQ4GO2WL7VTL:/var/lib/docker/overlay2/l/XTPDACLCJEZPLVH4I52PDC4XAL:/var/lib/docker/overlay2/l/DEHT4RSODLVYYQ65X7FNDTWUC7:/var/lib/docker/overlay2/l/J2ITJDS3MK3ZMTJKHLKAPTFZRY,upperdir=/var/lib/docker/overlay2/b8d14eb619c6fff58c9940cd78f4696975b157dffd5f6f6a6de00bca6d776c62/diff,workdir=/var/lib/docker/overlay2/b8d14eb619c6fff58c9940cd78f4696975b157dffd5f6f6a6de00bca6d776c62/work 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,size=65536k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666 0 0
sysfs /sys sysfs ro,nosuid,nodev,noexec,relatime 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,relatime,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup ro,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup ro,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/freezer cgroup ro,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/memory cgroup ro,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup ro,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/pids cgroup ro,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/blkio cgroup ro,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/perf_event cgroup ro,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup ro,nosuid,nodev,noexec,relatime,hugetlb 0 0
cgroup /sys/fs/cgroup/devices cgroup ro,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/cpuset cgroup ro,nosuid,nodev,noexec,relatime,cpuset 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
/dev/xvda1 /etc/resolv.conf ext4 rw,relatime,discard,data=ordered 0 0
/dev/xvda1 /etc/hostname ext4 rw,relatime,discard,data=ordered 0 0
/dev/xvda1 /etc/hosts ext4 rw,relatime,discard,data=ordered 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=65536k 0 0
overlay /run/docker.sock overlay rw,relatime,lowerdir=/var/lib/docker/overlay2/l/S3PCHQ53SAJYG5NZDNDQRU2XVE:/var/lib/docker/overlay2/l/62KIXQKVJBTRJ7SDUUYXZTSKCG:/var/lib/docker/overlay2/l/3725JLZLCOWYHRBEQP2J2QTNLA:/var/lib/docker/overlay2/l/VAGTKGBRCRYURRHYPLOMX6OOYS:/var/lib/docker/overlay2/l/KR6OCZTSJSXVHCKE5OVUQZRXKL:/var/lib/docker/overlay2/l/7BYHCEWKEAEE6EE5RZZ4SLDNQP:/var/lib/docker/overlay2/l/QSHWL6OBX4IRECFZEUTNTL4NC5:/var/lib/docker/overlay2/l/IEZLIF47GKVK3LXEDKTMQ3TZVG:/var/lib/docker/overlay2/l/BQ46TLLYUESHFVNKIBWHBWRSDP:/var/lib/docker/overlay2/l/IJYHXGW2NISOJTGYBST4HO2FW5:/var/lib/docker/overlay2/l/S7YI2SX46AKDOR4Y6V5N374AG4:/var/lib/docker/overlay2/l/TKTKBRROVY2AZ3SA446NJ4DC3Y:/var/lib/docker/overlay2/l/LMUO357ONLFEBEMMBMIVSYCQFO:/var/lib/docker/overlay2/l/P6VC5SYL5PJ55NABY7EKZGWUYY:/var/lib/docker/overlay2/l/I7ECJ5P5HFIPF2EUGIDQHRYELU:/var/lib/docker/overlay2/l/AUMVWZNGS3S4XNKDP4MUOD4ISJ:/var/lib/docker/overlay2/l/FDDSOXSMTMH4XZV6Q3ADNAA2VW:/var/lib/docker/overlay2/l/VAPXZHHJKAFCCIBF3RZNECEC7S:/var/lib/docker/overlay2/l/PK3TV6ZJUQYZUWA4TYZ4LQXQOT:/var/lib/docker/overlay2/l/YODPLRFWRSGNFVZ6SCQ3FVYRNS:/var/lib/docker/overlay2/l/6VCZPIJSKSLUW7ZR2OMS4OSYXW:/var/lib/docker/overlay2/l/ELLZBUAIOMXSHNCQZCGGKZYODO:/var/lib/docker/overlay2/l/HBC6DIHTS4YUQWK54KBSC6H5LM:/var/lib/docker/overlay2/l/3KKP5YZSANTIPPGCUEECHNZ52T:/var/lib/docker/overlay2/l/67BTI5QHRSVQMPSTYUHT4DMMK5:/var/lib/docker/overlay2/l/XLK6527B67ITIEEJLWCKV3YBPG,upperdir=/var/lib/docker/overlay2/d486d915eb64f61ea0d87f1fdef0ad6d092a70ec30e043c5843486131dfacf26/diff,workdir=/var/lib/docker/overlay2/d486d915eb64f61ea0d87f1fdef0ad6d092a70ec30e043c5843486131dfacf26/work 0 0
devpts /dev/console devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666 0 0
proc /proc/bus proc ro,relatime 0 0
proc /proc/fs proc ro,relatime 0 0
proc /proc/irq proc ro,relatime 0 0
proc /proc/sys proc ro,relatime 0 0
proc /proc/sysrq-trigger proc ro,relatime 0 0
tmpfs /proc/acpi tmpfs ro,relatime 0 0
tmpfs /proc/kcore tmpfs rw,nosuid,size=65536k,mode=755 0 0
tmpfs /proc/keys tmpfs rw,nosuid,size=65536k,mode=755 0 0
tmpfs /proc/timer_list tmpfs rw,nosuid,size=65536k,mode=755 0 0
tmpfs /proc/timer_stats tmpfs rw,nosuid,size=65536k,mode=755 0 0
tmpfs /proc/sched_debug tmpfs rw,nosuid,size=65536k,mode=755 0 0
tmpfs /proc/scsi tmpfs ro,relatime 0 0
tmpfs /sys/firmware tmpfs ro,relatime 0 0
mount
설치된 파일의 전체 목록이 표시되지 않는 이유는 무엇 입니까?
답변1
질문이 정확하지 않습니다. 매뉴얼 페이지에 따르면 /proc/mounts를 반영하지 않는 마운트는 예상된 동작입니다.
/etc/mtab 및 /proc/mounts 파일은 일반 mtab 파일이 있는 시스템과 일치하지 않을 수 있습니다. 첫 번째 파일은 mount 명령 옵션에만 기반하지만 두 번째 파일의 내용도 커널 및 기타 설정(예: 원격 NFS 서버)에 따라 달라집니다. 어떤 경우에는 mount 명령이 NFS 마운트에 관한 내용을 보고할 수 있습니다(신뢰할 수 없음). 정보) 이는 mtab 파일을 /proc/mounts 파일에 대한 심볼릭 링크로 바꾸는 또 다른 이유입니다.
/etc/mtab에 관해서는 이 질문에 부분적으로 대답할 수 있습니다. 이는 마운트에서 유지 관리되는 테이블이거나 /proc/mounts에 대한 심볼릭 링크입니다. 첫 번째 경우에는 마운트에 항목을 쓰지 않도록 명시적으로 지시하면(예를 들어) 차이가 있을 수 있습니다.
두 번째 경우, /etc/mtab이 /proc/mounts에 심볼릭 링크되어 있으면 마운트가 모든 항목을 읽을 수 없는 이유에 대한 설명이 없습니다.