Ubuntu 22.04 在三星 870 SSD 上修改文件时冻结

Ubuntu 22.04 在三星 870 SSD 上修改文件时冻结

我最近将旧硬盘换成了 2 个新 SSD:

  • 一个是三星 980 SSD(NVMe),我在上面安装了 Ubuntu 22.04。还在同一 SSD 的另一个分区上安装了 Windows 10,实现了双启动。
  • 另一个是三星 870 SSD(SATA),我将工作数据存储在其中

然而今天当我做这些事情时我的电脑死机了两次:

  1. 在 VSCode 中搜索文件(在三星 870 上保存的项目中)。当我开始输入搜索关键字时,计算机立即冻结,VSCode 开始索引项目中的文件
  2. 在本地为我的项目构建 docker 镜像,并保存在 870 上(我不记得我的电脑冻结的具体构建步骤)

请注意,这些实例是连续发生的:重新启动以退出第一个实例后,我立即遇到了第二个实例。

其他一些信息/我为隔离问题所采取的措施

  • 我还注意到,每次使用三星 870 执行某些操作(例如删除文件、移动文件等)时,笔记本电脑风扇的声音都会大得多。但是 SSD 温度只有 45-50°C 左右
  • 每次电脑死机时,我都必须使用电源按钮强制关机,重新启动时,我必须使用磁盘
  • 我已将我的项目暂时移至三星 980 上的 Ubuntu 分区,到目前为止还没有遇到类似的冻结问题。我以前将文件存储在安装 Ubuntu 的同一分区中的旧 SSD 也从未遇到过同样的问题。
  • 我曾经smartctl检查过这两款 SSD,它们都处于良好状态。特别是 870,请参见下面的结果。
  • 我曾在三星 870 上安装 Windows 10 来玩视频游戏,没有遇到任何延迟或冻结的情况,因此我怀疑该问题仅存在于 Ubuntu 中。

问题:由于该问题仅发生在三星 870 SATA 和 Ubuntu 上,我觉得这不是硬件问题,可能需要进行一些配置才能解决这个问题?

我的笔记本电脑规格

OS: Ubuntu 22.04.4 LTS x86_64 
Host: Strix 15 GL503GE 1.0 
Kernel: 6.5.0-28-generic 
Uptime: 46 mins 
Packages: 1956 (dpkg), 15 (snap) 
Shell: zsh 5.8.1 
Resolution: 1920x1080, 1920x1080 
DE: GNOME 42.9 
WM: Mutter 
WM Theme: Adwaita 
Theme: Yaru-prussiangreen-dark [GTK2/3] 
Icons: Yaru-prussiangreen [GTK2/3] 
Terminal: tilix 
CPU: Intel i7-8750H (12) @ 4.100GHz 
GPU: Intel CoffeeLake-H GT2 [UHD Graphics 630] 
GPU: NVIDIA GeForce GTX 1050 Ti Mobile 
Memory: 3962MiB / 31940MiB 

Samsung 870 的 smartctl 结果

=== START OF INFORMATION SECTION ===
Device Model:     Samsung SSD 870 EVO 500GB
Serial Number:    S7BWNJ0WB47795Y
LU WWN Device Id: 5 002538 f33b32a62
Firmware Version: SVT02B6Q
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Apr 21 02:33:10 2024 +07
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (    0) seconds.
Offline data collection
capabilities:            (0x53) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    No Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   2) minutes.
Extended self-test routine
recommended polling time:    (  85) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   099   099   000    Old_age   Always       -       86
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       55
177 Wear_Leveling_Count     0x0013   099   099   000    Pre-fail  Always       -       1
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   100   100   010    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0032   063   051   000    Old_age   Always       -       37
195 Hardware_ECC_Recovered  0x001a   200   200   000    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x003e   100   100   000    Old_age   Always       -       0
235 Unknown_Attribute       0x0012   099   099   000    Old_age   Always       -       22
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       647008219
252 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       1

SMART Error Log Version: 1
No Errors Logged

相关内容