我有一个 fstab 挂载点定义如下:
//host.local /media/share1 cifs noexec,nofail,auto,nouser,_netdev,credentials=/home/foo/.smbcredentials,gid=1000,uid=1000,rw 0 0
网络共享在本地 NAS 服务器 (QNAP) 上可用,配置为在不活动后 15 分钟内暂停磁盘存储。当使用 nautilus 浏览 samba 共享时,这是按预期工作的。然而,当使用 cifs 挂载时,客户端会定期使用看似空的请求“Command: Create (5)”或 Keep-Alive“Command: KeepAlive (13)”查询 NAS。 NAS 以“STATUS_SUCCESS -> Create Action: The file Been and wasopened (1)”或 Keep-Alive 响应进行响应。
SMB2 (Server Message Block Protocol version 2)
SMB2 Header
Server Component: SMB2
Header Length: 64
Credit Charge: 1
Channel Sequence: 0
Reserved: 0000
Command: Create (5)
Credits requested: 2
Flags: 0x00000000
Chain Offset: 0x00000000
Message ID: Unknown (299)
Process Id: 0x00000ba6
Tree Id: 0x79c61208
Session Id: 0x00000000448e3aa5
Signature: 00000000000000000000000000000000
[Response in: 1748]
Create Request (0x05)
StructureSize: 0x0039
0000 0000 0011 100. = Fixed Part Length: 28
.... .... .... ...1 = Dynamic Part: True
Oplock: No oplock (0x00)
Impersonation level: Impersonation (2)
Create Flags: 0x0000000000000000
Reserved: 0000000000000000
Access Mask: 0x00000080
File Attributes: 0x00000000
Share Access: 0x00000007, Read, Write, Delete
Disposition: Open (if file exists open it, else fail) (1)
Create Options: 0x00000000
Filename:
Offset: 0x00000078
Length: 0
ExtraInfo: NO DATA
Offset: 0x00000000
Length: 0
我能否以某种方式使 cifs 不定期 ping NAS 共享,以便 NAS 最终可以进入待机状态?否则,NAS 会持续处于活动状态、发出噪音,并且可能会过热。