我已经在vSAN上启用了unmap功能,然后我在所有VM上关闭/供电以启用unmap,如下面的KB所述。
在这些过程之后,我成功地用fstrim在所有VM上完成了unmap,并使fstrim.timer能够安排每周运行一次。
到目前为止一切都很正常。
几周后,我注意到一些VM有以下日志,但正如我前面提到的,fstrim以前成功地工作过。
Ubuntu版本、内核版本或fstrim版本没有变化。
这个问题是与操作系统相关的还是vSAN相关的,还是我应该使用替代工具来取消映射,有什么建议吗?
fstrim产出:
> journalctl -u fstrim
systemd[1]: Starting Discard unused blocks...
fstrim[15063]: /mnt/abc: 8.5 GiB (9084649472 bytes) trimmed
fstrim[15063]: /: 1.8 GiB (1896648704 bytes) trimmed
systemd[1]: Started Discard unused blocks.
systemd[1]: Starting Discard unused blocks...
fstrim[9262]: /mnt/abc: 0 B (0 bytes) trimmed
fstrim[9262]: /: 829.2 MiB (869523456 bytes) trimmed
systemd[1]: Started Discard unused blocks.
systemd[1]: Starting Discard unused blocks...
fstrim[2672]: /mnt/abc: 0 B (0 bytes) trimmed
fstrim[2672]: /: 913.5 MiB (957837312 bytes) trimmed
systemd[1]: Started Discard unused blocks.
systemd[1]: Starting Discard unused blocks...
fstrim[1792]: /mnt/abc: 0 B (0 bytes) trimmed
fstrim[1792]: /: 395.1 MiB (414277632 bytes) trimmed
systemd[1]: Started Discard unused blocks.
systemd[1]: Starting Discard unused blocks...
systemd[1]: fstrim.service: Main process exited, code=exited, status=32/n/a
fstrim[3591]: fstrim: /mnt/abc: FITRIM ioctl failed: Remote I/O error
fstrim[3591]: fstrim: /: FITRIM ioctl failed: Remote I/O error
systemd[1]: fstrim.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Discard unused blocks.
systemd[1]: Starting Discard unused blocks...
fstrim[1750]: fstrim: /mnt/abc: FITRIM ioctl failed: Remote I/O error
fstrim[1750]: fstrim: /: FITRIM ioctl failed: Remote I/O error
systemd[1]: fstrim.service: Main process exited, code=exited, status=32/n/a
systemd[1]: fstrim.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Discard unused blocks.dmesg产出:
> dmesg
sd 32:0:1:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sd 32:0:1:0: [sdb] tag#0 Sense Key : Illegal Request [current]
sd 32:0:1:0: [sdb] tag#0 Add. Sense: Invalid field in cdb
sd 32:0:1:0: [sdb] tag#0 CDB: Unmap/Read sub-channel 42 00 00 00 00 00 00 00 18 00
print_req_error: critical target error, dev sdb, sector 184820928
sd 32:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sd 32:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current]
sd 32:0:0:0: [sda] tag#0 Add. Sense: Invalid field in cdb
sd 32:0:0:0: [sda] tag#0 CDB: Unmap/Read sub-channel 42 00 00 00 00 00 00 00 18 00
print_req_error: critical target error, dev sda, sector 82568sg实用程序输出:
> sg_vpd /dev/sdb -p lbpv
Logical block provisioning VPD page (SBC):
Unmap command supported (LBPU): 1
Write same (16) with unmap bit supported (LBWS): 0
Write same (10) with unmap bit supported (LBWS10): 0
Logical block provisioning read zeros (LBPRZ): 0
Anchored LBAs supported (ANC_SUP): 0
Threshold exponent: 1
Descriptor present (DP): 0
Minimum percentage: 0
Provisioning type: 2
Threshold percentage: 0
> sg_vpd /dev/sda -p lbpv
Logical block provisioning VPD page (SBC):
Unmap command supported (LBPU): 1
Write same (16) with unmap bit supported (LBWS): 0
Write same (10) with unmap bit supported (LBWS10): 0
Logical block provisioning read zeros (LBPRZ): 0
Anchored LBAs supported (ANC_SUP): 0
Threshold exponent: 1
Descriptor present (DP): 0
Minimum percentage: 0
Provisioning type: 2
Threshold percentage: 0
> sg_inq /dev/sdb -d
standard INQUIRY:
PQual=0 Device_type=0 RMB=0 LU_CONG=0 version=0x06 [SPC-4]
[AERC=0] [TrmTsk=0] NormACA=0 HiSUP=0 Resp_data_format=2
SCCS=0 ACC=0 TPGS=0 3PC=0 Protect=0 [BQue=0]
EncServ=0 MultiP=0 [MChngr=0] [ACKREQQ=0] Addr16=0
[RelAdr=0] WBus16=1 Sync=1 [Linked=0] [TranDis=0] CmdQue=1
length=36 (0x24) Peripheral device type: disk
Vendor identification: VMware
Product identification: Virtual disk
Product revision level: 2.0
> sg_inq /dev/sda -d
standard INQUIRY:
PQual=0 Device_type=0 RMB=0 LU_CONG=0 version=0x06 [SPC-4]
[AERC=0] [TrmTsk=0] NormACA=0 HiSUP=0 Resp_data_format=2
SCCS=0 ACC=0 TPGS=0 3PC=0 Protect=0 [BQue=0]
EncServ=0 MultiP=0 [MChngr=0] [ACKREQQ=0] Addr16=0
[RelAdr=0] WBus16=1 Sync=1 [Linked=0] [TranDis=0] CmdQue=1
length=36 (0x24) Peripheral device type: disk
Vendor identification: VMware
Product identification: Virtual disk
Product revision level: 2.0 发布于 2021-02-27 14:54:32
当您使用unmap来回收空间时,这个任务应该在LUN上完成--本例中是VSAN。我从您的映像中看到,linux服务器正在尝试运行fstrim,但这是不必要的。在vmware上,您可以配置空间回收、选择LUN、配置、通用和设置空间自动回收。另一个问题,为什么你给ISCI luns和vsan?用例是什么?
https://serverfault.com/questions/1054212
复制相似问题