mount 手动挂载
autofs 自动挂载
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121yum install autofs Loaded plugins: langpacks, product-id, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. rhel | 4.1 kB 00:00 Resolving Dependencies --> Running transaction check ---> Package autofs.x86_64 1:5.0.7-40.el7 will be installed --> Processing Dependency: libhesiod.so.0()(64bit) for package: 1:autofs-5.0.7- 40.el7.x86_64 --> Running transaction check ---> Package hesiod.x86_64 0:3.2.1-3.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved =============================================================================== Package Arch Version Repository Size =============================================================================== Installing: autofs x86_64 1:5.0.7-40.el7 rhel 550 k Installing for dependencies: hesiod x86_64 3.2.1-3.el7 rhel 30 k Transaction Summary =============================================================================== Install 1 Package (+1 Dependent package) Total download size: 579 k Installed size: 3.6 M Is this ok [y/d/N]: y Downloading packages: ------------------------------------------------------------------------------- Total 9.4 MB/s | 579 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : hesiod-3.2.1-3.el7.x86_64 1/2 Installing : 1:autofs-5.0.7-40.el7.x86_64 2/2 Verifying : hesiod-3.2.1-3.el7.x86_64 1/2 Verifying : 1:autofs-5.0.7-40.el7.x86_64 2/2 Installed: autofs.x86_64 1:5.0.7-40.el7 Dependency Installed: hesiod.x86_64 0:3.2.1-3.el7 Complete! vim /etc/auto.master # # Sample auto.master file # This is an automounter map and it has the following format # key [ -mount-options-separated-by-comma ] location # For details of the format look at autofs(5). # /media /etc/iso.misc /misc /etc/auto.misc # # NOTE: mounts done from a hosts map will be mounted with the # "nosuid" and "nodev" options unless the "suid" and "dev" # options are explicitly given. # /net -hosts # # Include /etc/auto.master.d/*.autofs # +dir:/etc/auto.master.d # # Include central master map if it can be found using # nsswitch sources. # # Note that if there are entries for /net or /misc (as # above) in the included master map any keys that are the # same will not be seen as the first read key seen takes # precedence. # +auto.master vim /etc/iso.misc iso -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom systemctl start autofs systemctl enable autofs ln -s '/usr/lib/systemd/system/autofs.service' '/etc/systemd/system/multi-user. target.wants/autofs.service' df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 18G 3.0G 15G 17% / devtmpfs 905M 0 905M 0% /dev tmpfs 914M 140K 914M 1% /dev/shm tmpfs 914M 8.9M 905M 1% /run tmpfs 914M 0 914M 0% /sys/fs/cgroup /dev/sda1 497M 119M 379M 24% /boot cd /media ls cd iso ls -l total 812 dr-xr-xr-x. 4 root root 2048 May 7 2017 addons dr-xr-xr-x. 3 root root 2048 May 7 2017 EFI -r--r--r--. 1 root root 8266 Apr 4 2017 EULA -r--r--r--. 1 root root 18092 Mar 6 2012 GPL dr-xr-xr-x. 3 root root 2048 May 7 2017 images dr-xr-xr-x. 2 root root 2048 May 7 2017 isolinux dr-xr-xr-x. 2 root root 2048 May 7 2017 LiveOS -r--r--r--. 1 root root 108 May 7 2017 media.repo dr-xr-xr-x. 2 root root 774144 May 7 2017 Packages dr-xr-xr-x. 24 root root 6144 May 7 2017 release-notes dr-xr-xr-x. 2 root root 4096 May 7 2017 repodata -r--r--r--. 1 root root 3375 Apr 1 2017 RPM-GPG-KEY-redhat-beta -r--r--r--. 1 root root 3211 Apr 1 2017 RPM-GPG-KEY-redhat-release -r--r--r--. 1 root root 1568 May 7 2017 TRANS.TBL df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 18G 3.0G 15G 17% / devtmpfs 905M 0 905M 0% /dev tmpfs 914M 140K 914M 1% /dev/shm tmpfs 914M 8.9M 905M 1% /run tmpfs 914M 0 914M 0% /sys/fs/cgroup /dev/cdrom 3.5G 3.5G 0 100% /media/iso /dev/sda1 497M 119M 379M 24% /boot
Copyright ©2010-2022 比特日记 All Rights Reserved.