当前位置: 首页 > news >正文

Linux713 SAMBA;磁盘管理:手动挂载,开机自动挂载,自动挂载

SAMBA

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

磁盘管理

挂载方式

手动挂载

什么是挂载

disk是什么
挂载​​是将存储设备(如硬盘分区、U盘、光盘等)的文件系统连接到操作系统目录树的过程,使设备中的数据可通过指定目录(挂载点)访问
其核心原理是通过虚拟文件系统(VFS)抽象层,将不同存储介质整合为统一的逻辑目录结构
访问方式​​:用户通过访问挂载点目录操作设备数据(例如ls /mnt/usb查看U盘文件)
在这里插入图片描述
在这里插入图片描述

如何理解挂载nfs samba

​​NFS/Samba挂载​​:通过特定协议(NFS/Samba)将远程服务器共享的目录接入本地目录(挂载点),实现跨系统文件访问。
作用​​:
​​透明访问​​:用户无需感知文件实际存储位置(本地或远程)。
​​资源共享​​:支持多设备协同读写,提升数据利用率(如团队协作、集群计算)
在这里插入图片描述

[root@mysql ~]# cat /etc/fstab#
# /etc/fstab
# Created by anaconda on Fri Jul 11 20:11:26 2025
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root /                       xfs     defaults        0 0
UUID=c509fbee-3529-4ad6-a530-17176a330aed /boot                   xfs     defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
[root@mysql ~]# ls /u01
新建文本文档.txt
[root@mysql ~]#
[root@samba caozx26]# mkdir /u01
[root@samba caozx26]# mount.cifs -o user=user01,pass=123 //192.168.235.10/smb_share /u01
[root@samba caozx26]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part├─centos-root 253:0    0   17G  0 lvm  /└─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sr0              11:0    1  4.4G  0 rom  /mnt
[root@samba caozx26]# df -h
文件系统                    容量  已用  可用 已用% 挂载点
devtmpfs                    470M     0  470M    0% /dev
tmpfs                       487M     0  487M    0% /dev/shm
tmpfs                       487M   15M  472M    4% /run
tmpfs                       487M     0  487M    0% /sys/fs/cgroup
/dev/mapper/centos-root      17G  8.0G  9.1G   47% /
/dev/sda1                  1014M  172M  843M   17% /boot
/dev/sr0                    4.4G  4.4G     0  100% /mnt
tmpfs                        98M   40K   98M    1% /run/user/1001
192.168.235.3:/share         17G  5.9G   12G   35% /var/www/html/media
//192.168.235.10/smb_share   17G  8.0G  9.1G   47% /u01
[root@samba caozx26]# cd /samba/share
[root@samba share]# ls
1.txt  2.txt  6435271d350f980bad2ef3e68e60adf.jpg
..
[root@samba share]# ls /u01
1.txt  2.txt  6435271d350f980bad2ef3e68e60adf.jpg
[root@samba share]# mount.cifs -o user=user01,pass=123 //192.168.235.10/smb_share /u01
mount error(16): Device or resource busy
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@samba share]# mount.cifs -o user=user01,pass=123 //192.168.235.10/smb_share /u-1
Couldn't chdir to /u-1: No such file or directory
[root@samba share]# mount.cifs -o user=user01,pass=123 //192.168.235.10/smb_share /u01
mount error(16): Device or resource busy
[root@samba html]# mkdir /u02
[root@samba html]# df -h
文件系统                    容量  已用  可用 已用% 挂载点
devtmpfs                    470M     0  470M    0% /dev
tmpfs                       487M     0  487M    0% /dev/shm
tmpfs                       487M   15M  472M    4% /run
tmpfs                       487M     0  487M    0% /sys/fs/cgroup
/dev/mapper/centos-root      17G  8.0G  9.1G   47% /
/dev/sda1                  1014M  172M  843M   17% /boot
/dev/sr0                    4.4G  4.4G     0  100% /mnt
tmpfs                        98M   40K   98M    1% /run/user/1001
192.168.235.3:/share         17G  5.9G   12G   35% /var/www/html/media
//192.168.235.10/smb_share   17G  8.0G  9.1G   47% /u01
[root@samba html]# mount.nfs 192.168.235.130:/share /u02
[root@samba html]# df -h
文件系统                    容量  已用  可用 已用% 挂载点
devtmpfs                    470M     0  470M    0% /dev
tmpfs                       487M     0  487M    0% /dev/shm
tmpfs                       487M   15M  472M    4% /run
tmpfs                       487M     0  487M    0% /sys/fs/cgroup
/dev/mapper/centos-root      17G  8.0G  9.1G   47% /
/dev/sda1                  1014M  172M  843M   17% /boot
/dev/sr0                    4.4G  4.4G     0  100% /mnt
tmpfs                        98M   40K   98M    1% /run/user/1001
192.168.235.3:/share         17G  5.9G   12G   35% /var/www/html/media
//192.168.235.10/smb_share   17G  8.0G  9.1G   47% /u01
192.168.235.130:/share       17G   12G  5.9G   66% /u02
[root@samba html]# ls u02
ls: 无法访问u02: 没有那个文件或目录
[root@samba html]# ls /u02
[root@mysql ~]# mount -o remount,ro /u02
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
[root@mysql ~]# mount -o remount,ro /dev/sdb2
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
[root@mysql ~]# blkid /dev/sdb1
/dev/sdb1: LABEL="DISK1" UUID="5ba1b015-eac3-42f7-88e4-3df90bf21738" TYPE="ext4"
[root@mysql ~]# e2label /dev/sdb1 dd1
[root@mysql ~]# blkid /dev/sdb1
/dev/sdb1: LABEL="dd1" UUID="5ba1b015-eac3-42f7-88e4-3df90bf21738" TYPE="ext4"
[root@mysql ~]# blkid /dev/sdb2
/dev/sdb2: UUID="FAE6-87AA" TYPE="vfat"
[root@mysql ~]# e2label /dev/sdb2 dd2
e2label: Bad magic number in super-block while trying to open /dev/sdb2
Couldn't find valid filesystem superblock.
[root@mysql ~]#
解挂

umount /u02
umount /dev/sdb2

[root@mysql ~]# umount /u02
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
[root@mysql ~]# mount /dev/sdb2 /u02
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
[root@mysql ~]# umount /dev/sdb2
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01

开机自动挂载

/etc/fstab

[root@mysql ~]# cat /etc/vstab
cat: /etc/vstab: No such file or directory
[root@mysql ~]# cat /etc/fstab#
# /etc/fstab
# Created by anaconda on Fri Jul 11 20:11:26 2025
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root /                       xfs     defaults        0 0
UUID=c509fbee-3529-4ad6-a530-17176a330aed /boot                   xfs     defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0
[root@mysql ~]# vim /etc/fstab
[root@mysql ~]# cat /etc/fstab#
# /etc/fstab
# Created by anaconda on Fri Jul 11 20:11:26 2025
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root /                       xfs     defaults        0 0
UUID=c509fbee-3529-4ad6-a530-17176a330aed /boot                   xfs     defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0
/dev/sdb2               /u02                    vfat    defaults,rw     0 0
[root@mysql ~]# mount -a
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
/etc/rc.local
[root@mysql u02]# cat /etc/rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.touch /var/lock/subsys/local
mount -o ro /etc/sr0 /mnt
[root@mysql u02]#

自动挂载

下载autuofs
[root@mysql u02]# yum install autofs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package autofs.x86_64 1:5.0.7-116.el7_9.1 will be installed
--> Processing Dependency: libhesiod.so.0()(64bit) for package: 1:autofs
--> Running transaction check
---> Package hesiod.x86_64 0:3.2.1-3.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved========================================================================Package             Arch                Version
========================================================================
Installing:autofs              x86_64              1:5.0.7-116.el7_9.1
Installing for dependencies:hesiod              x86_64              3.2.1-3.el7Transaction Summary
========================================================================
Install  1 Package (+1 Dependent package)Total download size: 864 k
Installed size: 5.2 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): autofs-5.0.7-116.el7_9.1.x86_64.rpm
(2/2): hesiod-3.2.1-3.el7.x86_64.rpm
------------------------------------------------------------------------
Total                                                                1.1
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : hesiod-3.2.1-3.el7.x86_64Installing : 1:autofs-5.0.7-116.el7_9.1.x86_64Verifying  : hesiod-3.2.1-3.el7.x86_64Verifying  : 1:autofs-5.0.7-116.el7_9.1.x86_64Installed:autofs.x86_64 1:5.0.7-116.el7_9.1Dependency Installed:hesiod.x86_64 0:3.2.1-3.el7Complete!
[root@mysql u02]# rpm -ql autofs
/etc/auto.master
/etc/auto.master.d
/etc/auto.misc
/etc/auto.net
/etc/auto.smb
/etc/autofs.conf
/etc/autofs_ldap_auth.conf
/etc/sysconfig/autofs
/usr/lib/systemd/system/autofs.service
/usr/lib64/autofs
/usr/lib64/autofs/lookup_dir.so
/usr/lib64/autofs/lookup_file.so
/usr/lib64/autofs/lookup_files.so
/usr/lib64/autofs/lookup_hesiod.so
/usr/lib64/autofs/lookup_hosts.so
/usr/lib64/autofs/lookup_ldap.so
/usr/lib64/autofs/lookup_ldaps.so
/usr/lib64/autofs/lookup_multi.so
/usr/lib64/autofs/lookup_nis.so
/usr/lib64/autofs/lookup_nisplus.so
/usr/lib64/autofs/lookup_program.so
/usr/lib64/autofs/lookup_sss.so
/usr/lib64/autofs/lookup_userhome.so
/usr/lib64/autofs/lookup_yp.so
/usr/lib64/autofs/mount_afs.so
/usr/lib64/autofs/mount_autofs.so
/usr/lib64/autofs/mount_bind.so
/usr/lib64/autofs/mount_changer.so
/usr/lib64/autofs/mount_ext2.so
/usr/lib64/autofs/mount_ext3.so
/usr/lib64/autofs/mount_ext4.so
/usr/lib64/autofs/mount_generic.so
/usr/lib64/autofs/mount_nfs.so
/usr/lib64/autofs/mount_nfs4.so
/usr/lib64/autofs/parse_amd.so
/usr/lib64/autofs/parse_hesiod.so
/usr/lib64/autofs/parse_sun.so
/usr/sbin/automount
/usr/share/doc/autofs-5.0.7
/usr/share/doc/autofs-5.0.7/COPYING
/usr/share/doc/autofs-5.0.7/COPYRIGHT
/usr/share/doc/autofs-5.0.7/CREDITS
/usr/share/doc/autofs-5.0.7/INSTALL
/usr/share/doc/autofs-5.0.7/README
/usr/share/doc/autofs-5.0.7/README.active-restart
/usr/share/doc/autofs-5.0.7/README.amd-maps
/usr/share/doc/autofs-5.0.7/README.autofs-schema
/usr/share/doc/autofs-5.0.7/README.changer
/usr/share/doc/autofs-5.0.7/README.ncpfs
/usr/share/doc/autofs-5.0.7/README.replicated-server
/usr/share/doc/autofs-5.0.7/README.smbfs
/usr/share/doc/autofs-5.0.7/README.v5.release
/usr/share/doc/autofs-5.0.7/autofs.schema
/usr/share/doc/autofs-5.0.7/autofs.schema.new
/usr/share/doc/autofs-5.0.7/autofs4-2.6.18-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.18-v5-update-20100114.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.19-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.19-v5-update-20100114.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.20-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.21-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.22-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.22.17-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.23-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.24-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.24.4-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.25-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.26-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.27-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.28-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.29-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/ldap-automount-auto.direct
/usr/share/doc/autofs-5.0.7/ldap-automount-auto.indirect
/usr/share/doc/autofs-5.0.7/ldap-automount-auto.master
/usr/share/doc/autofs-5.0.7/ldap-automount-rfc2307-bis-auto.direct
/usr/share/doc/autofs-5.0.7/ldap-automount-rfc2307-bis-auto.indirect
/usr/share/doc/autofs-5.0.7/ldap-automount-rfc2307-bis-auto.master
/usr/share/doc/autofs-5.0.7/ldap-automount-rfc2307-bis-old-style-auto.ma
/usr/share/doc/autofs-5.0.7/ldap-nis-auto.direct
/usr/share/doc/autofs-5.0.7/ldap-nis-auto.indirect
/usr/share/doc/autofs-5.0.7/ldap-nis-auto.master
/usr/share/doc/autofs-5.0.7/util-linux-2.12a-flock.patch
/usr/share/doc/autofs-5.0.7/util-linux-2.12q-flock.patch
/usr/share/man/man5/auto.master.5.gz
/usr/share/man/man5/autofs.5.gz
/usr/share/man/man5/autofs.conf.5.gz
/usr/share/man/man5/autofs_ldap_auth.conf.5.gz
/usr/share/man/man8/autofs.8.gz
/usr/share/man/man8/automount.8.gz
[root@mysql u02]# cat /etc/auto.master
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/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
# The included files must conform to the format of this file.
#
+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/auto.master

/u03 /etc/auto.test -t 120

[root@mysql u02]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.8M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  8.0K 1022M   1% /u02
[root@mysql u02]# vim /etc/auto.master
[root@mysql u02]# cat /etc/auto.master
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/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
# The included files must conform to the format of this file.
#
+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
/u03 /etc/auto.test -t 120
/etc/auto.test

test -fstype=ext4,ro :/dev/sdb5

[root@mysql u02]# vim /etc/auto.test
[root@mysql u02]# cat /etc/auto.test
test -fstype=ext4,ro :/dev/sdb5
[root@mysql u02]# service autofs restart
Redirecting to /bin/systemctl restart autofs.service
[root@mysql u02]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.8M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  8.0K 1022M   1% /u02
[root@mysql u02]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part├─centos-root 253:0    0   17G  0 lvm  /└─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sdb               8:16   0   10G  0 disk
├─sdb1            8:17   0    1G  0 part
├─sdb2            8:18   0    1G  0 part /u02
├─sdb3            8:19   0    1G  0 part
├─sdb4            8:20   0    1K  0 part
├─sdb5            8:21   0    1G  0 part
├─sdb6            8:22   0    1G  0 part
├─sdb7            8:23   0    1M  0 part
└─sdb8            8:24   0  100M  0 part
sr0              11:0    1  4.4G  0 rom
[root@mysql u02]# mkfs.ext4 /dev/sdb5
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:32768, 98304, 163840, 229376Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done[root@mysql u02]# blkid /dev/sdb5
/dev/sdb5: UUID="a577b24e-d9ba-43fb-81ab-5632fe2d3848" TYPE="ext4"
[root@mysql u02]# sevice autofs restart
-bash: sevice: command not found
service autofs start
[root@mysql u02]# service autofs restart
Redirecting to /bin/systemctl restart autofs.service
[root@mysql u02]# cat /etc/auto.master
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/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
# The included files must conform to the format of this file.
#
+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
/u03 /etc/auto.test -t 120
[root@mysql u02]# cat /etc/auto.test
test -fstype=ext4,ro :/dev/sdb5
[root@mysql u02]# ls /u03
[root@mysql u02]# ls /u03/test
lost+found
[root@mysql u02]# cat /etc/fastb
cat: /etc/fastb: No such file or directory
[root@mysql u02]# cat /etc/fstab#
# /etc/fstab
# Created by anaconda on Fri Jul 11 20:11:26 2025
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more i
#
/dev/mapper/centos-root /                       xfs     defaults
UUID=c509fbee-3529-4ad6-a530-17176a330aed /boot                   xfs
/dev/mapper/centos-swap swap                    swap    defaults
/dev/sdb2               /u02                    vfat    defaults,rw
[root@mysql u02]# cat /etc/auto.master
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/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
# The included files must conform to the format of this file.
#
+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
/u03 /etc/auto.test -t 120
[root@mysql u02]# cat /etc/auto.test
test -fstype=ext4,ro :/dev/sdb5
ls /u03
[root@mysql u02]# ls /u03
test
[root@mysql u02]# ls /u03/test
lost+found
[root@mysql u02]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.8M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  8.0K 1022M   1% /u02
/dev/sdb5                    976M  2.6M  907M   1% /u03/test

记录

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

.130

