[已重装Debian]sudo zypper up之后出现的一系列问题(感觉像是文件系统的问题)

昨天sudo zypper up时候突然X-Window的GUI就卡住了(表现为点击任何地方都没有反应,鼠标移动到网页的超链接上面也不会变成手型。)然后我就Ctrl+Alt+F1切换到tty,登陆后能输入命令,我就reboot重启了(这时候tty里面显示了一些貌似是出错的信息,我也没仔细看。)。重启之后进入桌面时就卡住了,然后我又重启(是强关还是reboot命令记不得了。),这次进入了桌面,但是Dolphin里面不显示硬盘设备,只得又继续重启,下次进入桌面之后Dolphin正常了。
这时我继续用Konsole sudo zypper up,出现了下列错误提示

( 2/52) 正在安装:libIex-2_2-23-2.2.1-3.2.x86_64 …[错误]
安装 libIex-2_2-23-2.2.1-3.2.x86_64 失败:
错误: Subprocess failed. Error: RPM 失败: error: can’t create transaction lock on /var/lib/rpm/.rpm.lock (Read-only file system)

中止、重试、还是忽略呢? [a/r/i] (a):

然后现在系统很不稳定,经常会卡死。
大家有解决的办法么?
感觉是文件系统出了问题?实在不行我去重装好了。

去翻内核日志,看是为什么文件系统变成只读的。如果只是数据损坏的话重装可以,如果是硬盘故障的话还是得处理的。也可以看一下 SMART 信息。

PS: 你系统不稳定的话,可以用 live 系统去查看。

[ 806.485379] BTRFS error (device sda1): parent transid verify failed on 7956021248 wanted 44353 found 49622
[ 806.494910] BTRFS error (device sda1): parent transid verify failed on 7956021248 wanted 44353 found 49622
[ 806.494922] BTRFS: error (device sda1) in btrfs_run_delayed_refs:2995: errno=-5 IO failure
[ 806.494923] BTRFS info (device sda1): forced readonly
[ 806.504176] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 806.504252] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 806.504397] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 868.869162] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 869.145995] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 869.146264] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 869.147887] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 869.148150] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 870.650529] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 870.650709] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 870.652742] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 871.740028] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 871.740296] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 915.826481] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 915.837591] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 915.837831] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 915.847077] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 932.976119] CE: hpet increased min_delta_ns to 20115 nsec
[ 932.980200] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 946.454648] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 946.455411] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 946.477394] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 946.545446] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 946.554100] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 946.564156] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 946.646290] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 946.646546] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 946.646794] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 946.647108] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system
[ 1703.855729] systemd-journald[461]: Failed to truncate file to its own size: Read-only file system

以上是日志的错误信息
看了SMART,没感觉有什么问题
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 062 Pre-fail Always - 0
2 Throughput_Performance 0x0005 100 100 040 Pre-fail Offline - 0
3 Spin_Up_Time 0x0007 253 253 033 Pre-fail Always - 0
4 Start_Stop_Count 0x0012 098 098 000 Old_age Always - 3979
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
7 Seek_Error_Rate 0x000b 100 100 067 Pre-fail Always - 0
8 Seek_Time_Performance 0x0005 100 100 040 Pre-fail Offline - 0
9 Power_On_Hours 0x0012 025 025 000 Old_age Always - 33125
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 098 098 000 Old_age Always - 3913
191 G-Sense_Error_Rate 0x000a 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 104
193 Load_Cycle_Count 0x0012 078 078 000 Old_age Always - 224778
194 Temperature_Celsius 0x0002 148 148 000 Old_age Always - 37 (Min/Max 6/55)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 110
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x000a 199 199 000 Old_age Always - 358
223 Load_Retry_Count 0x000a 100 100 000 Old_age Always - 0

不过下面有出错的提示
Error 58 occurred at disk power-on lifetime: 33125 hours (1380 days + 5 hours)
When the command that caused the error occurred, the device was active or idle.

有好几个。
我换块硬盘重装好了。
感谢

在已经备份数据的情况下,可以用 Rescue CD 引导对 btrfs 分区做一次 check。

好的,我会先试试,不行就重装:frowning:
谢谢

你的 btrfs 炸啦……(怎么到现在了还经常炸呢,还好我没用在 / 上

sudo snapper list
sudo snapper rollback xx

回退到之前前的状态,再up试试?

我感觉是 btrfs snapshot 进程工作的时候你重启了,把硬盘搞出问题了,可能需要进 singleuser 模式(在内核命令行选项后面加个 1)或者用 rescue live 系统修复硬盘:

btrfsck --repair /dev/sda1

btrfs 如果在 snapshot 或者 balance 的时候强制重启系统有很大几率会出问题。

T^T杯具了

重装了,而且openSUSE那个镜像的U盘还读取有问题,现在用的是Debian,打算用一段时间,谢谢了。

@marguerite 试过了,修复失败,还是谢谢。
@Stawidy 这样啊,知道了,谢谢。