I have a Debian 10 Host running a Debian 10 virtual machine with QEMU / KVM. In the past few days, I got the "Error: Read-only file system" twice, after the virtual machine was running some intensive tasks for multiple hours.
I rebooted the virtual machine each time. It was telling me at boot that a manual fsck is required. I used the command
fsck -yf /dev/sda1
to fix the problem.
It worked each time, still, I want to find out what the issue is and to prevent it in the future.
I used gsmartcontrol
to perform an extended check on the main drive (on the host). No errors were reported. I also used sudo smartctl -data -A /dev/sda
, which reported:
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-5.10.0-0.bpo.9-amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
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 096 096 000 Old_age Always - 19026
12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 238
177 Wear_Leveling_Count 0x0013 091 091 000 Pre-fail Always - 126
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 058 037 000 Old_age Always - 42
195 Hardware_ECC_Recovered 0x001a 200 200 000 Old_age Always - 0
199 UDMA_CRC_Error_Count 0x003e 099 099 000 Old_age Always - 1
235 Unknown_Attribute 0x0012 099 099 000 Old_age Always - 88
241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 76536051093
which looks ok to me, wear still being above 90%. So it doesn't look like a hardware issue to me. What else can it be that makes my disk to keep failing?
My VM also has an LVM partition mounted via 9p
, connected via the Default: Mapped
driver in KVM. However, the VM is located on the main host drive. I also tried to write a new file to the mounted LVM partition after the read-only filesystem error occurred, which worked without an error. So I also don't think this partition is related to the error, to be honest.
Any idea what it could be?
0 Answers