我在 Fedora34 上使用自动挂载来实现在 Fedora15 上运行的 samba 共享。以下配置在旧的 Fedora27 中运行良好,但我必须添加forceuid
并forcegid
在 Fedora34 上工作。
$ cat /etc/auto.autofs
public -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
$ tail -n 3 /etc/auto.master
+auto.master
/autofs /etc/auto.autofs
现在我的问题是:有时自动挂载会连续挂载该卷 5 次,并且在超时后仅卸载其中 1 次。我禁用了 autofs 服务并确保没有更多实例在运行。然后我手动运行自动挂载,这是输出(为了更好的可读性换行符):
$ sudo automount -vdf
Starting automounter version 5.1.7-17.fc34, master map auto.master
using kernel protocol version 5.05
lookup_nss_read_master: reading master sss auto.master
do_init: parse(sun): init gathered global options: (null)
can't connect to sssd, retry for 10 seconds
lookup_nss_read_master: auto.master not found, replacing '.' with '_'
do_init: parse(sun): init gathered global options: (null)
can't connect to sssd, retry for 10 seconds
lookup_nss_read_master: no map - continuing to next source
lookup_nss_read_master: reading master files auto.master
do_init: parse(sun): init gathered global options: (null)
lookup_read_master: lookup(file): read entry /misc
lookup_read_master: lookup(file): read entry /net
lookup_read_master: lookup(file): read entry +dir:/etc/auto.master.d
lookup_nss_read_master: reading master dir /etc/auto.master.d
lookup_read_master: lookup(dir): scandir: /etc/auto.master.d
lookup_read_master: lookup(file): read entry +auto.master
lookup_nss_read_master: reading master sss auto.master
do_init: parse(sun): init gathered global options: (null)
can't connect to sssd, retry for 10 seconds
lookup_nss_read_master: no map - continuing to next source
lookup_nss_read_master: reading master files auto.master
do_init: parse(sun): init gathered global options: (null)
lookup_read_master: lookup(file): read entry /autofs
master_do_mount: mounting /misc
automount_path_to_fifo: fifo name /run/autofs.fifo-misc
lookup_nss_read_map: reading map file /etc/auto.misc
do_init: parse(sun): init gathered global options: (null)
mounted indirect on /misc with timeout 300, freq 75 seconds
st_ready: st_ready(): state = 0 path /misc
master_do_mount: mounting /net
automount_path_to_fifo: fifo name /run/autofs.fifo-net
lookup_nss_read_map: reading map hosts (null)
do_init: parse(sun): init gathered global options: (null)
lookup_read_map: lookup(hosts): read hosts map
lookup_read_map: lookup(hosts): map not browsable, update existing host entries only
mounted indirect on /net with timeout 300, freq 75 seconds
st_ready: st_ready(): state = 0 path /net
master_do_mount: mounting /autofs
automount_path_to_fifo: fifo name /run/autofs.fifo-autofs
lookup_nss_read_map: reading map file /etc/auto.autofs
do_init: parse(sun): init gathered global options: (null)
mounted indirect on /autofs with timeout 300, freq 75 seconds
st_ready: st_ready(): state = 0 path /autofs
handle_packet: type = 3
handle_packet_missing_indirect: token 1, name public, request pid 4747
attempting to mount entry /autofs/public
lookup_mount: lookup(file): looking up public
lookup_mount: lookup(file): public -> -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): expanded entry: -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): gathered options: fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0
parse_mount: parse(sun): dequote("://dixie.tessier-ashpool/public/") -> ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): core of entry: options=fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0, loc=://dixie.tessier-ashpool/public/
sun_mount: parse(sun): mounting root /autofs, mountpoint public, what //dixie.tessier-ashpool/public/, fstype cifs, options credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0
do_mount: //dixie.tessier-ashpool/public/ /autofs/public type cifs options credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 using module generic
mount_mount: mount(generic): calling mkdir_path /autofs/public
mount(generic): calling mount -t cifs -o credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 //dixie.tessier-ashpool/public/ /autofs/public
mount_mount: mount(generic): mounted //dixie.tessier-ashpool/public/ type cifs on /autofs/public
dev_ioctl_send_ready: token = 1
mounted /autofs/public
st_expire: state 1 path /autofs
expire_proc: exp_proc = 139801751950912 path /autofs
expire_proc_indirect: expire /autofs/public
expire_proc_indirect: 1 remaining in /autofs
expire_cleanup: got thid 139801751950912 path /autofs stat 1
expire_cleanup: sigchld: exp 139801751950912 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /autofs
st_expire: state 1 path /autofs
expire_proc: exp_proc = 139801751950912 path /autofs
expire_proc_indirect: expire /autofs/public
expire_proc_indirect: 1 remaining in /autofs
expire_cleanup: got thid 139801751950912 path /autofs stat 1
expire_cleanup: sigchld: exp 139801751950912 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /autofs
st_expire: state 1 path /autofs
expire_proc: exp_proc = 139801751950912 path /autofs
expire_proc_indirect: expire /autofs/public
expire_proc_indirect: 1 remaining in /autofs
expire_cleanup: got thid 139801751950912 path /autofs stat 1
expire_cleanup: sigchld: exp 139801751950912 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /autofs
st_expire: state 1 path /autofs
expire_proc: exp_proc = 139801751950912 path /autofs
expire_proc_indirect: expire /autofs/public
expire_proc_indirect: 1 remaining in /autofs
expire_cleanup: got thid 139801751950912 path /autofs stat 1
expire_cleanup: sigchld: exp 139801751950912 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /autofs
st_expire: state 1 path /autofs
expire_proc: exp_proc = 139801751950912 path /autofs
expire_proc_indirect: expire /autofs/public
expire_proc_indirect: 1 remaining in /autofs
expire_cleanup: got thid 139801751950912 path /autofs stat 1
expire_cleanup: sigchld: exp 139801751950912 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /autofs
st_expire: state 1 path /autofs
expire_proc: exp_proc = 139801751950912 path /autofs
expire_proc_indirect: expire /autofs/public
expire_proc_indirect: 1 remaining in /autofs
expire_cleanup: got thid 139801751950912 path /autofs stat 1
expire_cleanup: sigchld: exp 139801751950912 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /autofs
st_expire: state 1 path /autofs
expire_proc: exp_proc = 139801751950912 path /autofs
expire_proc_indirect: expire /autofs/public
handle_packet: type = 4
handle_packet_expire_indirect: token 2, name public
expiring path /autofs/public
umount_multi: path /autofs/public incl 1
umount_subtree_mounts: unmounting dir = /autofs/public
rm_unwanted_fn: removing directory /autofs/public
expired /autofs/public
dev_ioctl_send_ready: token = 2
expire_cleanup: got thid 139801751950912 path /autofs stat 0
expire_cleanup: sigchld: exp 139801751950912 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /autofs
handle_packet: type = 3
handle_packet_missing_indirect: token 3, name public, request pid 5402
attempting to mount entry /autofs/public
lookup_mount: lookup(file): looking up public
lookup_mount: lookup(file): public -> -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): expanded entry: -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): gathered options: fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0
parse_mount: parse(sun): dequote("://dixie.tessier-ashpool/public/") -> ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): core of entry: options=fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0, loc=://dixie.tessier-ashpool/public/
sun_mount: parse(sun): mounting root /autofs, mountpoint public, what //dixie.tessier-ashpool/public/, fstype cifs, options credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0
do_mount: //dixie.tessier-ashpool/public/ /autofs/public type cifs options credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 using module generic
mount_mount: mount(generic): calling mkdir_path /autofs/public
mount(generic): calling mount -t cifs -o credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 //dixie.tessier-ashpool/public/ /autofs/public
handle_packet: type = 3
handle_packet_missing_indirect: token 4, name public, request pid 5397
attempting to mount entry /autofs/public
lookup_mount: lookup(file): looking up public
lookup_mount: lookup(file): public -> -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): expanded entry: -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): gathered options: fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0
parse_mount: parse(sun): dequote("://dixie.tessier-ashpool/public/") -> ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): core of entry: options=fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0, loc=://dixie.tessier-ashpool/public/
sun_mount: parse(sun): mounting root /autofs, mountpoint public, what //dixie.tessier-ashpool/public/, fstype cifs, options credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0
do_mount: //dixie.tessier-ashpool/public/ /autofs/public type cifs options credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 using module generic
mount_mount: mount(generic): calling mkdir_path /autofs/public
mount(generic): calling mount -t cifs -o credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 //dixie.tessier-ashpool/public/ /autofs/public
handle_packet: type = 3
handle_packet_missing_indirect: token 5, name public, request pid 5413
attempting to mount entry /autofs/public
lookup_mount: lookup(file): looking up public
lookup_mount: lookup(file): public -> -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): expanded entry: -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): gathered options: fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0
parse_mount: parse(sun): dequote("://dixie.tessier-ashpool/public/") -> ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): core of entry: options=fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0, loc=://dixie.tessier-ashpool/public/
sun_mount: parse(sun): mounting root /autofs, mountpoint public, what //dixie.tessier-ashpool/public/, fstype cifs, options credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0
do_mount: //dixie.tessier-ashpool/public/ /autofs/public type cifs options credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 using module generic
mount_mount: mount(generic): calling mkdir_path /autofs/public
mount(generic): calling mount -t cifs -o credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 //dixie.tessier-ashpool/public/ /autofs/public
handle_packet: type = 3
handle_packet_missing_indirect: token 6, name public, request pid 5419
attempting to mount entry /autofs/public
lookup_mount: lookup(file): looking up public
lookup_mount: lookup(file): public -> -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): expanded entry: -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): gathered options: fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0
parse_mount: parse(sun): dequote("://dixie.tessier-ashpool/public/") -> ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): core of entry: options=fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0, loc=://dixie.tessier-ashpool/public/
sun_mount: parse(sun): mounting root /autofs, mountpoint public, what //dixie.tessier-ashpool/public/, fstype cifs, options credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0
do_mount: //dixie.tessier-ashpool/public/ /autofs/public type cifs options credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 using module generic
mount_mount: mount(generic): calling mkdir_path /autofs/public
mount(generic): calling mount -t cifs -o credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 //dixie.tessier-ashpool/public/ /autofs/public
handle_packet: type = 3
handle_packet_missing_indirect: token 7, name public, request pid 5408
attempting to mount entry /autofs/public
lookup_mount: lookup(file): looking up public
lookup_mount: lookup(file): public -> -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): expanded entry: -fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): gathered options: fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0
parse_mount: parse(sun): dequote("://dixie.tessier-ashpool/public/") -> ://dixie.tessier-ashpool/public/
parse_mount: parse(sun): core of entry: options=fstype=cifs,credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0, loc=://dixie.tessier-ashpool/public/
sun_mount: parse(sun): mounting root /autofs, mountpoint public, what //dixie.tessier-ashpool/public/, fstype cifs, options credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0
do_mount: //dixie.tessier-ashpool/public/ /autofs/public type cifs options credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 using module generic
mount_mount: mount(generic): calling mkdir_path /autofs/public
mount(generic): calling mount -t cifs -o credentials=/home/stefan/.dixie_credentials,rw,nobrl,rsize=61568,uid=stefan,forceuid,gid=stefan,forcegid,file_mode=0660,dir_mode=0770,vers=1.0 //dixie.tessier-ashpool/public/ /autofs/public
mount_mount: mount(generic): mounted //dixie.tessier-ashpool/public/ type cifs on /autofs/public
dev_ioctl_send_ready: token = 3
mounted /autofs/public
mount_mount: mount(generic): mounted //dixie.tessier-ashpool/public/ type cifs on /autofs/public
dev_ioctl_send_ready: token = 5
mounted /autofs/public
mount_mount: mount(generic): mounted //dixie.tessier-ashpool/public/ type cifs on /autofs/public
dev_ioctl_send_ready: token = 4
mounted /autofs/public
mount_mount: mount(generic): mounted //dixie.tessier-ashpool/public/ type cifs on /autofs/public
dev_ioctl_send_ready: token = 6
mounted /autofs/public
mount_mount: mount(generic): mounted //dixie.tessier-ashpool/public/ type cifs on /autofs/public
dev_ioctl_send_ready: token = 7
mounted /autofs/public
handle_packet: type = 3
handle_packet_missing_indirect: token 8, name .hidden, request pid 5433
attempting to mount entry /autofs/.hidden
lookup_mount: lookup(file): looking up .hidden
key ".hidden" not found in map source(s).
dev_ioctl_send_fail: token = 8
failed to mount /autofs/.hidden
这种行为的最终结果是这样的:
$ ll /autofs stefan@fedora
ls: Zugriff auf '/autofs/public' nicht möglich: Ist kein Verzeichnis
insgesamt 0
d????????? ? ? ? ? ? public
有什么问题吗?
答案1
这表明鹦鹉螺就是罪魁祸首。当我有自动挂载的 /autofs/public 文件夹的书签时,nautilus 启动时会发生这种情况。没有书签它也能工作。