root@192.168.235.130's password:┌──────────────────────────────────────────────────────────────────────┐│                 • MobaXterm Personal Edition v23.2 •                 ││               (SSH client, X server and network tools)               ││                                                                      ││ ⮞ SSH session to root@192.168.235.130                                ││   • Direct SSH      :  ✓                                             ││   • SSH compression :  ✓                                             ││   • SSH-browser     :  ✓                                             ││   • X11-forwarding  :  ✗  (disabled or not supported by server)      ││                                                                      ││ ⮞ For more info, ctrl+click on help or visit our website.            │└──────────────────────────────────────────────────────────────────────┘Last login: Sat Jul 12 16:22:57 2025 from 192.168.235.1
[root@mysql ~]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part├─centos-root 253:0    0   17G  0 lvm  /└─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sdb               8:16   0   10G  0 disk
├─sdb1            8:17   0    1G  0 part /u01
├─sdb2            8:18   0    1G  0 part /u02
├─sdb3            8:19   0    1G  0 part
├─sdb4            8:20   0    1K  0 part
├─sdb5            8:21   0    1G  0 part
├─sdb6            8:22   0    1G  0 part
├─sdb7            8:23   0    1M  0 part
└─sdb8            8:24   0  100M  0 part
sr0              11:0    1  4.4G  0 rom
[root@mysql ~]# fdisk -lDisk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x256e2877Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux
/dev/sdb2         2099200     4196351     1048576   83  Linux
/dev/sdb3         4196352     6293503     1048576   83  Linux
/dev/sdb4         6293504    12584959     3145728    5  Extended
/dev/sdb5         6295552     8392703     1048576   83  Linux
/dev/sdb6         8394752    10491903     1048576   83  Linux
/dev/sdb7        10493952    10495999        1024   83  Linux
/dev/sdb8        10498048    10702847      102400   83  LinuxDisk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b6c0bDevice Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    41943039    19921920   8e  Linux LVMDisk /dev/mapper/centos-root: 18.2 GB, 18249416704 bytes, 35643392 secto
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes[root@mysql ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                 475M     0  475M   0% /dev
tmpfs                    487M     0  487M   0% /dev/shm
tmpfs                    487M  7.7M  479M   2% /run
tmpfs                    487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root   17G   12G  5.9G  66% /
/dev/sda1               1014M  138M  877M  14% /boot
tmpfs                     98M     0   98M   0% /run/user/0
/dev/sdb1                976M  2.6M  907M   1% /u01
/dev/sdb2               1022M  4.0K 1022M   1% /u02
[root@mysql ~]# yum install samba
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
base                                                                 | 3
extras                                                               | 2
updates                                                              | 2
Resolving Dependencies
--> Running transaction check
---> Package samba.x86_64 0:4.10.16-25.el7_9 will be installed
--> Processing Dependency: samba-libs = 4.10.16-25.el7_9 for package: sa.x86_64
--> Processing Dependency: samba-common-tools = 4.10.16-25.el7_9 for pac25.el7_9.x86_64
--> Processing Dependency: samba-common-libs = 4.10.16-25.el7_9 for pack5.el7_9.x86_64
--> Processing Dependency: samba-common = 4.10.16-25.el7_9 for package: _9.x86_64
--> Processing Dependency: samba-common = 4.10.16-25.el7_9 for package: _9.x86_64
--> Processing Dependency: samba-client-libs = 4.10.16-25.el7_9 for pack5.el7_9.x86_64
--> Processing Dependency: libwbclient = 4.10.16-25.el7_9 for package: s9.x86_64
--> Processing Dependency: libwbclient = 4.10.16-25.el7_9 for package: s9.x86_64
--> Processing Dependency: libxattr-tdb-samba4.so(SAMBA_4.10.16)(64bit) .10.16-25.el7_9.x86_64
--> Processing Dependency: libutil-tdb-samba4.so(SAMBA_4.10.16)(64bit) f10.16-25.el7_9.x86_64
--> Processing Dependency: libutil-reg-samba4.so(SAMBA_4.10.16)(64bit) f10.16-25.el7_9.x86_64
--> Processing Dependency: libtevent.so.0(TEVENT_0.9.9)(64bit) for packa.el7_9.x86_64
--> Processing Dependency: libtevent.so.0(TEVENT_0.9.21)(64bit) for pack5.el7_9.x86_64
--> Processing Dependency: libtevent.so.0(TEVENT_0.9.16)(64bit) for pack5.el7_9.x86_64
--> Processing Dependency: libtevent-util.so.0(TEVENT_UTIL_0.0.1)(64bit)4.10.16-25.el7_9.x86_64
--> Processing Dependency: libtdb.so.1(TDB_1.2.5)(64bit) for package: sa.x86_64
--> Processing Dependency: libtdb.so.1(TDB_1.2.1)(64bit) for package: sa.x86_64
--> Processing Dependency: libtalloc.so.2(TALLOC_2.0.2)(64bit) for packa.el7_9.x86_64
--> Processing Dependency: libsys-rw-samba4.so(SAMBA_4.10.16)(64bit) for.16-25.el7_9.x86_64
--> Processing Dependency: libsocket-blocking-samba4.so(SAMBA_4.10.16)(6amba-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libsmbd-shim-samba4.so(SAMBA_4.10.16)(64bit) .10.16-25.el7_9.x86_64
--> Processing Dependency: libsmbd-base-samba4.so(SAMBA_4.10.16)(64bit) .10.16-25.el7_9.x86_64
--> Processing Dependency: libsmbconf.so.0(SMBCONF_0)(64bit) for packagel7_9.x86_64
--> Processing Dependency: libsmb-transport-samba4.so(SAMBA_4.10.16)(64bba-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libserver-id-db-samba4.so(SAMBA_4.10.16)(64bia-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libsecrets3-samba4.so(SAMBA_4.10.16)(64bit) f10.16-25.el7_9.x86_64
--> Processing Dependency: libsamba3-util-samba4.so(SAMBA_4.10.16)(64bit-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libsamba-util.so.0(SAMBA_UTIL_0.0.1)(64bit) f10.16-25.el7_9.x86_64
--> Processing Dependency: libsamba-sockets-samba4.so(SAMBA_4.10.16)(64bba-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libsamba-security-samba4.so(SAMBA_4.10.16)(64mba-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libsamba-passdb.so.0(SAMBA_PASSDB_0.2.0)(64bia-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libsamba-hostconfig.so.0(SAMBA_HOSTCONFIG_0.0ge: samba-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libsamba-errors.so.1(SAMBA_ERRORS_1)(64bit) f10.16-25.el7_9.x86_64
--> Processing Dependency: libsamba-debug-samba4.so(SAMBA_4.10.16)(64bit-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libsamba-cluster-support-samba4.so(SAMBA_4.10age: samba-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libreplace-samba4.so(SAMBA_4.10.16)(64bit) fo0.16-25.el7_9.x86_64
--> Processing Dependency: libpopt-samba3-samba4.so(SAMBA_4.10.16)(64bit-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libndr.so.0(NDR_0.0.1)(64bit) for package: sa.x86_64
--> Processing Dependency: libndr-standard.so.0(NDR_STANDARD_0.0.1)(64bia-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libndr-samba-samba4.so(SAMBA_4.10.16)(64bit) .10.16-25.el7_9.x86_64
--> Processing Dependency: libndr-nbt.so.0(NDR_NBT_0.0.1)(64bit) for pac25.el7_9.x86_64
--> Processing Dependency: libmsghdr-samba4.so(SAMBA_4.10.16)(64bit) for.16-25.el7_9.x86_64
--> Processing Dependency: libmessages-dgm-samba4.so(SAMBA_4.10.16)(64bia-4.10.16-25.el7_9.x86_64
--> Processing Dependency: liblibsmb-samba4.so(SAMBA_4.10.16)(64bit) for.16-25.el7_9.x86_64
--> Processing Dependency: libgse-samba4.so(SAMBA_4.10.16)(64bit) for pa-25.el7_9.x86_64
--> Processing Dependency: libgenrand-samba4.so(SAMBA_4.10.16)(64bit) fo0.16-25.el7_9.x86_64
--> Processing Dependency: libdbwrap-samba4.so(SAMBA_4.10.16)(64bit) for.16-25.el7_9.x86_64
--> Processing Dependency: libcmdline-contexts-samba4.so(SAMBA_4.10.16)(samba-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libcliauth-samba4.so(SAMBA_4.10.16)(64bit) fo0.16-25.el7_9.x86_64
--> Processing Dependency: libcli-smb-common-samba4.so(SAMBA_4.10.16)(64mba-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libcli-nbt-samba4.so(SAMBA_4.10.16)(64bit) fo0.16-25.el7_9.x86_64
--> Processing Dependency: libcli-cldap-samba4.so(SAMBA_4.10.16)(64bit) .10.16-25.el7_9.x86_64
--> Processing Dependency: libauth-samba4.so(SAMBA_4.10.16)(64bit) for p6-25.el7_9.x86_64
--> Processing Dependency: libCHARSET3-samba4.so(SAMBA_4.10.16)(64bit) f10.16-25.el7_9.x86_64
--> Processing Dependency: libxattr-tdb-samba4.so()(64bit) for package: _9.x86_64
--> Processing Dependency: libwinbind-client-samba4.so()(64bit) for pack5.el7_9.x86_64
--> Processing Dependency: libwbclient.so.0()(64bit) for package: samba-_64
--> Processing Dependency: libutil-tdb-samba4.so()(64bit) for package: s9.x86_64
--> Processing Dependency: libutil-setid-samba4.so()(64bit) for package:7_9.x86_64
--> Processing Dependency: libutil-reg-samba4.so()(64bit) for package: s9.x86_64
--> Processing Dependency: libutil-cmdline-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libtrusts-util-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libtime-basic-samba4.so()(64bit) for package:7_9.x86_64
--> Processing Dependency: libtevent.so.0()(64bit) for package: samba-4.4
--> Processing Dependency: libtevent-util.so.0()(64bit) for package: samx86_64
--> Processing Dependency: libtdb.so.1()(64bit) for package: samba-4.10.
--> Processing Dependency: libtdb-wrap-samba4.so()(64bit) for package: s9.x86_64
--> Processing Dependency: libtalloc.so.2()(64bit) for package: samba-4.4
--> Processing Dependency: libtalloc-report-samba4.so()(64bit) for packa.el7_9.x86_64
--> Processing Dependency: libsys-rw-samba4.so()(64bit) for package: samx86_64
--> Processing Dependency: libsocket-blocking-samba4.so()(64bit) for pac25.el7_9.x86_64
--> Processing Dependency: libsmbldap.so.2()(64bit) for package: samba-464
--> Processing Dependency: libsmbd-shim-samba4.so()(64bit) for package: _9.x86_64
--> Processing Dependency: libsmbd-conn-samba4.so()(64bit) for package: _9.x86_64
--> Processing Dependency: libsmbd-base-samba4.so()(64bit) for package: _9.x86_64
--> Processing Dependency: libsmbconf.so.0()(64bit) for package: samba-464
--> Processing Dependency: libsmb-transport-samba4.so()(64bit) for packa.el7_9.x86_64
--> Processing Dependency: libserver-role-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libserver-id-db-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libsecrets3-samba4.so()(64bit) for package: s9.x86_64
--> Processing Dependency: libsamdb.so.0()(64bit) for package: samba-4.1
--> Processing Dependency: libsamdb-common-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libsamba3-util-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libsamba-util.so.0()(64bit) for package: samb86_64
--> Processing Dependency: libsamba-sockets-samba4.so()(64bit) for packa.el7_9.x86_64
--> Processing Dependency: libsamba-security-samba4.so()(64bit) for pack5.el7_9.x86_64
--> Processing Dependency: libsamba-passdb.so.0()(64bit) for package: sa.x86_64
--> Processing Dependency: libsamba-modules-samba4.so()(64bit) for packa.el7_9.x86_64
--> Processing Dependency: libsamba-hostconfig.so.0()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libsamba-errors.so.1()(64bit) for package: sa.x86_64
--> Processing Dependency: libsamba-debug-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libsamba-credentials.so.0()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libsamba-cluster-support-samba4.so()(64bit) f10.16-25.el7_9.x86_64
--> Processing Dependency: libreplace-samba4.so()(64bit) for package: sa.x86_64
--> Processing Dependency: libprinting-migrate-samba4.so()(64bit) for pa-25.el7_9.x86_64
--> Processing Dependency: libpopt-samba3-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libnpa-tstream-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libnetif-samba4.so()(64bit) for package: samb86_64
--> Processing Dependency: libnetapi.so.0()(64bit) for package: samba-4.4
--> Processing Dependency: libnet-keytab-samba4.so()(64bit) for package:7_9.x86_64
--> Processing Dependency: libndr.so.0()(64bit) for package: samba-4.10.
--> Processing Dependency: libndr-standard.so.0()(64bit) for package: sa.x86_64
--> Processing Dependency: libndr-samba4.so()(64bit) for package: samba-_64
--> Processing Dependency: libndr-samba-samba4.so()(64bit) for package: _9.x86_64
--> Processing Dependency: libndr-nbt.so.0()(64bit) for package: samba-464
--> Processing Dependency: libndr-krb5pac.so.0()(64bit) for package: samx86_64
--> Processing Dependency: libmsrpc3-samba4.so()(64bit) for package: samx86_64
--> Processing Dependency: libmsghdr-samba4.so()(64bit) for package: samx86_64
--> Processing Dependency: libmessages-util-samba4.so()(64bit) for packa.el7_9.x86_64
--> Processing Dependency: libmessages-dgm-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: liblibsmb-samba4.so()(64bit) for package: samx86_64
--> Processing Dependency: liblibcli-netlogon3-samba4.so()(64bit) for pa-25.el7_9.x86_64
--> Processing Dependency: liblibcli-lsa3-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libldbsamba-samba4.so()(64bit) for package: s9.x86_64
--> Processing Dependency: libldb.so.1()(64bit) for package: samba-4.10.
--> Processing Dependency: libkrb5samba-samba4.so()(64bit) for package: _9.x86_64
--> Processing Dependency: libiov-buf-samba4.so()(64bit) for package: sa.x86_64
--> Processing Dependency: libinterfaces-samba4.so()(64bit) for package:7_9.x86_64
--> Processing Dependency: libgse-samba4.so()(64bit) for package: samba-_64
--> Processing Dependency: libgensec-samba4.so()(64bit) for package: samx86_64
--> Processing Dependency: libgenrand-samba4.so()(64bit) for package: sa.x86_64
--> Processing Dependency: libflag-mapping-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libevents-samba4.so()(64bit) for package: samx86_64
--> Processing Dependency: libdcerpc-samba-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libdcerpc-binding.so.0()(64bit) for package: _9.x86_64
--> Processing Dependency: libdbwrap-samba4.so()(64bit) for package: samx86_64
--> Processing Dependency: libcups.so.2()(64bit) for package: samba-4.10
--> Processing Dependency: libcommon-auth-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libcmdline-contexts-samba4.so()(64bit) for pa-25.el7_9.x86_64
--> Processing Dependency: libcluster-samba4.so()(64bit) for package: sa.x86_64
--> Processing Dependency: libclidns-samba4.so()(64bit) for package: samx86_64
--> Processing Dependency: libcliauth-samba4.so()(64bit) for package: sa.x86_64
--> Processing Dependency: libcli-spoolss-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libcli-smb-common-samba4.so()(64bit) for pack5.el7_9.x86_64
--> Processing Dependency: libcli-nbt-samba4.so()(64bit) for package: sa.x86_64
--> Processing Dependency: libcli-ldap-samba4.so()(64bit) for package: s9.x86_64
--> Processing Dependency: libcli-ldap-common-samba4.so()(64bit) for pac25.el7_9.x86_64
--> Processing Dependency: libcli-cldap-samba4.so()(64bit) for package: _9.x86_64
--> Processing Dependency: libauthkrb5-samba4.so()(64bit) for package: s9.x86_64
--> Processing Dependency: libauth-samba4.so()(64bit) for package: samba6_64
--> Processing Dependency: libasn1util-samba4.so()(64bit) for package: s9.x86_64
--> Processing Dependency: libaesni-intel-samba4.so()(64bit) for packagel7_9.x86_64
--> Processing Dependency: libads-samba4.so()(64bit) for package: samba-_64
--> Processing Dependency: libaddns-samba4.so()(64bit) for package: samb86_64
--> Processing Dependency: libMESSAGING-SEND-samba4.so()(64bit) for pack5.el7_9.x86_64
--> Processing Dependency: libCHARSET3-samba4.so()(64bit) for package: s9.x86_64
--> Running transaction check
---> Package cups-libs.x86_64 1:1.6.3-52.el7_9 will be installed
---> Package libldb.x86_64 0:1.5.4-2.el7 will be installed
---> Package libtalloc.x86_64 0:2.1.16-1.el7 will be installed
---> Package libtdb.x86_64 0:1.3.18-1.el7 will be installed
---> Package libtevent.x86_64 0:0.9.39-1.el7 will be installed
---> Package libwbclient.x86_64 0:4.10.16-25.el7_9 will be installed
---> Package samba-client-libs.x86_64 0:4.10.16-25.el7_9 will be install
---> Package samba-common.noarch 0:4.10.16-25.el7_9 will be installed
---> Package samba-common-libs.x86_64 0:4.10.16-25.el7_9 will be install
---> Package samba-common-tools.x86_64 0:4.10.16-25.el7_9 will be instal
---> Package samba-libs.x86_64 0:4.10.16-25.el7_9 will be installed
--> Processing Dependency: libpytalloc-util.so.2(PYTALLOC_UTIL_2.1.9)(64mba-libs-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libpytalloc-util.so.2(PYTALLOC_UTIL_2.1.6)(64mba-libs-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libpytalloc-util.so.2(PYTALLOC_UTIL_2.0.6)(64mba-libs-4.10.16-25.el7_9.x86_64
--> Processing Dependency: libpytalloc-util.so.2()(64bit) for package: s.el7_9.x86_64
--> Processing Dependency: libpyldb-util.so.1()(64bit) for package: samb7_9.x86_64
--> Running transaction check
---> Package pyldb.x86_64 0:1.5.4-2.el7 will be installed
--> Processing Dependency: python-tdb(x86-64) >= 1.3.18 for package: pyl4
---> Package pytalloc.x86_64 0:2.1.16-1.el7 will be installed
--> Running transaction check
---> Package python-tdb.x86_64 0:1.3.18-1.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved========================================================================Package                    Arch           Version                    Re
========================================================================
Installing:samba                      x86_64         4.10.16-25.el7_9           up
Installing for dependencies:cups-libs                  x86_64         1:1.6.3-52.el7_9           uplibldb                     x86_64         1.5.4-2.el7                uplibtalloc                  x86_64         2.1.16-1.el7               balibtdb                     x86_64         1.3.18-1.el7               balibtevent                  x86_64         0.9.39-1.el7               balibwbclient                x86_64         4.10.16-25.el7_9           uppyldb                      x86_64         1.5.4-2.el7                uppytalloc                   x86_64         2.1.16-1.el7               bapython-tdb                 x86_64         1.3.18-1.el7               basamba-client-libs          x86_64         4.10.16-25.el7_9           upsamba-common               noarch         4.10.16-25.el7_9           upsamba-common-libs          x86_64         4.10.16-25.el7_9           upsamba-common-tools         x86_64         4.10.16-25.el7_9           upsamba-libs                 x86_64         4.10.16-25.el7_9           upTransaction Summary
========================================================================
Install  1 Package (+14 Dependent packages)Total download size: 7.6 M
Installed size: 25 M
Is this ok [y/d/N]: y
Downloading packages:
(1/15): libldb-1.5.4-2.el7.x86_64.rpm                                | 1
(2/15): cups-libs-1.6.3-52.el7_9.x86_64.rpm                          | 3
(3/15): libtdb-1.3.18-1.el7.x86_64.rpm                               |
(4/15): libtalloc-2.1.16-1.el7.x86_64.rpm                            |
(5/15): libtevent-0.9.39-1.el7.x86_64.rpm                            |
(6/15): pytalloc-2.1.16-1.el7.x86_64.rpm                             |
(7/15): libwbclient-4.10.16-25.el7_9.x86_64.rpm                      | 1
(8/15): pyldb-1.5.4-2.el7.x86_64.rpm                                 |
(9/15): python-tdb-1.3.18-1.el7.x86_64.rpm                           |
(10/15): samba-4.10.16-25.el7_9.x86_64.rpm                           | 7
(11/15): samba-common-4.10.16-25.el7_9.noarch.rpm                    | 2
(12/15): samba-common-libs-4.10.16-25.el7_9.x86_64.rpm               | 1
(13/15): samba-common-tools-4.10.16-25.el7_9.x86_64.rpm              | 4
(14/15): samba-libs-4.10.16-25.el7_9.x86_64.rpm                      | 2
(15/15): samba-client-libs-4.10.16-25.el7_9.x86_64.rpm               | 5
------------------------------------------------------------------------
Total                                                       4.4 MB/s | 7
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : libtalloc-2.1.16-1.el7.x86_64Installing : libtdb-1.3.18-1.el7.x86_64Installing : libtevent-0.9.39-1.el7.x86_64Installing : libldb-1.5.4-2.el7.x86_64Installing : 1:cups-libs-1.6.3-52.el7_9.x86_64Installing : samba-common-4.10.16-25.el7_9.noarchInstalling : libwbclient-4.10.16-25.el7_9.x86_64Installing : samba-client-libs-4.10.16-25.el7_9.x86_64Installing : samba-common-libs-4.10.16-25.el7_9.x86_64Installing : python-tdb-1.3.18-1.el7.x86_64Installing : pyldb-1.5.4-2.el7.x86_64Installing : pytalloc-2.1.16-1.el7.x86_64Installing : samba-libs-4.10.16-25.el7_9.x86_64Installing : samba-common-tools-4.10.16-25.el7_9.x86_64Installing : samba-4.10.16-25.el7_9.x86_64Verifying  : pyldb-1.5.4-2.el7.x86_64Verifying  : samba-libs-4.10.16-25.el7_9.x86_64Verifying  : 1:cups-libs-1.6.3-52.el7_9.x86_64Verifying  : samba-client-libs-4.10.16-25.el7_9.x86_64Verifying  : libldb-1.5.4-2.el7.x86_64Verifying  : libtalloc-2.1.16-1.el7.x86_64Verifying  : libtevent-0.9.39-1.el7.x86_64Verifying  : libtdb-1.3.18-1.el7.x86_64Verifying  : libwbclient-4.10.16-25.el7_9.x86_64Verifying  : samba-4.10.16-25.el7_9.x86_64Verifying  : pytalloc-2.1.16-1.el7.x86_64Verifying  : samba-common-libs-4.10.16-25.el7_9.x86_64Verifying  : python-tdb-1.3.18-1.el7.x86_64Verifying  : samba-common-tools-4.10.16-25.el7_9.x86_64Verifying  : samba-common-4.10.16-25.el7_9.noarchInstalled:samba.x86_64 0:4.10.16-25.el7_9Dependency Installed:cups-libs.x86_64 1:1.6.3-52.el7_9             libldb.x86_64 0:1.5.4-2.libtalloc.x86_64 0:2.1.16-1.el7               libtdb.x86_64 0:1.3.18-1libtevent.x86_64 0:0.9.39-1.el7               libwbclient.x86_64 0:4.1pyldb.x86_64 0:1.5.4-2.el7                    pytalloc.x86_64 0:2.1.16python-tdb.x86_64 0:1.3.18-1.el7              samba-client-libs.x86_64samba-common.noarch 0:4.10.16-25.el7_9        samba-common-libs.x86_64samba-common-tools.x86_64 0:4.10.16-25.el7_9  samba-libs.x86_64 0:4.10Complete!
[root@mysql ~]# cat /etc/export
cat: /etc/export: No such file or directory
[root@mysql ~]# mkdir /samba/share -p
[root@mysql ~]# ls /samba
share
[root@mysql ~]# cd
[root@mysql ~]# cat /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.[global]workgroup = SAMBAsecurity = userpassdb backend = tdbsamprinting = cupsprintcap name = cupsload printers = yescups options = raw[homes]comment = Home Directoriesvalid users = %S, %D%w%Sbrowseable = Noread only = Noinherit acls = Yes[printers]comment = All Printerspath = /var/tmpprintable = Yescreate mask = 0600browseable = No[print$]comment = Printer Driverspath = /var/lib/samba/driverswrite list = @printadmin rootforce group = @printadmincreate mask = 0664directory mask = 0775
[root@mysql ~]# vim /etc/samba/smb.conf
[root@mysql ~]# cat /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.[global]workgroup = SAMBAsecurity = userpassdb backend = tdbsamprinting = cupsprintcap name = cupsload printers = yescups options = raw[homes]comment = Home Directoriesvalid users = %S, %D%w%Sbrowseable = Noread only = Noinherit acls = Yes[printers]comment = All Printerspath = /var/tmpprintable = Yescreate mask = 0600browseable = No[print$]comment = Printer Driverspath = /var/lib/samba/driverswrite list = @printadmin rootforce group = @printadmincreate mask = 0664directory mask = 0775
[smb_share]comment = samba servicepath = /samba/shareguest ok = nowritable = yes
[root@mysql ~]# systemctl start smbd
Failed to start smbd.service: Unit not found.
[root@mysql ~]# useradd user01
[root@mysql ~]# smbpasswd -a user01
New SMB password:
Retype new SMB password:
Added user user01.
[root@mysql ~]# systemctl start nmbd
Failed to start nmbd.service: Unit not found.
[root@mysql ~]# rpm -ql samba
/etc/openldap/schema
/etc/openldap/schema/samba.schema
/etc/pam.d/samba
/usr/bin/smbstatus
/usr/lib/systemd/system/nmb.service
/usr/lib/systemd/system/smb.service
/usr/lib64/samba/auth
/usr/lib64/samba/auth/script.so
/usr/lib64/samba/auth/unix.so
/usr/lib64/samba/vfs
/usr/lib64/samba/vfs/acl_tdb.so
/usr/lib64/samba/vfs/acl_xattr.so
/usr/lib64/samba/vfs/aio_fork.so
/usr/lib64/samba/vfs/aio_pthread.so
/usr/lib64/samba/vfs/audit.so
/usr/lib64/samba/vfs/btrfs.so
/usr/lib64/samba/vfs/cap.so
/usr/lib64/samba/vfs/catia.so
/usr/lib64/samba/vfs/commit.so
/usr/lib64/samba/vfs/crossrename.so
/usr/lib64/samba/vfs/default_quota.so
/usr/lib64/samba/vfs/dirsort.so
/usr/lib64/samba/vfs/expand_msdfs.so
/usr/lib64/samba/vfs/extd_audit.so
/usr/lib64/samba/vfs/fake_perms.so
/usr/lib64/samba/vfs/fileid.so
/usr/lib64/samba/vfs/fruit.so
/usr/lib64/samba/vfs/full_audit.so
/usr/lib64/samba/vfs/glusterfs_fuse.so
/usr/lib64/samba/vfs/linux_xfs_sgid.so
/usr/lib64/samba/vfs/media_harmony.so
/usr/lib64/samba/vfs/netatalk.so
/usr/lib64/samba/vfs/offline.so
/usr/lib64/samba/vfs/preopen.so
/usr/lib64/samba/vfs/readahead.so
/usr/lib64/samba/vfs/readonly.so
/usr/lib64/samba/vfs/recycle.so
/usr/lib64/samba/vfs/shadow_copy.so
/usr/lib64/samba/vfs/shadow_copy2.so
/usr/lib64/samba/vfs/shell_snap.so
/usr/lib64/samba/vfs/snapper.so
/usr/lib64/samba/vfs/streams_depot.so
/usr/lib64/samba/vfs/streams_xattr.so
/usr/lib64/samba/vfs/syncops.so
/usr/lib64/samba/vfs/time_audit.so
/usr/lib64/samba/vfs/unityed_media.so
/usr/lib64/samba/vfs/virusfilter.so
/usr/lib64/samba/vfs/worm.so
/usr/lib64/samba/vfs/xattr_tdb.so
/usr/sbin/eventlogadm
/usr/sbin/nmbd
/usr/sbin/smbd
/usr/share/doc/samba-4.10.16
/usr/share/doc/samba-4.10.16/LDAP
/usr/share/doc/samba-4.10.16/LDAP/README
/usr/share/doc/samba-4.10.16/LDAP/get_next_oid
/usr/share/doc/samba-4.10.16/LDAP/ol-schema-migrate.pl
/usr/share/doc/samba-4.10.16/LDAP/samba-nds.schema
/usr/share/doc/samba-4.10.16/LDAP/samba-schema-FDS.ldif
/usr/share/doc/samba-4.10.16/LDAP/samba-schema-netscapeds5.x.README
/usr/share/doc/samba-4.10.16/LDAP/samba-schema.IBMSecureWay
/usr/share/doc/samba-4.10.16/LDAP/samba.ldif
/usr/share/doc/samba-4.10.16/LDAP/samba.schema
/usr/share/doc/samba-4.10.16/LDAP/samba.schema.at.IBM-DS
/usr/share/doc/samba-4.10.16/LDAP/samba.schema.oc.IBM-DS
/usr/share/doc/samba-4.10.16/README.downgrade
/usr/share/doc/samba-4.10.16/README.md
/usr/share/doc/samba-4.10.16/WHATSNEW.txt
/usr/share/doc/samba-4.10.16/autofs
/usr/share/doc/samba-4.10.16/autofs/auto.smb
/usr/share/doc/samba-4.10.16/misc
/usr/share/doc/samba-4.10.16/misc/adssearch.pl
/usr/share/doc/samba-4.10.16/misc/check_multiple_LDAP_entries.pl
/usr/share/doc/samba-4.10.16/misc/cldap.pl
/usr/share/doc/samba-4.10.16/misc/extra_smbstatus
/usr/share/doc/samba-4.10.16/misc/wall.perl
/usr/share/doc/samba-4.10.16/printer-accounting
/usr/share/doc/samba-4.10.16/printer-accounting/README
/usr/share/doc/samba-4.10.16/printer-accounting/acct-all
/usr/share/doc/samba-4.10.16/printer-accounting/acct-sum
/usr/share/doc/samba-4.10.16/printer-accounting/hp5-redir
/usr/share/doc/samba-4.10.16/printer-accounting/lp-acct
/usr/share/doc/samba-4.10.16/printer-accounting/printcap
/usr/share/doc/samba-4.10.16/printing
/usr/share/doc/samba-4.10.16/printing/VampireDriversFunctions
/usr/share/doc/samba-4.10.16/printing/prtpub.c
/usr/share/doc/samba-4.10.16/printing/readme.prtpub
/usr/share/doc/samba-4.10.16/printing/smbprint.sysv
/usr/share/licenses/samba-4.10.16
/usr/share/licenses/samba-4.10.16/COPYING
/usr/share/man/man1/smbstatus.1.gz
/usr/share/man/man8/eventlogadm.8.gz
/usr/share/man/man8/nmbd.8.gz
/usr/share/man/man8/smbd.8.gz
/usr/share/man/man8/vfs_acl_tdb.8.gz
/usr/share/man/man8/vfs_acl_xattr.8.gz
/usr/share/man/man8/vfs_aio_fork.8.gz
/usr/share/man/man8/vfs_aio_pthread.8.gz
/usr/share/man/man8/vfs_audit.8.gz
/usr/share/man/man8/vfs_btrfs.8.gz
/usr/share/man/man8/vfs_cap.8.gz
/usr/share/man/man8/vfs_catia.8.gz
/usr/share/man/man8/vfs_commit.8.gz
/usr/share/man/man8/vfs_crossrename.8.gz
/usr/share/man/man8/vfs_default_quota.8.gz
/usr/share/man/man8/vfs_dirsort.8.gz
/usr/share/man/man8/vfs_extd_audit.8.gz
/usr/share/man/man8/vfs_fake_perms.8.gz
/usr/share/man/man8/vfs_fileid.8.gz
/usr/share/man/man8/vfs_fruit.8.gz
/usr/share/man/man8/vfs_full_audit.8.gz
/usr/share/man/man8/vfs_glusterfs_fuse.8.gz
/usr/share/man/man8/vfs_linux_xfs_sgid.8.gz
/usr/share/man/man8/vfs_media_harmony.8.gz
/usr/share/man/man8/vfs_netatalk.8.gz
/usr/share/man/man8/vfs_offline.8.gz
/usr/share/man/man8/vfs_preopen.8.gz
/usr/share/man/man8/vfs_readahead.8.gz
/usr/share/man/man8/vfs_readonly.8.gz
/usr/share/man/man8/vfs_recycle.8.gz
/usr/share/man/man8/vfs_shadow_copy.8.gz
/usr/share/man/man8/vfs_shadow_copy2.8.gz
/usr/share/man/man8/vfs_shell_snap.8.gz
/usr/share/man/man8/vfs_snapper.8.gz
/usr/share/man/man8/vfs_streams_depot.8.gz
/usr/share/man/man8/vfs_streams_xattr.8.gz
/usr/share/man/man8/vfs_syncops.8.gz
/usr/share/man/man8/vfs_time_audit.8.gz
/usr/share/man/man8/vfs_unityed_media.8.gz
/usr/share/man/man8/vfs_virusfilter.8.gz
/usr/share/man/man8/vfs_worm.8.gz
/usr/share/man/man8/vfs_xattr_tdb.8.gz
/var/lib/samba/drivers
/var/spool/samba
[root@mysql ~]# systemctl start nmb
[root@mysql ~]# systemctl start smb
[root@mysql ~]# setfacl -u:user01:rwx /samba/share
Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ...
Try `setfacl --help' for more information.
[root@mysql ~]# setfacl -m u:user01:rwx /samba/share
[root@mysql ~]# smbclient - L 192.168.235.130 -U user01
-bash: smbclient: command not found
[root@mysql ~]# smbclient - L 192.168.235.130 -U user01
-bash: smbclient: command not found
[root@mysql ~]# smbclient
-bash: smbclient: command not found
[root@mysql ~]# smbclient -L 192.168.235.130 -U user01
-bash: smbclient: command not found
[root@mysql ~]# yum install sumba-client
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
No package sumba-client available.
Error: Nothing to do
[root@mysql ~]# yum install samba-client -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package samba-client.x86_64 0:4.10.16-25.el7_9 will be installed
--> Processing Dependency: libsmbclient = 4.10.16-25.el7_9 for package: .x86_64
--> Processing Dependency: libsmbclient.so.0(SMBCLIENT_0.1.0)(64bit) for6-25.el7_9.x86_64
--> Processing Dependency: libsmbclient.so.0()(64bit) for package: samba64
--> Running transaction check
---> Package libsmbclient.x86_64 0:4.10.16-25.el7_9 will be installed
--> Finished Dependency ResolutionDependencies Resolved========================================================================Package                  Arch               Version
========================================================================
Installing:samba-client             x86_64             4.10.16-25.el7_9
Installing for dependencies:libsmbclient             x86_64             4.10.16-25.el7_9Transaction Summary
========================================================================
Install  1 Package (+1 Dependent package)Total download size: 793 k
Installed size: 2.2 M
Downloading packages:
(1/2): libsmbclient-4.10.16-25.el7_9.x86_64.rpm
(2/2): samba-client-4.10.16-25.el7_9.x86_64.rpm
------------------------------------------------------------------------
Total                                                                1.2
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : libsmbclient-4.10.16-25.el7_9.x86_64Installing : samba-client-4.10.16-25.el7_9.x86_64Verifying  : libsmbclient-4.10.16-25.el7_9.x86_64Verifying  : samba-client-4.10.16-25.el7_9.x86_64Installed:samba-client.x86_64 0:4.10.16-25.el7_9Dependency Installed:libsmbclient.x86_64 0:4.10.16-25.el7_9Complete!
[root@mysql ~]# smbclient -L 192.168.235.130 -U user01
Enter SAMBA\user01's password:Sharename       Type      Comment---------       ----      -------print$          Disk      Printer Driverssmb_share       Disk      samba serviceIPC$            IPC       IPC Service (Samba 4.10.16)user01          Disk      Home Directories
Reconnecting with SMB1 for workgroup listing.Server               Comment---------            -------Workgroup            Master---------            -------SAMBA                SAMBA
[root@mysql ~]# smbclient //192.168.235.130/smb_share -U user01
Enter SAMBA\user01's password:
Try "help" to get a list of possible commands.
smb: \> ls.                                   D        0  Sun Jul 13 11:26:37 20..                                  D        0  Sun Jul 13 11:09:53 20新建文本文档.txt              A        0  Sun Jul 13 11:26:37 202517811456 blocks of size 1024. 6097240 blocks available
smb: \> bye
bye: command not found
smb: \> exit
[root@mysql ~]# mount.cifs -o user=user01,pass=123 //192.168.235.130/smb
-bash: mount.cifs: command not found
[root@mysql ~]# mount.cifs -o user=user01,pass=123 //192.168.235.130/smb
-bash: mount.cifs: command not found
[root@mysql ~]# yum install cifs -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
No package cifs available.
Error: Nothing to do
[root@mysql ~]# yum install cifs-util -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
No package cifs-util available.
Error: Nothing to do
[root@mysql ~]# yum install cifs-utils -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package cifs-utils.x86_64 0:6.2-10.el7 will be installed
--> Processing Dependency: keyutils for package: cifs-utils-6.2-10.el7.x
--> Running transaction check
---> Package keyutils.x86_64 0:1.5.8-3.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved========================================================================Package                  Arch                 Version
========================================================================
Installing:cifs-utils               x86_64               6.2-10.el7
Installing for dependencies:keyutils                 x86_64               1.5.8-3.el7Transaction Summary
========================================================================
Install  1 Package (+1 Dependent package)Total download size: 138 k
Installed size: 272 k
Downloading packages:
(1/2): keyutils-1.5.8-3.el7.x86_64.rpm
(2/2): cifs-utils-6.2-10.el7.x86_64.rpm
------------------------------------------------------------------------
Total                                                                260
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : keyutils-1.5.8-3.el7.x86_64Installing : cifs-utils-6.2-10.el7.x86_64Verifying  : keyutils-1.5.8-3.el7.x86_64Verifying  : cifs-utils-6.2-10.el7.x86_64Installed:cifs-utils.x86_64 0:6.2-10.el7Dependency Installed:keyutils.x86_64 0:1.5.8-3.el7Complete!
[root@mysql ~]# mount.cifs -o user=user01,pass-123 //192.168.235.130/smb
Password for user01@//192.168.235.130/smb_share:  ***
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@mysql ~]# ls /u01
lost+found
[root@mysql ~]# df h
df: ‘h’: No such file or directory
[root@mysql ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                 475M     0  475M   0% /dev
tmpfs                    487M     0  487M   0% /dev/shm
tmpfs                    487M  7.7M  479M   2% /run
tmpfs                    487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root   17G   12G  5.9G  66% /
/dev/sda1               1014M  138M  877M  14% /boot
tmpfs                     98M     0   98M   0% /run/user/0
/dev/sdb1                976M  2.6M  907M   1% /u01
/dev/sdb2               1022M  4.0K 1022M   1% /u02
[root@mysql ~]# umonut /u01
-bash: umonut: command not found
[root@mysql ~]# unmount /u01
-bash: unmount: command not found
[root@mysql ~]# umount /u01
[root@mysql ~]# df -j
df: invalid option -- 'j'
Try 'df --help' for more information.
[root@mysql ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                 475M     0  475M   0% /dev
tmpfs                    487M     0  487M   0% /dev/shm
tmpfs                    487M  7.7M  479M   2% /run
tmpfs                    487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root   17G   12G  5.9G  66% /
/dev/sda1               1014M  138M  877M  14% /boot
tmpfs                     98M     0   98M   0% /run/user/0
/dev/sdb2               1022M  4.0K 1022M   1% /u02
[root@mysql ~]# mount.cifs -o user=user01,pass=123 //192.168.235.130/smb
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
[root@mysql ~]# mount -o remount,ro /u02
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
[root@mysql ~]# mount -o remount,ro  /dev/sdb1
mount: can't find /dev/sdb1 in /etc/fstab
[root@mysql ~]# mount -o remount,ro /u01
Password for user01@//192.168.235.130/smb_share:  ***
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
[root@mysql ~]# blkid /dev/sdb1
/dev/sdb1: UUID="5ba1b015-eac3-42f7-88e4-3df90bf21738" TYPE="ext4"
[root@mysql ~]# mkdir /u03
[root@mysql ~]# blkid /dev/sdb2
/dev/sdb2: UUID="FAE6-87AA" TYPE="vfat"
[root@mysql ~]# e2label /dev/sdb1 DISK1
[root@mysql ~]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part├─centos-root 253:0    0   17G  0 lvm  /└─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sdb               8:16   0   10G  0 disk
├─sdb1            8:17   0    1G  0 part
├─sdb2            8:18   0    1G  0 part /u02
├─sdb3            8:19   0    1G  0 part
├─sdb4            8:20   0    1K  0 part
├─sdb5            8:21   0    1G  0 part
├─sdb6            8:22   0    1G  0 part
├─sdb7            8:23   0    1M  0 part
└─sdb8            8:24   0  100M  0 part
sr0              11:0    1  4.4G  0 rom
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
[root@mysql ~]# fdisk -lDisk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x256e2877Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux
/dev/sdb2         2099200     4196351     1048576   83  Linux
/dev/sdb3         4196352     6293503     1048576   83  Linux
/dev/sdb4         6293504    12584959     3145728    5  Extended
/dev/sdb5         6295552     8392703     1048576   83  Linux
/dev/sdb6         8394752    10491903     1048576   83  Linux
/dev/sdb7        10493952    10495999        1024   83  Linux
/dev/sdb8        10498048    10702847      102400   83  LinuxDisk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b6c0bDevice Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    41943039    19921920   8e  Linux LVMDisk /dev/mapper/centos-root: 18.2 GB, 18249416704 bytes, 35643392 secto
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes[root@mysql ~]# blkid /dev/sdb1
/dev/sdb1: LABEL="DISK1" UUID="5ba1b015-eac3-42f7-88e4-3df90bf21738" TYP
[root@mysql ~]# blkid /dev/sdb2
/dev/sdb2: UUID="FAE6-87AA" TYPE="vfat"
[root@mysql ~]# e2labe /dev/sdb2 disk2
-bash: e2labe: command not found
[root@mysql ~]# e2label /dev/sdb2 disk2
e2label: Bad magic number in super-block while trying to open /dev/sdb2
Couldn't find valid filesystem superblock.
[root@mysql ~]# umount /dev/sdb2
[root@mysql ~]# cat /etc/fstab#
# /etc/fstab
# Created by anaconda on Fri Jul 11 20:11:26 2025
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more i
#
/dev/mapper/centos-root /                       xfs     defaults
UUID=c509fbee-3529-4ad6-a530-17176a330aed /boot                   xfs
/dev/mapper/centos-swap swap                    swap    defaults
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
[root@mysql ~]# ls /u01
新建文本文档.txt
[root@mysql ~]# mkdir /share
[root@mysql ~]# yum install npcbind,nfs-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
No package npcbind,nfs-utils available.
Error: Nothing to do
[root@mysql ~]# yum install npcbind nfs-utils -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
No package npcbind available.
Resolving Dependencies
--> Running transaction check
---> Package nfs-utils.x86_64 1:1.3.0-0.68.el7.2 will be installed
--> Processing Dependency: libtirpc >= 0.2.4-0.7 for package: 1:nfs-util
--> Processing Dependency: gssproxy >= 0.7.0-3 for package: 1:nfs-utils-
--> Processing Dependency: rpcbind for package: 1:nfs-utils-1.3.0-0.68.e
--> Processing Dependency: quota for package: 1:nfs-utils-1.3.0-0.68.el7
--> Processing Dependency: libnfsidmap for package: 1:nfs-utils-1.3.0-0.
--> Processing Dependency: libevent for package: 1:nfs-utils-1.3.0-0.68.
--> Processing Dependency: libtirpc.so.1()(64bit) for package: 1:nfs-uti
--> Processing Dependency: libnfsidmap.so.0()(64bit) for package: 1:nfs-
--> Processing Dependency: libevent-2.0.so.5()(64bit) for package: 1:nfs4
--> Running transaction check
---> Package gssproxy.x86_64 0:0.7.0-30.el7_9 will be installed
--> Processing Dependency: libini_config >= 1.3.1-31 for package: gsspro
--> Processing Dependency: libverto-module-base for package: gssproxy-0.
--> Processing Dependency: libref_array.so.1(REF_ARRAY_0.1.1)(64bit) forl7_9.x86_64
--> Processing Dependency: libini_config.so.3(INI_CONFIG_1.2.0)(64bit) f.el7_9.x86_64
--> Processing Dependency: libini_config.so.3(INI_CONFIG_1.1.0)(64bit) f.el7_9.x86_64
--> Processing Dependency: libref_array.so.1()(64bit) for package: gsspr
--> Processing Dependency: libini_config.so.3()(64bit) for package: gssp
--> Processing Dependency: libcollection.so.2()(64bit) for package: gssp
--> Processing Dependency: libbasicobjects.so.0()(64bit) for package: gs
---> Package libevent.x86_64 0:2.0.21-4.el7 will be installed
---> Package libnfsidmap.x86_64 0:0.25-19.el7 will be installed
---> Package libtirpc.x86_64 0:0.2.4-0.16.el7 will be installed
---> Package quota.x86_64 1:4.01-19.el7 will be installed
--> Processing Dependency: quota-nls = 1:4.01-19.el7 for package: 1:quot
--> Processing Dependency: tcp_wrappers for package: 1:quota-4.01-19.el7
---> Package rpcbind.x86_64 0:0.2.0-49.el7 will be installed
--> Running transaction check
---> Package libbasicobjects.x86_64 0:0.1.1-32.el7 will be installed
---> Package libcollection.x86_64 0:0.7.0-32.el7 will be installed
---> Package libini_config.x86_64 0:1.3.1-32.el7 will be installed
--> Processing Dependency: libpath_utils.so.1(PATH_UTILS_0.2.1)(64bit) f.1-32.el7.x86_64
--> Processing Dependency: libpath_utils.so.1()(64bit) for package: libi
---> Package libref_array.x86_64 0:0.1.5-32.el7 will be installed
---> Package libverto-tevent.x86_64 0:0.2.5-4.el7 will be installed
---> Package quota-nls.noarch 1:4.01-19.el7 will be installed
---> Package tcp_wrappers.x86_64 0:7.6-77.el7 will be installed
--> Running transaction check
---> Package libpath_utils.x86_64 0:0.2.1-32.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved========================================================================Package                    Arch              Version
========================================================================
Installing:nfs-utils                  x86_64            1:1.3.0-0.68.el7.2
Installing for dependencies:gssproxy                   x86_64            0.7.0-30.el7_9libbasicobjects            x86_64            0.1.1-32.el7libcollection              x86_64            0.7.0-32.el7libevent                   x86_64            2.0.21-4.el7libini_config              x86_64            1.3.1-32.el7libnfsidmap                x86_64            0.25-19.el7libpath_utils              x86_64            0.2.1-32.el7libref_array               x86_64            0.1.5-32.el7libtirpc                   x86_64            0.2.4-0.16.el7libverto-tevent            x86_64            0.2.5-4.el7quota                      x86_64            1:4.01-19.el7quota-nls                  noarch            1:4.01-19.el7rpcbind                    x86_64            0.2.0-49.el7tcp_wrappers               x86_64            7.6-77.el7Transaction Summary
========================================================================
Install  1 Package (+14 Dependent packages)Total download size: 1.4 M
Installed size: 4.2 M
Downloading packages:
(1/15): libbasicobjects-0.1.1-32.el7.x86_64.rpm
(2/15): libcollection-0.7.0-32.el7.x86_64.rpm
(3/15): libevent-2.0.21-4.el7.x86_64.rpm
(4/15): libini_config-1.3.1-32.el7.x86_64.rpm
(5/15): libnfsidmap-0.25-19.el7.x86_64.rpm
(6/15): libpath_utils-0.2.1-32.el7.x86_64.rpm
(7/15): libref_array-0.1.5-32.el7.x86_64.rpm
(8/15): libtirpc-0.2.4-0.16.el7.x86_64.rpm
(9/15): gssproxy-0.7.0-30.el7_9.x86_64.rpm
(10/15): libverto-tevent-0.2.5-4.el7.x86_64.rpm
(11/15): quota-4.01-19.el7.x86_64.rpm
(12/15): rpcbind-0.2.0-49.el7.x86_64.rpm
(13/15): tcp_wrappers-7.6-77.el7.x86_64.rpm
(14/15): nfs-utils-1.3.0-0.68.el7.2.x86_64.rpm
(15/15): quota-nls-4.01-19.el7.noarch.rpm
------------------------------------------------------------------------
Total                                                                845
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : libbasicobjects-0.1.1-32.el7.x86_64Installing : libref_array-0.1.5-32.el7.x86_64Installing : libcollection-0.7.0-32.el7.x86_64Installing : libtirpc-0.2.4-0.16.el7.x86_64Installing : rpcbind-0.2.0-49.el7.x86_64Installing : 1:quota-nls-4.01-19.el7.noarchInstalling : tcp_wrappers-7.6-77.el7.x86_64Installing : 1:quota-4.01-19.el7.x86_64Installing : libevent-2.0.21-4.el7.x86_64Installing : libnfsidmap-0.25-19.el7.x86_64Installing : libpath_utils-0.2.1-32.el7.x86_64Installing : libini_config-1.3.1-32.el7.x86_64Installing : libverto-tevent-0.2.5-4.el7.x86_64Installing : gssproxy-0.7.0-30.el7_9.x86_64Installing : 1:nfs-utils-1.3.0-0.68.el7.2.x86_64Verifying  : libtirpc-0.2.4-0.16.el7.x86_64Verifying  : gssproxy-0.7.0-30.el7_9.x86_64Verifying  : 1:quota-4.01-19.el7.x86_64Verifying  : libverto-tevent-0.2.5-4.el7.x86_64Verifying  : libpath_utils-0.2.1-32.el7.x86_64Verifying  : libnfsidmap-0.25-19.el7.x86_64Verifying  : libevent-2.0.21-4.el7.x86_64Verifying  : tcp_wrappers-7.6-77.el7.x86_64Verifying  : libcollection-0.7.0-32.el7.x86_64Verifying  : 1:quota-nls-4.01-19.el7.noarchVerifying  : libref_array-0.1.5-32.el7.x86_64Verifying  : libbasicobjects-0.1.1-32.el7.x86_64Verifying  : 1:nfs-utils-1.3.0-0.68.el7.2.x86_64Verifying  : libini_config-1.3.1-32.el7.x86_64Verifying  : rpcbind-0.2.0-49.el7.x86_64Installed:nfs-utils.x86_64 1:1.3.0-0.68.el7.2Dependency Installed:gssproxy.x86_64 0:0.7.0-30.el7_9                 libbasicobjects.x86_6libcollection.x86_64 0:0.7.0-32.el7              libevent.x86_64 0:2.0libini_config.x86_64 0:1.3.1-32.el7              libnfsidmap.x86_64 0:libpath_utils.x86_64 0:0.2.1-32.el7              libref_array.x86_64 0libtirpc.x86_64 0:0.2.4-0.16.el7                 libverto-tevent.x86_6quota.x86_64 1:4.01-19.el7                       quota-nls.noarch 1:4.rpcbind.x86_64 0:0.2.0-49.el7                    tcp_wrappers.x86_64 0Complete!
[root@mysql ~]# vim /etc/exports
[root@mysql ~]# cat /etc/exports
/share  192.168.235.0/24(rw,sync)
[root@mysql ~]# systemctl start nfs
[root@mysql ~]# systemctl start npcbind
Failed to start npcbind.service: Unit not found.
[root@mysql ~]# systemctl start rpcbind
[root@mysql ~]# ss -naltp |grep 111
LISTEN     0      128          *:111                      *:*           =2594,fd=8))
LISTEN     0      128       [::]:111                   [::]:*           =2594,fd=11))
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
[root@mysql ~]# mount /dev/sdb2 /u02
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
[root@mysql ~]# blkid /dev/sdb2
/dev/sdb2: UUID="FAE6-87AA" TYPE="vfat"
[root@mysql ~]# mount -o remount,ro /u02
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
[root@mysql ~]# mount -o remount,ro /dev/sdb2
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
[root@mysql ~]# fdisk -lDisk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x256e2877Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux
/dev/sdb2         2099200     4196351     1048576   83  Linux
/dev/sdb3         4196352     6293503     1048576   83  Linux
/dev/sdb4         6293504    12584959     3145728    5  Extended
/dev/sdb5         6295552     8392703     1048576   83  Linux
/dev/sdb6         8394752    10491903     1048576   83  Linux
/dev/sdb7        10493952    10495999        1024   83  Linux
/dev/sdb8        10498048    10702847      102400   83  LinuxDisk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b6c0bDevice Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    41943039    19921920   8e  Linux LVMDisk /dev/mapper/centos-root: 18.2 GB, 18249416704 bytes, 35643392 secto
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes[root@mysql ~]# blkid /dev/sdb1
/dev/sdb1: LABEL="DISK1" UUID="5ba1b015-eac3-42f7-88e4-3df90bf21738" TYP
[root@mysql ~]# e2label /dev/sdb1 dd1
[root@mysql ~]# blkid /dev/sdb1
/dev/sdb1: LABEL="dd1" UUID="5ba1b015-eac3-42f7-88e4-3df90bf21738" TYPE=
[root@mysql ~]# blkid /dev/sdb2
/dev/sdb2: UUID="FAE6-87AA" TYPE="vfat"
[root@mysql ~]# e2label /dev/sdb2 dd2
e2label: Bad magic number in super-block while trying to open /dev/sdb2
Couldn't find valid filesystem superblock.
[root@mysql ~]# umount /u02
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
[root@mysql ~]# mount /dev/sdb2 /u02
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
[root@mysql ~]# umount /dev/sdb2
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
[root@mysql ~]# cat /etc/vstab
cat: /etc/vstab: No such file or directory
[root@mysql ~]# cat /etc/fstab#
# /etc/fstab
# Created by anaconda on Fri Jul 11 20:11:26 2025
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more i
#
/dev/mapper/centos-root /                       xfs     defaults
UUID=c509fbee-3529-4ad6-a530-17176a330aed /boot                   xfs
/dev/mapper/centos-swap swap                    swap    defaults
[root@mysql ~]# vim /etc/fstab
[root@mysql ~]# cat /etc/fstab#
# /etc/fstab
# Created by anaconda on Fri Jul 11 20:11:26 2025
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more i
#
/dev/mapper/centos-root /                       xfs     defaults
UUID=c509fbee-3529-4ad6-a530-17176a330aed /boot                   xfs
/dev/mapper/centos-swap swap                    swap    defaults
/dev/sdb2               /u02                    vfat    defaults,rw
[root@mysql ~]# mount -a
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
[root@mysql ~]# fsck -f /dev/sdb2
fsck from util-linux 2.23.2
fsck.fat 3.0.20 (12 Jun 2013)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may
1) Remove dirty bit
2) No action
? exit
Invalid input.
? ^C[root@mysql ~]#
[root@mysql ~]# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=485840k,nr_inodes=121460,
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noex
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,nls)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,rel
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,rel
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relat
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relati
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,rel
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,rela
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,rela
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mapper/centos-root on / type xfs (rw,relatime,attr2,inode64,noquota
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=32,pgrroto=5,direct,pipe_ino=13740)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /boot type xfs (rw,relatime,attr2,inode64,noquota)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=99572k,mo
//192.168.235.130/smb_share on /u01 type cifs (ro,relatime,vers=default,domain=MYSQL,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.235.130,file,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
/dev/sdb2 on /u02 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage==mixed,errors=remount-ro)
[root@mysql ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.7M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  4.0K 1022M   1% /u02
[root@mysql ~]# cd /u02
[root@mysql u02]# touch 2.sh
[root@mysql u02]# echo hostname >/u02/2.sh
[root@mysql u02]# ls
2.sh
[root@mysql u02]# chmod +x 2.sh
[root@mysql u02]# /u02/2.sh
mysql.cn
[root@mysql u02]# cat /etc/rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.touch /var/lock/subsys/local
mount -o ro /etc/sr0 /mnt
[root@mysql u02]# yum install autofs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package autofs.x86_64 1:5.0.7-116.el7_9.1 will be installed
--> Processing Dependency: libhesiod.so.0()(64bit) for package: 1:autofs
--> Running transaction check
---> Package hesiod.x86_64 0:3.2.1-3.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved========================================================================Package             Arch                Version
========================================================================
Installing:autofs              x86_64              1:5.0.7-116.el7_9.1
Installing for dependencies:hesiod              x86_64              3.2.1-3.el7Transaction Summary
========================================================================
Install  1 Package (+1 Dependent package)Total download size: 864 k
Installed size: 5.2 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): autofs-5.0.7-116.el7_9.1.x86_64.rpm
(2/2): hesiod-3.2.1-3.el7.x86_64.rpm
------------------------------------------------------------------------
Total                                                                1.1
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : hesiod-3.2.1-3.el7.x86_64Installing : 1:autofs-5.0.7-116.el7_9.1.x86_64Verifying  : hesiod-3.2.1-3.el7.x86_64Verifying  : 1:autofs-5.0.7-116.el7_9.1.x86_64Installed:autofs.x86_64 1:5.0.7-116.el7_9.1Dependency Installed:hesiod.x86_64 0:3.2.1-3.el7Complete!
[root@mysql u02]# rpm -ql autofs
/etc/auto.master
/etc/auto.master.d
/etc/auto.misc
/etc/auto.net
/etc/auto.smb
/etc/autofs.conf
/etc/autofs_ldap_auth.conf
/etc/sysconfig/autofs
/usr/lib/systemd/system/autofs.service
/usr/lib64/autofs
/usr/lib64/autofs/lookup_dir.so
/usr/lib64/autofs/lookup_file.so
/usr/lib64/autofs/lookup_files.so
/usr/lib64/autofs/lookup_hesiod.so
/usr/lib64/autofs/lookup_hosts.so
/usr/lib64/autofs/lookup_ldap.so
/usr/lib64/autofs/lookup_ldaps.so
/usr/lib64/autofs/lookup_multi.so
/usr/lib64/autofs/lookup_nis.so
/usr/lib64/autofs/lookup_nisplus.so
/usr/lib64/autofs/lookup_program.so
/usr/lib64/autofs/lookup_sss.so
/usr/lib64/autofs/lookup_userhome.so
/usr/lib64/autofs/lookup_yp.so
/usr/lib64/autofs/mount_afs.so
/usr/lib64/autofs/mount_autofs.so
/usr/lib64/autofs/mount_bind.so
/usr/lib64/autofs/mount_changer.so
/usr/lib64/autofs/mount_ext2.so
/usr/lib64/autofs/mount_ext3.so
/usr/lib64/autofs/mount_ext4.so
/usr/lib64/autofs/mount_generic.so
/usr/lib64/autofs/mount_nfs.so
/usr/lib64/autofs/mount_nfs4.so
/usr/lib64/autofs/parse_amd.so
/usr/lib64/autofs/parse_hesiod.so
/usr/lib64/autofs/parse_sun.so
/usr/sbin/automount
/usr/share/doc/autofs-5.0.7
/usr/share/doc/autofs-5.0.7/COPYING
/usr/share/doc/autofs-5.0.7/COPYRIGHT
/usr/share/doc/autofs-5.0.7/CREDITS
/usr/share/doc/autofs-5.0.7/INSTALL
/usr/share/doc/autofs-5.0.7/README
/usr/share/doc/autofs-5.0.7/README.active-restart
/usr/share/doc/autofs-5.0.7/README.amd-maps
/usr/share/doc/autofs-5.0.7/README.autofs-schema
/usr/share/doc/autofs-5.0.7/README.changer
/usr/share/doc/autofs-5.0.7/README.ncpfs
/usr/share/doc/autofs-5.0.7/README.replicated-server
/usr/share/doc/autofs-5.0.7/README.smbfs
/usr/share/doc/autofs-5.0.7/README.v5.release
/usr/share/doc/autofs-5.0.7/autofs.schema
/usr/share/doc/autofs-5.0.7/autofs.schema.new
/usr/share/doc/autofs-5.0.7/autofs4-2.6.18-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.18-v5-update-20100114.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.19-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.19-v5-update-20100114.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.20-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.21-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.22-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.22.17-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.23-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.24-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.24.4-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.25-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.26-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.27-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.28-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/autofs4-2.6.29-v5-update-20090903.patch
/usr/share/doc/autofs-5.0.7/ldap-automount-auto.direct
/usr/share/doc/autofs-5.0.7/ldap-automount-auto.indirect
/usr/share/doc/autofs-5.0.7/ldap-automount-auto.master
/usr/share/doc/autofs-5.0.7/ldap-automount-rfc2307-bis-auto.direct
/usr/share/doc/autofs-5.0.7/ldap-automount-rfc2307-bis-auto.indirect
/usr/share/doc/autofs-5.0.7/ldap-automount-rfc2307-bis-auto.master
/usr/share/doc/autofs-5.0.7/ldap-automount-rfc2307-bis-old-style-auto.ma
/usr/share/doc/autofs-5.0.7/ldap-nis-auto.direct
/usr/share/doc/autofs-5.0.7/ldap-nis-auto.indirect
/usr/share/doc/autofs-5.0.7/ldap-nis-auto.master
/usr/share/doc/autofs-5.0.7/util-linux-2.12a-flock.patch
/usr/share/doc/autofs-5.0.7/util-linux-2.12q-flock.patch
/usr/share/man/man5/auto.master.5.gz
/usr/share/man/man5/autofs.5.gz
/usr/share/man/man5/autofs.conf.5.gz
/usr/share/man/man5/autofs_ldap_auth.conf.5.gz
/usr/share/man/man8/autofs.8.gz
/usr/share/man/man8/automount.8.gz
[root@mysql u02]# cat /etc/auto.master
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/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
# The included files must conform to the format of this file.
#
+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
[root@mysql u02]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.8M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  8.0K 1022M   1% /u02
[root@mysql u02]# vim /etc/auto.master
[root@mysql u02]# cat /etc/auto.master
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/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
# The included files must conform to the format of this file.
#
+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
/u03 /etc/auto.test -t 120
[root@mysql u02]# blkid /dev/sdb1
/dev/sdb1: LABEL="dd1" UUID="5ba1b015-eac3-42f7-88e4-3df90bf21738" TYPE=
[root@mysql u02]# vim /etc/auto.test
[root@mysql u02]# cat /etc/auto.test
test -fstype=ext4,ro :/dev/sdb5
[root@mysql u02]# service autofs restart
Redirecting to /bin/systemctl restart autofs.service
[root@mysql u02]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.8M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  8.0K 1022M   1% /u02
[root@mysql u02]# blkid /dev/sdb5
[root@mysql u02]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part├─centos-root 253:0    0   17G  0 lvm  /└─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sdb               8:16   0   10G  0 disk
├─sdb1            8:17   0    1G  0 part
├─sdb2            8:18   0    1G  0 part /u02
├─sdb3            8:19   0    1G  0 part
├─sdb4            8:20   0    1K  0 part
├─sdb5            8:21   0    1G  0 part
├─sdb6            8:22   0    1G  0 part
├─sdb7            8:23   0    1M  0 part
└─sdb8            8:24   0  100M  0 part
sr0              11:0    1  4.4G  0 rom
[root@mysql u02]# mkfs.ext4 /dev/sdb5
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:32768, 98304, 163840, 229376Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done[root@mysql u02]# blkid /dev/sdb5
/dev/sdb5: UUID="a577b24e-d9ba-43fb-81ab-5632fe2d3848" TYPE="ext4"
[root@mysql u02]# sevice autofs restart
-bash: sevice: command not found
[root@mysql u02]# service autofs restart
Redirecting to /bin/systemctl restart autofs.service
[root@mysql u02]# cat /etc/auto.master
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/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
# The included files must conform to the format of this file.
#
+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
/u03 /etc/auto.test -t 120
[root@mysql u02]# cat /etc/auto.test
test -fstype=ext4,ro :/dev/sdb5
[root@mysql u02]# ls /u03
[root@mysql u02]# ls /u03/test
lost+found
[root@mysql u02]# cat /etc/fastb
cat: /etc/fastb: No such file or directory
[root@mysql u02]# cat /etc/fstab#
# /etc/fstab
# Created by anaconda on Fri Jul 11 20:11:26 2025
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more i
#
/dev/mapper/centos-root /                       xfs     defaults
UUID=c509fbee-3529-4ad6-a530-17176a330aed /boot                   xfs
/dev/mapper/centos-swap swap                    swap    defaults
/dev/sdb2               /u02                    vfat    defaults,rw
[root@mysql u02]# cat /etc/auto.master
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/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
# The included files must conform to the format of this file.
#
+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
/u03 /etc/auto.test -t 120
[root@mysql u02]# cat /etc/auto.test
test -fstype=ext4,ro :/dev/sdb5
[root@mysql u02]# ls /u03
test
[root@mysql u02]# ls /u03/test
lost+found
[root@mysql u02]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     475M     0  475M   0% /dev
tmpfs                        487M     0  487M   0% /dev/shm
tmpfs                        487M  7.8M  479M   2% /run
tmpfs                        487M     0  487M   0% /sys/fs/cgroup
/dev/mapper/centos-root       17G   12G  5.9G  66% /
/dev/sda1                   1014M  138M  877M  14% /boot
tmpfs                         98M     0   98M   0% /run/user/0
//192.168.235.130/smb_share   17G   12G  5.9G  66% /u01
/dev/sdb2                   1022M  8.0K 1022M   1% /u02
/dev/sdb5                    976M  2.6M  907M   1% /u03/test
[root@mysql u02]#
Network error: Software caused connection abort────────────────────────────────────────────────────────────────────────Session stopped- Press <Return> to exit tab- Press R to restart session- Press S to save terminal output to file

samba
192.168.235.10

┌──────────────────────────────────────────────────────────────────────┐│                 • MobaXterm Personal Edition v23.2 •                 ││               (SSH client, X server and network tools)               ││                                                                      ││ ⮞ SSH session to code@192.168.235.10                                 ││   • Direct SSH      :  ✓                                             ││   • SSH compression :  ✓                                             ││   • SSH-browser     :  ✓                                             ││   • X11-forwarding  :(remote display is forwarded through SSH)  ││                                                                      ││ ⮞ For more info, ctrl+click on help or visit our website.            │└──────────────────────────────────────────────────────────────────────┘Last login: Sat Jul 12 19:58:05 2025 from 192.168.235.1
[code@samba ~]$ hostname
samba.web.cn
[code@samba ~]$ ip
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }ip [ -force ] -batch filename
where  OBJECT := { link | address | addrlabel | route | rule | neigh | ntable |tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm |netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila |vrf }OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |-h[uman-readable] | -iec |-f[amily] { inet | inet6 | ipx | dnet | mpls | bridge | link } |-4 | -6 | -I | -D | -B | -0 |-l[oops] { maximum-addr-flush-attempts } | -br[ief] |-o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |-rc[vbuf] [size] | -n[etns] name | -a[ll] | -c[olor]}
[code@samba ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lovalid_lft forever preferred_lft foreverinet6 ::1/128 scope hostvalid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000link/ether 00:0c:29:d6:84:b3 brd ff:ff:ff:ff:ff:ffinet 192.168.235.10/24 brd 192.168.235.255 scope global ens33valid_lft forever preferred_lft foreverinet6 fe80::20c:29ff:fed6:84b3/64 scope linkvalid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000link/ether 52:54:00:d1:59:30 brd ff:ff:ff:ff:ff:ffinet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000link/ether 52:54:00:d1:59:30 brd ff:ff:ff:ff:ff:ff
[code@samba ~]$ systemctl ststus firewalld
Unknown operation 'ststus'.
[code@samba ~]$ systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemonLoaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)Active: inactive (dead)Docs: man:firewalld(1)
[code@samba ~]$ setenforce 0
setenforce:  setenforce() failed
[code@samba ~]$ su - caozx26
密码:
上一次登录:六 712 20:37:52 CST 2025pts/1 上
[caozx26@samba ~]$ sudo su
[sudo] caozx26 的密码:
对不起,请重试。
[sudo] caozx26 的密码:
[root@samba caozx26]# setenforce 0
[root@samba caozx26]# cat /etc/selinux/config# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted[root@samba caozx26]# yum repolist
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
源标识                                源名称                                   状态
!local1                               local yum                                4,070
repolist: 4,070
[root@samba caozx26]# rpm -ql samba
/etc/openldap/schema
/etc/openldap/schema/samba.schema
/etc/pam.d/samba
/usr/bin/smbstatus
/usr/lib/systemd/system/nmb.service
/usr/lib/systemd/system/smb.service
/usr/lib64/samba/auth
/usr/lib64/samba/auth/script.so
/usr/lib64/samba/auth/unix.so
/usr/lib64/samba/vfs
/usr/lib64/samba/vfs/acl_tdb.so
/usr/lib64/samba/vfs/acl_xattr.so
/usr/lib64/samba/vfs/aio_fork.so
/usr/lib64/samba/vfs/aio_pthread.so
/usr/lib64/samba/vfs/audit.so
/usr/lib64/samba/vfs/btrfs.so
/usr/lib64/samba/vfs/cap.so
/usr/lib64/samba/vfs/catia.so
/usr/lib64/samba/vfs/commit.so
/usr/lib64/samba/vfs/crossrename.so
/usr/lib64/samba/vfs/default_quota.so
/usr/lib64/samba/vfs/dirsort.so
/usr/lib64/samba/vfs/expand_msdfs.so
/usr/lib64/samba/vfs/extd_audit.so
/usr/lib64/samba/vfs/fake_perms.so
/usr/lib64/samba/vfs/fileid.so
/usr/lib64/samba/vfs/fruit.so
/usr/lib64/samba/vfs/full_audit.so
/usr/lib64/samba/vfs/glusterfs_fuse.so
/usr/lib64/samba/vfs/linux_xfs_sgid.so
/usr/lib64/samba/vfs/media_harmony.so
/usr/lib64/samba/vfs/netatalk.so
/usr/lib64/samba/vfs/offline.so
/usr/lib64/samba/vfs/preopen.so
/usr/lib64/samba/vfs/readahead.so
/usr/lib64/samba/vfs/readonly.so
/usr/lib64/samba/vfs/recycle.so
/usr/lib64/samba/vfs/shadow_copy.so
/usr/lib64/samba/vfs/shadow_copy2.so
/usr/lib64/samba/vfs/shell_snap.so
/usr/lib64/samba/vfs/snapper.so
/usr/lib64/samba/vfs/streams_depot.so
/usr/lib64/samba/vfs/streams_xattr.so
/usr/lib64/samba/vfs/syncops.so
/usr/lib64/samba/vfs/time_audit.so
/usr/lib64/samba/vfs/unityed_media.so
/usr/lib64/samba/vfs/virusfilter.so
/usr/lib64/samba/vfs/worm.so
/usr/lib64/samba/vfs/xattr_tdb.so
/usr/sbin/eventlogadm
/usr/sbin/nmbd
/usr/sbin/smbd
/usr/share/doc/samba-4.10.16
/usr/share/doc/samba-4.10.16/LDAP
/usr/share/doc/samba-4.10.16/LDAP/README
/usr/share/doc/samba-4.10.16/LDAP/get_next_oid
/usr/share/doc/samba-4.10.16/LDAP/ol-schema-migrate.pl
/usr/share/doc/samba-4.10.16/LDAP/samba-nds.schema
/usr/share/doc/samba-4.10.16/LDAP/samba-schema-FDS.ldif
/usr/share/doc/samba-4.10.16/LDAP/samba-schema-netscapeds5.x.README
/usr/share/doc/samba-4.10.16/LDAP/samba-schema.IBMSecureWay
/usr/share/doc/samba-4.10.16/LDAP/samba.ldif
/usr/share/doc/samba-4.10.16/LDAP/samba.schema
/usr/share/doc/samba-4.10.16/LDAP/samba.schema.at.IBM-DS
/usr/share/doc/samba-4.10.16/LDAP/samba.schema.oc.IBM-DS
/usr/share/doc/samba-4.10.16/README.downgrade
/usr/share/doc/samba-4.10.16/README.md
/usr/share/doc/samba-4.10.16/WHATSNEW.txt
/usr/share/doc/samba-4.10.16/autofs
/usr/share/doc/samba-4.10.16/autofs/auto.smb
/usr/share/doc/samba-4.10.16/misc
/usr/share/doc/samba-4.10.16/misc/adssearch.pl
/usr/share/doc/samba-4.10.16/misc/check_multiple_LDAP_entries.pl
/usr/share/doc/samba-4.10.16/misc/cldap.pl
/usr/share/doc/samba-4.10.16/misc/extra_smbstatus
/usr/share/doc/samba-4.10.16/misc/wall.perl
/usr/share/doc/samba-4.10.16/printer-accounting
/usr/share/doc/samba-4.10.16/printer-accounting/README
/usr/share/doc/samba-4.10.16/printer-accounting/acct-all
/usr/share/doc/samba-4.10.16/printer-accounting/acct-sum
/usr/share/doc/samba-4.10.16/printer-accounting/hp5-redir
/usr/share/doc/samba-4.10.16/printer-accounting/lp-acct
/usr/share/doc/samba-4.10.16/printer-accounting/printcap
/usr/share/doc/samba-4.10.16/printing
/usr/share/doc/samba-4.10.16/printing/VampireDriversFunctions
/usr/share/doc/samba-4.10.16/printing/prtpub.c
/usr/share/doc/samba-4.10.16/printing/readme.prtpub
/usr/share/doc/samba-4.10.16/printing/smbprint.sysv
/usr/share/licenses/samba-4.10.16
/usr/share/licenses/samba-4.10.16/COPYING
/usr/share/man/man1/smbstatus.1.gz
/usr/share/man/man8/eventlogadm.8.gz
/usr/share/man/man8/nmbd.8.gz
/usr/share/man/man8/smbd.8.gz
/usr/share/man/man8/vfs_acl_tdb.8.gz
/usr/share/man/man8/vfs_acl_xattr.8.gz
/usr/share/man/man8/vfs_aio_fork.8.gz
/usr/share/man/man8/vfs_aio_pthread.8.gz
/usr/share/man/man8/vfs_audit.8.gz
/usr/share/man/man8/vfs_btrfs.8.gz
/usr/share/man/man8/vfs_cap.8.gz
/usr/share/man/man8/vfs_catia.8.gz
/usr/share/man/man8/vfs_commit.8.gz
/usr/share/man/man8/vfs_crossrename.8.gz
/usr/share/man/man8/vfs_default_quota.8.gz
/usr/share/man/man8/vfs_dirsort.8.gz
/usr/share/man/man8/vfs_extd_audit.8.gz
/usr/share/man/man8/vfs_fake_perms.8.gz
/usr/share/man/man8/vfs_fileid.8.gz
/usr/share/man/man8/vfs_fruit.8.gz
/usr/share/man/man8/vfs_full_audit.8.gz
/usr/share/man/man8/vfs_glusterfs_fuse.8.gz
/usr/share/man/man8/vfs_linux_xfs_sgid.8.gz
/usr/share/man/man8/vfs_media_harmony.8.gz
/usr/share/man/man8/vfs_netatalk.8.gz
/usr/share/man/man8/vfs_offline.8.gz
/usr/share/man/man8/vfs_preopen.8.gz
/usr/share/man/man8/vfs_readahead.8.gz
/usr/share/man/man8/vfs_readonly.8.gz
/usr/share/man/man8/vfs_recycle.8.gz
/usr/share/man/man8/vfs_shadow_copy.8.gz
/usr/share/man/man8/vfs_shadow_copy2.8.gz
/usr/share/man/man8/vfs_shell_snap.8.gz
/usr/share/man/man8/vfs_snapper.8.gz
/usr/share/man/man8/vfs_streams_depot.8.gz
/usr/share/man/man8/vfs_streams_xattr.8.gz
/usr/share/man/man8/vfs_syncops.8.gz
/usr/share/man/man8/vfs_time_audit.8.gz
/usr/share/man/man8/vfs_unityed_media.8.gz
/usr/share/man/man8/vfs_virusfilter.8.gz
/usr/share/man/man8/vfs_worm.8.gz
/usr/share/man/man8/vfs_xattr_tdb.8.gz
/var/lib/samba/drivers
/var/spool/samba
[root@samba caozx26]# rpm -qa |grep samba
samba-common-tools-4.10.16-5.el7.x86_64
samba-client-4.10.16-5.el7.x86_64
samba-common-libs-4.10.16-5.el7.x86_64
samba-libs-4.10.16-5.el7.x86_64
samba-client-libs-4.10.16-5.el7.x86_64
samba-common-4.10.16-5.el7.noarch
samba-4.10.16-5.el7.x86_64
[root@samba caozx26]# rpm -qa |grep ^samba
samba-common-tools-4.10.16-5.el7.x86_64
samba-client-4.10.16-5.el7.x86_64
samba-common-libs-4.10.16-5.el7.x86_64
samba-libs-4.10.16-5.el7.x86_64
samba-client-libs-4.10.16-5.el7.x86_64
samba-common-4.10.16-5.el7.noarch
samba-4.10.16-5.el7.x86_64
[root@samba caozx26]# cat /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.[global]workgroup = SAMBAsecurity = userpassdb backend = tdbsamprinting = cupsprintcap name = cupsload printers = yescups options = raw[homes]comment = Home Directoriesvalid users = %S, %D%w%Sbrowseable = Noread only = Noinherit acls = Yes[printers]comment = All Printerspath = /var/tmpprintable = Yescreate mask = 0600browseable = No[print$]comment = Printer Driverspath = /var/lib/samba/driverswrite list = @printadmin rootforce group = @printadmincreate mask = 0664directory mask = 0775
[smb_share]comment = samba servicepath = /samba/shareguest ok = nowritable = yes
[root@samba caozx26]# ls /samba/share
1.txt  2.txt  6435271d350f980bad2ef3e68e60adf.jpg
[root@samba caozx26]# tail -5 /etc/passwd
apache:x:48:48:Apache:/usr/share/httpd:/sbin/nologin
user01:x:1003:1003::/home/user01:/bin/bash
u02:x:1004:1005::/home/u02:/bin/bash
u03:x:13:48::/home/u03:/bin/bash
mysql:x:987:981::/home/mysql:/sbin/nologin
[root@samba caozx26]# systemctl status nmb
● nmb.service - Samba NMB DaemonLoaded: loaded (/usr/lib/systemd/system/nmb.service; disabled; vendor preset: disabled)Active: active (running) since 日 2025-06-22 09:11:58 CST; 2 weeks 6 days agoDocs: man:nmbd(8)man:samba(7)man:smb.conf(5)Main PID: 13228 (nmbd)Status: "nmbd: ready to serve connections..."Tasks: 1CGroup: /system.slice/nmb.service└─13228 /usr/sbin/nmbd --foreground --no-process-group712 19:55:55 samba.web.cn nmbd[13228]: [2025/07/12 19:55:55.612372,  0] ../...p)
712 19:55:55 samba.web.cn nmbd[13228]:   Packet send failed to 192.168.235.…可达
712 19:55:55 samba.web.cn nmbd[13228]: [2025/07/12 19:55:55.622799,  0] ../...p)
712 19:55:55 samba.web.cn nmbd[13228]:   Packet send failed to 192.168.235.…可达
712 20:01:28 samba.web.cn nmbd[13228]: [2025/07/12 20:01:28.749803,  0] ../...2)
712 20:01:28 samba.web.cn nmbd[13228]:   *****
712 20:01:28 samba.web.cn nmbd[13228]:
712 20:01:28 samba.web.cn nmbd[13228]:   Samba name server SAMBA is now a l...10
712 20:01:28 samba.web.cn nmbd[13228]:
712 20:01:28 samba.web.cn nmbd[13228]:   *****
Hint: Some lines were ellipsized, use -l to show in full.
[root@samba caozx26]# systemctl status smb
● smb.service - Samba SMB DaemonLoaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendor preset: disabled)Active: active (running) since 日 2025-06-22 15:11:52 CST; 2 weeks 6 days agoDocs: man:smbd(8)man:samba(7)man:smb.conf(5)Main PID: 16027 (smbd)Status: "smbd: ready to serve connections..."Tasks: 6CGroup: /system.slice/smb.service├─16027 /usr/sbin/smbd --foreground --no-process-group├─16032 /usr/sbin/smbd --foreground --no-process-group├─16033 /usr/sbin/smbd --foreground --no-process-group├─16035 /usr/sbin/smbd --foreground --no-process-group├─56763 /usr/sbin/smbd --foreground --no-process-group└─63458 /usr/sbin/smbd --foreground --no-process-group622 15:11:51 samba.web.cn systemd[1]: Starting Samba SMB Daemon...
622 15:11:52 samba.web.cn smbd[16027]: [2025/06/22 15:11:52.146584,  0] ../...y)
622 15:11:52 samba.web.cn systemd[1]: Started Samba SMB Daemon.
622 15:11:52 samba.web.cn smbd[16027]:   daemon_ready: daemon 'smbd' finish...ns
Hint: Some lines were ellipsized, use -l to show in full.
[root@samba caozx26]# setfacl -m u:user01:rwx /samba/share
[root@samba caozx26]# smbclient //192.168.235.10/smb_share -U user01
Enter SAMBA\user01's password:
Try "help" to get a list of possible commands.
smb: \> ls.                                   D        0  Sat Jun 28 20:24:03 2025..                                  D        0  Sun Jun 22 09:02:42 20256435271d350f980bad2ef3e68e60adf.jpg      A   224110  Sun Jun 22 16:33:07 20251.txt                               A       40  Sun Jun 22 16:43:00 20252.txt                               A       14  Sat Jun 28 20:19:41 202517811456 blocks of size 1024. 9454404 blocks available
smb: \> exit
[root@samba caozx26]# ls /u01
ls: 无法访问/u01: 没有那个文件或目录
[root@samba caozx26]# mkdir /u01
[root@samba caozx26]# mount.cifs -o user=user01,pass=123 //192.168.235.10/smb_share /u01
[root@samba caozx26]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part├─centos-root 253:0    0   17G  0 lvm  /└─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sr0              11:0    1  4.4G  0 rom  /mnt
[root@samba caozx26]# df -h
文件系统                    容量  已用  可用 已用% 挂载点
devtmpfs                    470M     0  470M    0% /dev
tmpfs                       487M     0  487M    0% /dev/shm
tmpfs                       487M   15M  472M    4% /run
tmpfs                       487M     0  487M    0% /sys/fs/cgroup
/dev/mapper/centos-root      17G  8.0G  9.1G   47% /
/dev/sda1                  1014M  172M  843M   17% /boot
/dev/sr0                    4.4G  4.4G     0  100% /mnt
tmpfs                        98M   40K   98M    1% /run/user/1001
192.168.235.3:/share         17G  5.9G   12G   35% /var/www/html/media
//192.168.235.10/smb_share   17G  8.0G  9.1G   47% /u01
[root@samba caozx26]# cd /samba/share
[root@samba share]# ls
1.txt  2.txt  6435271d350f980bad2ef3e68e60adf.jpg
[root@samba share]# cat 2.txt
1233211333333
1[root@samba share]# cat /etc/smb.conf
cat: /etc/smb.conf: 没有那个文件或目录
[root@samba share]# cat /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.[global]workgroup = SAMBAsecurity = userpassdb backend = tdbsamprinting = cupsprintcap name = cupsload printers = yescups options = raw[homes]comment = Home Directoriesvalid users = %S, %D%w%Sbrowseable = Noread only = Noinherit acls = Yes[printers]comment = All Printerspath = /var/tmpprintable = Yescreate mask = 0600browseable = No[print$]comment = Printer Driverspath = /var/lib/samba/driverswrite list = @printadmin rootforce group = @printadmincreate mask = 0664directory mask = 0775
[smb_share]comment = samba servicepath = /samba/shareguest ok = nowritable = yes
[root@samba share]# setfacl -m user:user01:rwx /samba/share
[root@samba share]# ll -d /samba/share
drwxrwxr-x+ 2 root root 75 6月  28 20:24 /samba/share
[root@samba share]# smbclient -L 192.168.235.10 -U user01
Enter SAMBA\user01's password:Sharename       Type      Comment---------       ----      -------print$          Disk      Printer Driverssmb_share       Disk      samba serviceIPC$            IPC       IPC Service (Samba 4.10.16)user01          Disk      Home Directories
Reconnecting with SMB1 for workgroup listing.Server               Comment---------            -------SAMBA                Samba 4.10.16Workgroup            Master---------            -------SAMBA                SAMBA
[root@samba share]# smbclient -L 192.168.235.10 -U user01
Enter SAMBA\user01's password:Sharename       Type      Comment---------       ----      -------print$          Disk      Printer Driverssmb_share       Disk      samba serviceIPC$            IPC       IPC Service (Samba 4.10.16)user01          Disk      Home Directories
Reconnecting with SMB1 for workgroup listing.Server               Comment---------            -------SAMBA                Samba 4.10.16Workgroup            Master---------            -------SAMBA                SAMBA
[root@samba share]# smbclient //192.168.235.10/smb_share -U user01
Enter SAMBA\user01's password:
Try "help" to get a list of possible commands.
smb: \> ls.                                   D        0  Sat Jun 28 20:24:03 2025..                                  D        0  Sun Jun 22 09:02:42 20256435271d350f980bad2ef3e68e60adf.jpg      A   224110  Sun Jun 22 16:33:07 20251.txt                               A       40  Sun Jun 22 16:43:00 20252.txt                               A       15  Sun Jul 13 09:33:41 202517811456 blocks of size 1024. 9454120 blocks available
smb: \> exit
[root@samba share]# smbclient //192.168.235.10/smb_share -U user01
Enter SAMBA\user01's password:
Try "help" to get a list of possible commands.
smb: \> exit
[root@samba share]# smbclient -L 192.168.235.10 -U user01
Enter SAMBA\user01's password:Sharename       Type      Comment---------       ----      -------print$          Disk      Printer Driverssmb_share       Disk      samba serviceIPC$            IPC       IPC Service (Samba 4.10.16)user01          Disk      Home Directories
Reconnecting with SMB1 for workgroup listing.Server               Comment---------            -------SAMBA                Samba 4.10.16Workgroup            Master---------            -------SAMBA                SAMBA
[root@samba share]# smbclient //192.168.235.10/smb_share -U user01
Enter SAMBA\user01's password:
Try "help" to get a list of possible commands.
smb: \> ls.                                   D        0  Sat Jun 28 20:24:03 2025..                                  D        0  Sun Jun 22 09:02:42 20256435271d350f980bad2ef3e68e60adf.jpg      A   224110  Sun Jun 22 16:33:07 20251.txt                               A       40  Sun Jun 22 16:43:00 20252.txt                               A       15  Sun Jul 13 09:33:41 202517811456 blocks of size 1024. 9454032 blocks available
smb: \> exit
[root@samba share]# ls /u01
1.txt  2.txt  6435271d350f980bad2ef3e68e60adf.jpg
[root@samba share]# mount.cifs -o user=user01,pass=123 //192.168.235.10/smb_share /u01
mount error(16): Device or resource busy
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@samba share]# mount.cifs -o user=user01,pass=123 //192.168.235.10/smb_share /u-1
Couldn't chdir to /u-1: No such file or directory
[root@samba share]# mount.cifs -o user=user01,pass=123 //192.168.235.10/smb_share /u01
mount error(16): Device or resource busy
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@samba share]# cat /etc/host
cat: /etc/host: 没有那个文件或目录
[root@samba share]# find /etc -name *host*
/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_rsa_key.pub
/etc/ssh/ssh_host_ecdsa_key
/etc/ssh/ssh_host_ecdsa_key.pub
/etc/ssh/ssh_host_ed25519_key
/etc/ssh/ssh_host_ed25519_key.pub
/etc/host.conf
/etc/hosts
/etc/hosts.allow
/etc/hosts.deny
/etc/selinux/targeted/active/modules/100/denyhosts
/etc/selinux/targeted/active/modules/100/hostname
/etc/selinux/targeted/active/modules/100/vhostmd
/etc/dbus-1/system.d/org.freedesktop.hostname1.conf
/etc/ghostscript
/etc/samba/lmhosts
/etc/hostname
/etc/avahi/hosts
[root@samba share]# cat /etc/hosts.deny
#
# hosts.deny    This file contains access rules which are used to
#               deny connections to network services that either use
#               the tcp_wrappers library or that have been
#               started through a tcp_wrappers-enabled xinetd.
#
#               The rules in this file can also be set up in
#               /etc/hosts.allow with a 'deny' option instead.
#
#               See 'man 5 hosts_options' and 'man 5 hosts_access'
#               for information on rule syntax.
#               See 'man tcpd' for information on tcp_wrappers
#
vsftpd:192.168.235.3:allow
[root@samba share]# cd /var/www/html
[root@samba html]# ls
index.html  media  meida
[root@samba html]# mkdir /u02
[root@samba html]# df -h
文件系统                    容量  已用  可用 已用% 挂载点
devtmpfs                    470M     0  470M    0% /dev
tmpfs                       487M     0  487M    0% /dev/shm
tmpfs                       487M   15M  472M    4% /run
tmpfs                       487M     0  487M    0% /sys/fs/cgroup
/dev/mapper/centos-root      17G  8.0G  9.1G   47% /
/dev/sda1                  1014M  172M  843M   17% /boot
/dev/sr0                    4.4G  4.4G     0  100% /mnt
tmpfs                        98M   40K   98M    1% /run/user/1001
192.168.235.3:/share         17G  5.9G   12G   35% /var/www/html/media
//192.168.235.10/smb_share   17G  8.0G  9.1G   47% /u01
[root@samba html]# mount.nfs 192.168.235.130:/share /u02
[root@samba html]# df -h
文件系统                    容量  已用  可用 已用% 挂载点
devtmpfs                    470M     0  470M    0% /dev
tmpfs                       487M     0  487M    0% /dev/shm
tmpfs                       487M   15M  472M    4% /run
tmpfs                       487M     0  487M    0% /sys/fs/cgroup
/dev/mapper/centos-root      17G  8.0G  9.1G   47% /
/dev/sda1                  1014M  172M  843M   17% /boot
/dev/sr0                    4.4G  4.4G     0  100% /mnt
tmpfs                        98M   40K   98M    1% /run/user/1001
192.168.235.3:/share         17G  5.9G   12G   35% /var/www/html/media
//192.168.235.10/smb_share   17G  8.0G  9.1G   47% /u01
192.168.235.130:/share       17G   12G  5.9G   66% /u02
[root@samba html]# ls u02
ls: 无法访问u02: 没有那个文件或目录
[root@samba html]# ls /u02
[root@samba html]#
Network error: Software caused connection abort

192.168.235.20

root@192.168.235.20's password:
▒▒▒ʱ▒▒ܾ▒
root@192.168.235.20's password:┌────────────────────────────────────────────────────────────────────┐│                        • MobaXterm 20.0 •                          ││            (SSH client, X-server and networking tools)             ││                                                                    ││ ➤ SSH session to root@192.168.235.20                               ││   • SSH compression : ✘                                            ││   • SSH-browser     : ✔                                            ││   • X11-forwarding  :(remote display is forwarded through SSH) ││   • DISPLAY         :(automatically set on remote server)      ││                                                                    ││ ➤ For more info, ctrl+click on help or visit our website           │└────────────────────────────────────────────────────────────────────┘Last failed login: Sun Jul 13 21:40:30 CST 2025 from 192.168.235.1 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Wed Jul  2 19:13:06 2025 from 192.168.235.1
[root@web ~]#
Remote side unexpectedly closed network connection───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────Session stopped- Press <return> to exit tab- Press R to restart session- Press S to save terminal output to file
root@192.168.235.20's password:
▒▒▒ʱ▒▒ܾ▒
root@192.168.235.20's password:┌────────────────────────────────────────────────────────────────────┐│                        • MobaXterm 20.0 •                          ││            (SSH client, X-server and networking tools)             ││                                                                    ││ ➤ SSH session to root@192.168.235.20                               ││   • SSH compression : ✘                                            ││   • SSH-browser     : ✔                                            ││   • X11-forwarding  :(remote display is forwarded through SSH) ││   • DISPLAY         :(automatically set on remote server)      ││                                                                    ││ ➤ For more info, ctrl+click on help or visit our website           │└────────────────────────────────────────────────────────────────────┘Last failed login: Sun Jul 13 21:45:30 CST 2025 from 192.168.235.1 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Sun Jul 13 21:44:06 2025
[root@web ~]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part├─centos-root 253:0    0   17G  0 lvm  /└─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sdb               8:16   0   10G  0 disk
sr0              11:0    1  4.4G  0 rom  /mnt
您在 /var/spool/mail/root 中有新邮件
[root@web ~]# df -h
文件系统                 容量  已用  可用 已用% 挂载点
devtmpfs                 470M     0  470M    0% /dev
tmpfs                    487M     0  487M    0% /dev/shm
tmpfs                    487M  8.6M  478M    2% /run
tmpfs                    487M     0  487M    0% /sys/fs/cgroup
/dev/mapper/centos-root   17G  9.2G  7.8G   55% /
/dev/sda1               1014M  172M  843M   17% /boot
/dev/sr0                 4.4G  4.4G     0  100% /mnt
tmpfs                     98M   20K   98M    1% /run/user/1000
tmpfs                     98M     0   98M    0% /run/user/0
[root@web ~]# fdisk -l磁盘 /dev/sdb:10.7 GB, 10737418240 字节,20971520 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节磁盘 /dev/sda:21.5 GB, 21474836480 字节,41943040 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x0009cef4设备 Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    41943039    19921920   8e  Linux LVM磁盘 /dev/mapper/centos-root:18.2 GB, 18249416704 字节,35643392 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节磁盘 /dev/mapper/centos-swap:2147 MB, 2147483648 字节,4194304 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节[root@web ~]# fdisk sdb
fdisk: 打不开 sdb: 没有那个文件或目录
[root@web ~]# fdisk /dev/sdb
欢迎使用 fdisk (util-linux 2.23.2)。更改将停留在内存中,直到您决定将更改写入磁盘。
使用写入命令前请三思。Device does not contain a recognized partition table
使用磁盘标识符 0x4f05a8ca 创建新的 DOS 磁盘标签。命令(输入 m 获取帮助):p磁盘 /dev/sdb:10.7 GB, 10737418240 字节,20971520 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x4f05a8ca设备 Boot      Start         End      Blocks   Id  System命令(输入 m 获取帮助):n
Partition type:p   primary (0 primary, 0 extended, 4 free)e   extended
Select (default p): p
分区号 (1-4,默认 1):
起始 扇区 (2048-20971519,默认为 2048):
将使用默认值 2048
Last 扇区, +扇区 or +size{K,M,G} (2048-20971519,默认为 20971519):+1G
分区 1 已设置为 Linux 类型,大小设为 1 GiB命令(输入 m 获取帮助):L024  NEC DOS         81  Minix / 旧 Linu bf  Solaris1  FAT12           27  隐藏的 NTFS Win 82  Linux 交换 / So c1  DRDOS/sec (FAT-2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT-3  XENIX usr       3c  PartitionMagic  84  OS/2 隐藏的 C:  c6  DRDOS/sec (FAT-4  FAT16 <32M      40  Venix 80286     85  Linux 扩展      c7  Syrinx5  扩展            41  PPC PReP Boot   86  NTFS 卷集       da  非文件系统数据6  FAT16           42  SFS             87  NTFS 卷集       db  CP/M / CTOS / .7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux 纯文本    de  Dell 工具8  AIX             4e  QNX4.x 第2部分  8e  Linux LVM       df  BootIt9  AIX 可启动      4f  QNX4.x 第3部分  93  Amoeba          e1  DOS 访问a  OS/2 启动管理器 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/Ob  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStorc  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad 休 eb  BeOS fse  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ee  GPTf  W95 扩展 (LBA)  54  OnTrackDM6      a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f0  Linux/PA-RISC
11  隐藏的 FAT12    56  Golden Bow      a8  Darwin UFS      f1  SpeedStor
12  Compaq 诊断     5c  Priam Edisk     a9  NetBSD          f4  SpeedStor
14  隐藏的 FAT16 <3 61  SpeedStor       ab  Darwin 启动     f2  DOS 次要
16  隐藏的 FAT16    63  GNU HURD or Sys af  HFS / HFS+      fb  VMware VMFS
17  隐藏的 HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE
18  AST 智能睡眠    65  Novell Netware  b8  BSDI swap       fd  Linux raid 自动
1b  隐藏的 W95 FAT3 70  DiskSecure 多启 bb  Boot Wizard 隐  fe  LANstep
1c  隐藏的 W95 FAT3 75  PC/IX           be  Solaris 启动    ff  BBT
1e  隐藏的 W95 FAT1 80  旧 Minix命令(输入 m 获取帮助):P磁盘 /dev/sdb:10.7 GB, 10737418240 字节,20971520 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x4f05a8ca设备 Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux命令(输入 m 获取帮助):N
Partition type:p   primary (1 primary, 0 extended, 3 free)e   extended
Select (default p): P
分区号 (2-4,默认 2):
起始 扇区 (2099200-20971519,默认为 2099200):
将使用默认值 2099200
Last 扇区, +扇区 or +size{K,M,G} (2099200-20971519,默认为 20971519):+1G
分区 2 已设置为 Linux 类型,大小设为 1 GiB命令(输入 m 获取帮助):P磁盘 /dev/sdb:10.7 GB, 10737418240 字节,20971520 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x4f05a8ca设备 Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux
/dev/sdb2         2099200     4196351     1048576   83  Linux命令(输入 m 获取帮助):N
Partition type:p   primary (2 primary, 0 extended, 2 free)e   extended
Select (default p): P
分区号 (3,4,默认 3):
起始 扇区 (4196352-20971519,默认为 4196352):
将使用默认值 4196352
Last 扇区, +扇区 or +size{K,M,G} (4196352-20971519,默认为 20971519):+1G
分区 3 已设置为 Linux 类型,大小设为 1 GiB命令(输入 m 获取帮助):P磁盘 /dev/sdb:10.7 GB, 10737418240 字节,20971520 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x4f05a8ca设备 Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux
/dev/sdb2         2099200     4196351     1048576   83  Linux
/dev/sdb3         4196352     6293503     1048576   83  Linux命令(输入 m 获取帮助):M
命令操作a   toggle a bootable flagb   edit bsd disklabelc   toggle the dos compatibility flagd   delete a partitiong   create a new empty GPT partition tableG   create an IRIX (SGI) partition tablel   list known partition typesm   print this menun   add a new partitiono   create a new empty DOS partition tablep   print the partition tableq   quit without saving changess   create a new empty Sun disklabelt   change a partition's system idu   change display/entry unitsv   verify the partition tablew   write table to disk and exitx   extra functionality (experts only)命令(输入 m 获取帮助):N
Partition type:p   primary (3 primary, 0 extended, 1 free)e   extended
Select (default e): E
已选择分区 4
起始 扇区 (6293504-20971519,默认为 6293504):
将使用默认值 6293504
Last 扇区, +扇区 or +size{K,M,G} (6293504-20971519,默认为 20971519):+5G
分区 4 已设置为 Extended 类型,大小设为 5 GiB命令(输入 m 获取帮助):L0  空              24  NEC DOS         81  Minix / 旧 Linu bf  Solaris1  FAT12           27  隐藏的 NTFS Win 82  Linux 交换 / So c1  DRDOS/sec (FAT-2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT-3  XENIX usr       3c  PartitionMagic  84  OS/2 隐藏的 C:  c6  DRDOS/sec (FAT-4  FAT16 <32M      40  Venix 80286     85  Linux 扩展      c7  Syrinx5  扩展            41  PPC PReP Boot   86  NTFS 卷集       da  非文件系统数据6  FAT16           42  SFS             87  NTFS 卷集       db  CP/M / CTOS / .7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux 纯文本    de  Dell 工具8  AIX             4e  QNX4.x 第2部分  8e  Linux LVM       df  BootIt9  AIX 可启动      4f  QNX4.x 第3部分  93  Amoeba          e1  DOS 访问a  OS/2 启动管理器 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/Ob  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStorc  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad 休 eb  BeOS fse  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ee  GPTf  W95 扩展 (LBA)  54  OnTrackDM6      a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f0  Linux/PA-RISC
11  隐藏的 FAT12    56  Golden Bow      a8  Darwin UFS      f1  SpeedStor
12  Compaq 诊断     5c  Priam Edisk     a9  NetBSD          f4  SpeedStor
14  隐藏的 FAT16 <3 61  SpeedStor       ab  Darwin 启动     f2  DOS 次要
16  隐藏的 FAT16    63  GNU HURD or Sys af  HFS / HFS+      fb  VMware VMFS
17  隐藏的 HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE
18  AST 智能睡眠    65  Novell Netware  b8  BSDI swap       fd  Linux raid 自动
1b  隐藏的 W95 FAT3 70  DiskSecure 多启 bb  Boot Wizard 隐  fe  LANstep
1c  隐藏的 W95 FAT3 75  PC/IX           be  Solaris 启动    ff  BBT
1e  隐藏的 W95 FAT1 80  旧 Minix命令(输入 m 获取帮助):P磁盘 /dev/sdb:10.7 GB, 10737418240 字节,20971520 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x4f05a8ca设备 Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux
/dev/sdb2         2099200     4196351     1048576   83  Linux
/dev/sdb3         4196352     6293503     1048576   83  Linux
/dev/sdb4         6293504    16779263     5242880    5  Extended命令(输入 m 获取帮助):N
All primary partitions are in use
添加逻辑分区 5
起始 扇区 (6295552-16779263,默认为 6295552):
将使用默认值 6295552
Last 扇区, +扇区 or +size{K,M,G} (6295552-16779263,默认为 16779263):+1G
分区 5 已设置为 Linux 类型,大小设为 1 GiB命令(输入 m 获取帮助):P磁盘 /dev/sdb:10.7 GB, 10737418240 字节,20971520 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x4f05a8ca设备 Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux
/dev/sdb2         2099200     4196351     1048576   83  Linux
/dev/sdb3         4196352     6293503     1048576   83  Linux
/dev/sdb4         6293504    16779263     5242880    5  Extended
/dev/sdb5         6295552     8392703     1048576   83  Linux命令(输入 m 获取帮助):N
All primary partitions are in use
添加逻辑分区 6
起始 扇区 (8394752-16779263,默认为 8394752):
将使用默认值 8394752
Last 扇区, +扇区 or +size{K,M,G} (8394752-16779263,默认为 16779263):+1G
分区 6 已设置为 Linux 类型,大小设为 1 GiB命令(输入 m 获取帮助):P磁盘 /dev/sdb:10.7 GB, 10737418240 字节,20971520 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x4f05a8ca设备 Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux
/dev/sdb2         2099200     4196351     1048576   83  Linux
/dev/sdb3         4196352     6293503     1048576   83  Linux
/dev/sdb4         6293504    16779263     5242880    5  Extended
/dev/sdb5         6295552     8392703     1048576   83  Linux
/dev/sdb6         8394752    10491903     1048576   83  Linux命令(输入 m 获取帮助):M
命令操作a   toggle a bootable flagb   edit bsd disklabelc   toggle the dos compatibility flagd   delete a partitiong   create a new empty GPT partition tableG   create an IRIX (SGI) partition tablel   list known partition typesm   print this menun   add a new partitiono   create a new empty DOS partition tablep   print the partition tableq   quit without saving changess   create a new empty Sun disklabelt   change a partition's system idu   change display/entry unitsv   verify the partition tablew   write table to disk and exitx   extra functionality (experts only)命令(输入 m 获取帮助):N
All primary partitions are in use
添加逻辑分区 7
起始 扇区 (10493952-16779263,默认为 10493952):
将使用默认值 10493952
Last 扇区, +扇区 or +size{K,M,G} (10493952-16779263,默认为 16779263):+1G
分区 7 已设置为 Linux 类型,大小设为 1 GiB命令(输入 m 获取帮助):P磁盘 /dev/sdb:10.7 GB, 10737418240 字节,20971520 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x4f05a8ca设备 Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux
/dev/sdb2         2099200     4196351     1048576   83  Linux
/dev/sdb3         4196352     6293503     1048576   83  Linux
/dev/sdb4         6293504    16779263     5242880    5  Extended
/dev/sdb5         6295552     8392703     1048576   83  Linux
/dev/sdb6         8394752    10491903     1048576   83  Linux
/dev/sdb7        10493952    12591103     1048576   83  Linux命令(输入 m 获取帮助):N
All primary partitions are in use
添加逻辑分区 8
起始 扇区 (12593152-16779263,默认为 12593152):
将使用默认值 12593152
Last 扇区, +扇区 or +size{K,M,G} (12593152-16779263,默认为 16779263):+1G
分区 8 已设置为 Linux 类型,大小设为 1 GiB命令(输入 m 获取帮助):P磁盘 /dev/sdb:10.7 GB, 10737418240 字节,20971520 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x4f05a8ca设备 Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux
/dev/sdb2         2099200     4196351     1048576   83  Linux
/dev/sdb3         4196352     6293503     1048576   83  Linux
/dev/sdb4         6293504    16779263     5242880    5  Extended
/dev/sdb5         6295552     8392703     1048576   83  Linux
/dev/sdb6         8394752    10491903     1048576   83  Linux
/dev/sdb7        10493952    12591103     1048576   83  Linux
/dev/sdb8        12593152    14690303     1048576   83  Linux命令(输入 m 获取帮助):N
All primary partitions are in use
添加逻辑分区 9
起始 扇区 (14692352-16779263,默认为 14692352):
将使用默认值 14692352
Last 扇区, +扇区 or +size{K,M,G} (14692352-16779263,默认为 16779263):+!G
不支持的后缀:“!G”。
支持:10^N: KB (千字节), MB (兆字节), GB (吉字节)2^N: K  (约千字节), M  (约兆字节), G  (约吉字节)
Last 扇区, +扇区 or +size{K,M,G} (14692352-16779263,默认为 16779263):+1G
值超出范围。
Last 扇区, +扇区 or +size{K,M,G} (14692352-16779263,默认为 16779263):+900M
分区 9 已设置为 Linux 类型,大小设为 900 MiB命令(输入 m 获取帮助):P磁盘 /dev/sdb:10.7 GB, 10737418240 字节,20971520 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:dos
磁盘标识符:0x4f05a8ca设备 Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux
/dev/sdb2         2099200     4196351     1048576   83  Linux
/dev/sdb3         4196352     6293503     1048576   83  Linux
/dev/sdb4         6293504    16779263     5242880    5  Extended
/dev/sdb5         6295552     8392703     1048576   83  Linux
/dev/sdb6         8394752    10491903     1048576   83  Linux
/dev/sdb7        10493952    12591103     1048576   83  Linux
/dev/sdb8        12593152    14690303     1048576   83  Linux
/dev/sdb9        14692352    16535551      921600   83  Linux命令(输入 m 获取帮助):M
命令操作a   toggle a bootable flagb   edit bsd disklabelc   toggle the dos compatibility flagd   delete a partitiong   create a new empty GPT partition tableG   create an IRIX (SGI) partition tablel   list known partition typesm   print this menun   add a new partitiono   create a new empty DOS partition tablep   print the partition tableq   quit without saving changess   create a new empty Sun disklabelt   change a partition's system idu   change display/entry unitsv   verify the partition tablew   write table to disk and exitx   extra functionality (experts only)命令(输入 m 获取帮助):W
The partition table has been altered!Calling ioctl() to re-read partition table.
正在同步磁盘。
您在 /var/spool/mail/root 中有邮件
[root@web ~]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part├─centos-root 253:0    0   17G  0 lvm  /└─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sdb               8:16   0   10G  0 disk
├─sdb1            8:17   0    1G  0 part
├─sdb2            8:18   0    1G  0 part
├─sdb3            8:19   0    1G  0 part
├─sdb4            8:20   0    1K  0 part
├─sdb5            8:21   0    1G  0 part
├─sdb6            8:22   0    1G  0 part
├─sdb7            8:23   0    1G  0 part
├─sdb8            8:24   0    1G  0 part
└─sdb9            8:25   0  900M  0 part
sr0              11:0    1  4.4G  0 rom  /mnt
[root@web ~]# partx -a /dev/sdb
partx: /dev/sdb: error adding partitions 1-9
您在 /var/spool/mail/root 中有邮件
[root@web ~]# mkfs.ext4 /dev/sdb1
mke2fs 1.42.9 (28-Dec-2013)
文件系统标签=
OS type: Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:32768, 98304, 163840, 229376Allocating group tables: 完成
正在写入inode表: 完成
Creating journal (8192 blocks): 完成
Writing superblocks and filesystem accounting information: 完成您在 /var/spool/mail/root 中有邮件
[root@web ~]# mkfs.ext4 /dev/sdb2
mke2fs 1.42.9 (28-Dec-2013)
文件系统标签=
OS type: Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:32768, 98304, 163840, 229376Allocating group tables: 完成
正在写入inode表: 完成
Creating journal (8192 blocks): 完成
Writing superblocks and filesystem accounting information: 完成[root@web ~]# mkdir /u01
[root@web ~]# mount /dev/sdb1 /u01\
> ^C
您在 /var/spool/mail/root 中有邮件
[root@web ~]# mount /dev/sdb1 /u01
[root@web ~]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part├─centos-root 253:0    0   17G  0 lvm  /└─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sdb               8:16   0   10G  0 disk
├─sdb1            8:17   0    1G  0 part /u01
├─sdb2            8:18   0    1G  0 part
├─sdb3            8:19   0    1G  0 part
├─sdb4            8:20   0    1K  0 part
├─sdb5            8:21   0    1G  0 part
├─sdb6            8:22   0    1G  0 part
├─sdb7            8:23   0    1G  0 part
├─sdb8            8:24   0    1G  0 part
└─sdb9            8:25   0  900M  0 part
sr0              11:0    1  4.4G  0 rom  /mnt
[root@web ~]# mkdir /u2
[root@web ~]# mount /dev/sdb2 /u2
[root@web ~]# df -h
文件系统                 容量  已用  可用 已用% 挂载点
devtmpfs                 470M     0  470M    0% /dev
tmpfs                    487M     0  487M    0% /dev/shm
tmpfs                    487M  8.6M  478M    2% /run
tmpfs                    487M     0  487M    0% /sys/fs/cgroup
/dev/mapper/centos-root   17G  9.2G  7.9G   55% /
/dev/sda1               1014M  172M  843M   17% /boot
/dev/sr0                 4.4G  4.4G     0  100% /mnt
tmpfs                     98M   24K   98M    1% /run/user/1000
tmpfs                     98M     0   98M    0% /run/user/0
/dev/sdb1                976M  2.6M  907M    1% /u01
/dev/sdb2                976M  2.6M  907M    1% /u2
[root@web ~]# rpm -ql samba
未安装软件包 samba
您在 /var/spool/mail/root 中有邮件
[root@web ~]# yum install samba -y
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
正在解决依赖关系
--> 正在检查事务
---> 软件包 samba.x86_64.0.4.10.16-5.el7 将被 安装
--> 正在处理依赖关系 samba-libs = 4.10.16-5.el7,它被软件包 samba-4.10.16-5.el7.x86_64 需要
--> 正在处理依赖关系 samba-common-tools = 4.10.16-5.el7,它被软件包 samba-4.10.16-5.el7.x86_64 需要
--> 正在处理依赖关系 libxattr-tdb-samba4.so(SAMBA_4.10.16)(64bit),它被软件包 samba-4.10.16-5.el7.x86_64 需要
--> 正在处理依赖关系 libxattr-tdb-samba4.so()(64bit),它被软件包 samba-4.10.16-5.el7.x86_64 需要
--> 正在检查事务
---> 软件包 samba-common-tools.x86_64.0.4.10.16-5.el7 将被 安装
---> 软件包 samba-libs.x86_64.0.4.10.16-5.el7 将被 安装
--> 正在处理依赖关系 libpytalloc-util.so.2(PYTALLOC_UTIL_2.1.9)(64bit),它被软件包 samba-libs-4.10.16-5.el7.x86_64 需要
--> 正在处理依赖关系 libpytalloc-util.so.2(PYTALLOC_UTIL_2.1.6)(64bit),它被软件包 samba-libs-4.10.16-5.el7.x86_64 需要
--> 正在处理依赖关系 libpytalloc-util.so.2(PYTALLOC_UTIL_2.0.6)(64bit),它被软件包 samba-libs-4.10.16-5.el7.x86_64 需要
--> 正在处理依赖关系 libpytalloc-util.so.2()(64bit),它被软件包 samba-libs-4.10.16-5.el7.x86_64 需要
--> 正在处理依赖关系 libpyldb-util.so.1()(64bit),它被软件包 samba-libs-4.10.16-5.el7.x86_64 需要
--> 正在检查事务
---> 软件包 pyldb.x86_64.0.1.5.4-1.el7 将被 安装
--> 正在处理依赖关系 python-tdb(x86-64) >= 1.3.18,它被软件包 pyldb-1.5.4-1.el7.x86_64 需要
---> 软件包 pytalloc.x86_64.0.2.1.16-1.el7 将被 安装
--> 正在检查事务
---> 软件包 python-tdb.x86_64.0.1.3.18-1.el7 将被 安装
--> 解决依赖关系完成依赖关系解决===================================================================================================================================================Package                                   架构                          版本                                   源                            大小
===================================================================================================================================================
正在安装:samba                                     x86_64                        4.10.16-5.el7                          local                        717 k
为依赖而安装:pyldb                                     x86_64                        1.5.4-1.el7                            local                         49 kpytalloc                                  x86_64                        2.1.16-1.el7                           local                         18 kpython-tdb                                x86_64                        1.3.18-1.el7                           local                         20 ksamba-common-tools                        x86_64                        4.10.16-5.el7                          local                        464 ksamba-libs                                x86_64                        4.10.16-5.el7                          local                        269 k事务概要
===================================================================================================================================================
安装  1 软件包 (+5 依赖软件包)总下载量:1.5 M
安装大小:4.1 M
Downloading packages:
---------------------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                               249 kB/s | 1.5 MB  00:00:06
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction正在安装    : python-tdb-1.3.18-1.el7.x86_64                                                                                                 1/6正在安装    : pyldb-1.5.4-1.el7.x86_64                                                                                                       2/6正在安装    : pytalloc-2.1.16-1.el7.x86_64                                                                                                   3/6正在安装    : samba-libs-4.10.16-5.el7.x86_64                                                                                                4/6正在安装    : samba-common-tools-4.10.16-5.el7.x86_64                                                                                        5/6正在安装    : samba-4.10.16-5.el7.x86_64                                                                                                     6/6验证中      : samba-libs-4.10.16-5.el7.x86_64                                                                                                1/6验证中      : pyldb-1.5.4-1.el7.x86_64                                                                                                       2/6验证中      : samba-common-tools-4.10.16-5.el7.x86_64                                                                                        3/6验证中      : samba-4.10.16-5.el7.x86_64                                                                                                     4/6验证中      : pytalloc-2.1.16-1.el7.x86_64                                                                                                   5/6验证中      : python-tdb-1.3.18-1.el7.x86_64                                                                                                 6/6已安装:samba.x86_64 0:4.10.16-5.el7作为依赖被安装:pyldb.x86_64 0:1.5.4-1.el7         pytalloc.x86_64 0:2.1.16-1.el7  python-tdb.x86_64 0:1.3.18-1.el7  samba-common-tools.x86_64 0:4.10.16-5.el7samba-libs.x86_64 0:4.10.16-5.el7完毕!
您在 /var/spool/mail/root 中有邮件
[root@web ~]# hostname
web.cn
[root@web ~]# yum repolist
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
源标识                                                               源名称                                                                   状态
local                                                                local repo                                                               4,070
repolist: 4,070
[root@web ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemonLoaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)Active: inactive (dead)Docs: man:firewalld(1)
[root@web ~]# setenforce 0
setenforce: SELinux is disabled
[root@web ~]# cat /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.[global]workgroup = SAMBAsecurity = userpassdb backend = tdbsamprinting = cupsprintcap name = cupsload printers = yescups options = raw[homes]comment = Home Directoriesvalid users = %S, %D%w%Sbrowseable = Noread only = Noinherit acls = Yes[printers]comment = All Printerspath = /var/tmpprintable = Yescreate mask = 0600browseable = No[print$]comment = Printer Driverspath = /var/lib/samba/driverswrite list = @printadmin rootforce group = @printadmincreate mask = 0664directory mask = 0775
您在 /var/spool/mail/root 中有邮件
[root@web ~]# vim /etc/samba/smb.conf
您在 /var/spool/mail/root 中有邮件
[root@web ~]# cat /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.[global]workgroup = SAMBAsecurity = userpassdb backend = tdbsamprinting = cupsprintcap name = cupsload printers = yescups options = raw[homes]comment = Home Directoriesvalid users = %S, %D%w%Sbrowseable = Noread only = Noinherit acls = Yes[printers]comment = All Printerspath = /var/tmpprintable = Yescreate mask = 0600browseable = No[print$]comment = Printer Driverspath = /var/lib/samba/driverswrite list = @printadmin rootforce group = @printadmincreate mask = 0664directory mask = 0775
[smb_share]comment = samba servicepath = /samba/shareguest ok = nowritable = yes
[root@web ~]# mkdir /samba/share -p
您在 /var/spool/mail/root 中有邮件
[root@web ~]# useradd user01
[root@web ~]# smbpasswd user01
New SMB password:
Retype new SMB password:
Failed to find entry for user user01.
[root@web ~]# smbpasswd -a user01
New SMB password:
Retype new SMB password:
Added user user01.
您在 /var/spool/mail/root 中有邮件
[root@web ~]# systemctl start nmb
[root@web ~]# systemctl smb
Unknown operation 'smb'.
[root@web ~]# systemctl start smb
[root@web ~]# setfacl -m user:user01:rwx /samba/share
您在 /var/spool/mail/root 中有邮件
[root@web ~]# smbclient -L 192.168.235.20 -u
Enter SAMBA\root's password:
Anonymous login successfulSharename       Type      Comment---------       ----      -------print$          Disk      Printer Driverssmb_share       Disk      samba serviceIPC$            IPC       IPC Service (Samba 4.10.16)
Reconnecting with SMB1 for workgroup listing.
Anonymous login successfulServer               Comment---------            -------Workgroup            Master---------            -------SAMBA                WEB
[root@web ~]# smbclient //192.168.235.20/smb_share -U user01
Enter SAMBA\user01's password:
Try "help" to get a list of possible commands.
smb: \> ls.                                   D        0  Sun Jul 13 22:34:38 2025..                                  D        0  Sun Jul 13 22:26:39 2025新建 文本文档.txt             A        9  Sun Jul 13 22:34:51 202517811456 blocks of size 1024. 8173300 blocks available
smb: \> cat .txt
cat: command not found
smb: \> cat  新^C
您在 /var/spool/mail/root 中有邮件
[root@web ~]# exit
登出───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────Session stopped- Press <return> to exit tab- Press R to restart session- Press S to save terminal output to file
root@192.168.235.20's password:
▒▒▒ʱ▒▒ܾ▒
root@192.168.235.20's password:┌────────────────────────────────────────────────────────────────────┐│                        • MobaXterm 20.0 •                          ││            (SSH client, X-server and networking tools)             ││                                                                    ││ ➤ SSH session to root@192.168.235.20                               ││   • SSH compression : ✘                                            ││   • SSH-browser     : ✔                                            ││   • X11-forwarding  : ✔  (remote display is forwarded through SSH) ││   • DISPLAY         : ✔  (automatically set on remote server)      ││                                                                    ││ ➤ For more info, ctrl+click on help or visit our website           │└────────────────────────────────────────────────────────────────────┘Last failed login: Sun Jul 13 22:39:26 CST 2025 from 192.168.235.1 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Sun Jul 13 21:45:41 2025 from 192.168.235.1
[root@web ~]# systemct status nmb
bash: systemct: 未找到命令...
[root@web ~]# systemctl status nmb
● nmb.service - Samba NMB DaemonLoaded: loaded (/usr/lib/systemd/system/nmb.service; disabled; vendor preset: disabled)Active: active (running) since 日 2025-07-13 22:28:38 CST; 11min agoDocs: man:nmbd(8)man:samba(7)man:smb.conf(5)Main PID: 18419 (nmbd)Status: "nmbd: ready to serve connections..."Tasks: 1CGroup: /system.slice/nmb.service└─18419 /usr/sbin/nmbd --foreground --no-process-group7月 13 22:29:01 web.cn nmbd[18419]:
7月 13 22:29:01 web.cn nmbd[18419]:   Samba name server WEB is now a local master browser for workgroup SAMBA on subnet 192.168.122.1
7月 13 22:29:01 web.cn nmbd[18419]:
7月 13 22:29:01 web.cn nmbd[18419]:   *****
7月 13 22:29:01 web.cn nmbd[18419]: [2025/07/13 22:29:01.373764,  0] ../../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
7月 13 22:29:01 web.cn nmbd[18419]:   *****
7月 13 22:29:01 web.cn nmbd[18419]:
7月 13 22:29:01 web.cn nmbd[18419]:   Samba name server WEB is now a local master browser for workgroup SAMBA on subnet 192.168.235.20
7月 13 22:29:01 web.cn nmbd[18419]:
7月 13 22:29:01 web.cn nmbd[18419]:   *****
[root@web ~]# systemctl status smb
● smb.service - Samba SMB DaemonLoaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendor preset: disabled)Active: active (running) since 日 2025-07-13 22:28:49 CST; 11min agoDocs: man:smbd(8)man:samba(7)man:smb.conf(5)Main PID: 18501 (smbd)Status: "smbd: ready to serve connections..."Tasks: 5CGroup: /system.slice/smb.service├─18501 /usr/sbin/smbd --foreground --no-process-group├─18507 /usr/sbin/smbd --foreground --no-process-group├─18508 /usr/sbin/smbd --foreground --no-process-group├─18509 /usr/sbin/smbd --foreground --no-process-group└─19988 /usr/sbin/smbd --foreground --no-process-group7月 13 22:28:49 web.cn systemd[1]: Starting Samba SMB Daemon...
7月 13 22:28:49 web.cn smbd[18501]: [2025/07/13 22:28:49.336954,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
7月 13 22:28:49 web.cn systemd[1]: Started Samba SMB Daemon.
7月 13 22:28:49 web.cn smbd[18501]:   daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[root@web ~]# df -h
文件系统                 容量  已用  可用 已用% 挂载点
devtmpfs                 470M     0  470M    0% /dev
tmpfs                    487M     0  487M    0% /dev/shm
tmpfs                    487M  8.6M  478M    2% /run
tmpfs                    487M     0  487M    0% /sys/fs/cgroup
/dev/mapper/centos-root   17G  9.2G  7.8G   55% /
/dev/sda1               1014M  172M  843M   17% /boot
/dev/sr0                 4.4G  4.4G     0  100% /mnt
tmpfs                     98M   24K   98M    1% /run/user/1000
/dev/sdb1                976M  2.6M  907M    1% /u01
/dev/sdb2                976M  2.6M  907M    1% /u2
tmpfs                     98M     0   98M    0% /run/user/0
[root@web ~]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part├─centos-root 253:0    0   17G  0 lvm  /└─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sdb               8:16   0   10G  0 disk
├─sdb1            8:17   0    1G  0 part /u01
├─sdb2            8:18   0    1G  0 part /u2
├─sdb3            8:19   0    1G  0 part
├─sdb4            8:20   0    1K  0 part
├─sdb5            8:21   0    1G  0 part
├─sdb6            8:22   0    1G  0 part
├─sdb7            8:23   0    1G  0 part
├─sdb8            8:24   0    1G  0 part
└─sdb9            8:25   0  900M  0 part
sr0              11:0    1  4.4G  0 rom  /mnt
[root@web ~]# mkdir /u03
[root@web ~]# mount.cifs -o user=user01,passwd=123 //192.168.235.20/smb_share /u03
Password for user01@//192.168.235.20/smb_share:  ***
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
您在 /var/spool/mail/root 中有新邮件
[root@web ~]# mount.cifs -o user=user01,pass=123 //192.168.235.20/smb_share /u03
[root@web ~]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part├─centos-root 253:0    0   17G  0 lvm  /└─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sdb               8:16   0   10G  0 disk
├─sdb1            8:17   0    1G  0 part /u01
├─sdb2            8:18   0    1G  0 part /u2
├─sdb3            8:19   0    1G  0 part
├─sdb4            8:20   0    1K  0 part
├─sdb5            8:21   0    1G  0 part
├─sdb6            8:22   0    1G  0 part
├─sdb7            8:23   0    1G  0 part
├─sdb8            8:24   0    1G  0 part
└─sdb9            8:25   0  900M  0 part
sr0              11:0    1  4.4G  0 rom  /mnt
[root@web ~]# df -h
文件系统                    容量  已用  可用 已用% 挂载点
devtmpfs                    470M     0  470M    0% /dev
tmpfs                       487M     0  487M    0% /dev/shm
tmpfs                       487M  8.6M  478M    2% /run
tmpfs                       487M     0  487M    0% /sys/fs/cgroup
/dev/mapper/centos-root      17G  9.2G  7.8G   55% /
/dev/sda1                  1014M  172M  843M   17% /boot
/dev/sr0                    4.4G  4.4G     0  100% /mnt
tmpfs                        98M   24K   98M    1% /run/user/1000
/dev/sdb1                   976M  2.6M  907M    1% /u01
/dev/sdb2                   976M  2.6M  907M    1% /u2
tmpfs                        98M     0   98M    0% /run/user/0
//192.168.235.20/smb_share   17G  9.2G  7.8G   55% /u03
您在 /var/spool/mail/root 中有邮件
[root@web ~]#
http://www.lryc.cn/news/587458.html

相关文章:

  • 输入npm install后发生了什么
  • C++高频知识点(十)
  • Excalidraw:一款颠覆传统思维的免费开源绘图工具
  • 什么是RAG(Retrieval-Augmented Generation)?一文读懂检索增强生成
  • Vue3 实现文件上传功能
  • 【操作系统】strace 跟踪系统调用(一)
  • 网络编程 JAVA
  • 2025年渗透测试面试题总结-2025年HW(护网面试) 45(题目+回答)
  • 学习开发之无参与有参
  • 前四天综合总结
  • Cursor的使用
  • ARC 03 从Github Action job 到 runner pod
  • 暑期自学嵌入式——Day01(C语言阶段)
  • BERT系列模型
  • Spring AI 项目实战(十六):Spring Boot + AI + 通义万相图像生成工具全栈项目实战(附完整源码)
  • 闲庭信步使用图像验证平台加速FPGA的开发:第十三课——图像浮雕效果的FPGA实现
  • 【Mysql作业】
  • 16.使用ResNet网络进行Fashion-Mnist分类
  • [GWCTF 2019]我有一个数据库
  • 在 Ubuntu 下安装 MySQL 数据库
  • 谷歌推出Vertex AI Memory Bank:为AI智能体带来持久记忆,支持连续对话
  • 【echarts踩坑记录】为什么第二个Y轴最大值不整洁
  • 华为HarmonyOS 5.0深度解析:跨设备算力池技术白皮书(2025全场景智慧中枢)
  • JavaScript加强篇——第八章 高效渲染与正则表达式
  • vue防内存泄漏和性能优化浅解
  • PHP语法高级篇(二):文件处理
  • 小架构step系列13:测试用例的加载
  • python的平安驾校管理系统
  • C# 接口(接口可以继承接口)
  • MySQL SQL语句精要:DDL、DML与DCL的深度探究