是否可以使用命令行禁用磁盘?我收到这样的垃圾邮件:
[2245922.091035] ata3: EH complete
[2245922.150696] ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[2245922.150701] ata3.00: irq_stat 0x40000001
[2245922.150703] ata3.00: failed command: FLUSH CACHE EXT
[2245922.150704] ata3.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 18
res 71/04:00:00:00:00/00:00:00:00:00/a0 Emask 0x1 (device error)
[2245922.150708] ata3.00: status: { DRDY DF ERR }
[2245922.150709] ata3.00: error: { ABRT }
[2245922.151027] ata3.00: configured for UDMA/33
[2245922.151030] ata3.00: device reported invalid CHS sector 0
[2245922.151034] ata3: EH complete
[2245922.238686] ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[2245922.238692] ata3.00: irq_stat 0x40000001
[2245922.238696] ata3.00: failed command: FLUSH CACHE EXT
[2245922.238697] ata3.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 24
res 71/04:00:00:00:00/00:00:00:00:00/a0 Emask 0x1 (device error)
[2245922.238701] ata3.00: status: { DRDY DF ERR }
[2245922.238702] ata3.00: error: { ABRT }
[2245922.239043] ata3.00: configured for UDMA/33
[2245922.239047] ata3.00: device reported invalid CHS sector 0
[2245922.239053] sd 2:0:0:0: [sdd] tag#24 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[2245922.239056] sd 2:0:0:0: [sdd] tag#24 Sense Key : Illegal Request [current]
[2245922.239058] sd 2:0:0:0: [sdd] tag#24 Add. Sense: Unaligned write command
[2245922.239060] sd 2:0:0:0: [sdd] tag#24 CDB: Synchronize Cache(10) 35 00 00 00 00 00 00 00 00 00
[2245922.239063] I/O error, dev sdd, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 0 prio class 3
有问题的磁盘未安装并已从中删除/etc/fstab
sdd 8:48 0 223.6G 0 disk
├─sdd1 8:49 0 1.9G 0 part
├─sdd2 8:50 0 1K 0 part
└─sdd5 8:53 0 221.7G 0 part
# 256GB GALAX SSD
#UUID=48c76170-0392-44ce-a8c6-f790673c8f32 /media/asd/galax250 ext4 noatime,user 0 0
还没有重新启动,因为我还在使用电脑。它使一切都有点滞后。
片段中的最后一行
dmesg
表示写入操作失败。你可以试试:
由于写入缓存,将数据发送到磁盘的应用程序已经“承诺”数据与写入的一样好,内核绝对会努力遵守这一承诺。因此,只要磁盘似乎可用,内核就会继续尝试写入数据。此命令告诉内核准备磁盘以进行热拔出。如果有效,
/dev/sdd
将消失,并且内核可能会尝试在可能的情况下降低磁盘的旋转速度。(如果有人知道如何明确告诉 Linux 内核“我命令你丢失对该磁盘的所有缓存写操作”,请随意写下你自己的答案或将其编辑到这个答案中。)