Bug 350540

Summary: yast2 repair "repair file system" not working.
Product: [openSUSE] openSUSE 11.0 Reporter: Casual J. Programmer <casualprogrammer>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None    
Version: Alpha 2   
Target Milestone: ---   
Hardware: x86   
OS: openSUSE 11.0   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 355010    
Attachments: yast2logs
yast2logs
yast2logs
patch for /usr/share/YaST2/modules/OSRFsck.ycp
yast2logs

Description Casual J. Programmer 2007-12-23 10:10:42 UTC
When running yast2 repair filesystem a message box appears:

Error Detected

The Ext3 file system of the partition /dev/sdb1 is corrupted.
To repair the file system, press Repair.

"Repair" "Skip" "Help"

Pressing repair achieves nothing, the message box goes away and reappears, this can be continued forever.

At least "Help" supplies some information on how to fix it on your own.

Hardware: Notebook FSC Amilo Si1520 
Graphics: Intel 945 GM, LCD 1280*800
Wireless: Intel ipw3945
Sound:    Intel ICH7
Desktop:  GNOME
OS:       openSUSE 11.0 (i586) Alpha0 VERSION = 11.0
Kernel:   2.6.24-rc5-git7-2-default

rpm -qa | grep yast

yast2-trans-wa-2.15.20-2
yast2-trans-cy-2.15.1-34
yast2-trans-pt-2.15.20-2
yast2-trans-zh_CN-2.15.13-2
yast2-control-center-gnome-2.13.2-127
yast2-trans-af-2.15.5-11
yast2-gtk-2.15.9-53
yast2-testsuite-2.16.0-13
yast2-ldap-2.15.1-108
yast2-autofs-2.15.2-95
yast2-control-center-qt-2.16.0-7
yast2-restore-2.16.0-15
yast2-sudo-2.15.3-118
yast2-slide-show-SuSELinux-2.15.16-2
yast2-trans-ar-2.15.4-15
yast2-trans-pot-2.15.2-25
yast2-core-2.16.16-2
yast2-ncurses-2.16.7-3
yast2-sshd-2.16.0-9
yast2-apparmor-2.1-54
yast2-samba-client-2.16.1-13
yast2-ldap-server-2.15.5-104
yast2-storage-evms-2.16.7-2
yast2-trans-bg-2.15.6-2
yast2-trans-hr-2.15.20-2
yast2-trans-vi-2.15.1-34
yast2-trans-pa-2.15.12-11
yast2-pkg-bindings-2.16.7-2
yast2-firewall-2.15.8-35
yast2-printer-2.16.6-7
yast2-kerberos-client-2.16.1-3
yast2-kerberos-server-2.16.0-11
yast2-inetd-2.15.1-72
yast2-printer-devel-doc-2.16.6-7
yast2-trans-xh-2.13.10-2
yast2-trans-zu-2.13.11-2
yast2-trans-stats-2.15.0-46
yast2-trans-ja-2.15.10-2
yast2-CASA-1.7.1461-41
yast2-iscsi-server-2.14.3-115
yast2-tv-2.16.0-27
yast2-dirinstall-2.16.0-13
yast2-installation-2.16.8-2
autoyast2-2.16.3-3
yast2-trans-en_US-2.15.5-19
yast2-trans-de-2.15.29-2
yast2-trans-it-2.15.13-2
yast2-trans-ka-2.15.1-31
yast2-transfer-2.16.0-4
yast2-x11-2.15.11-56
yast2-ldap-client-2.16.5-3
yast2-nfs-client-2.15.0-52
yast2-network-2.16.17-3
yast2-nis-server-devel-doc-2.16.0-31
yast2-casa-ats-1.7.1451-70
yast2-storage-devel-2.16.7-2
yast2-trans-tr-2.15.2-11
yast2-trans-zh_TW-2.15.13-2
yast2-trans-pl-2.15.14-2
yast2-trans-lt-2.15.12-2
yast2-trans-sr-2.15.3-2
yast2-trans-ko-2.15.5-2
yast2-trans-id-2.15.1-34
yast2-xml-2.16.0-10
yast2-add-on-creator-2.16.3-3
yast2-bluetooth-2.15.4-46
yast2-iscsi-client-2.16.2-9
yast2-repair-2.16.2-14
yast2-http-server-2.15.9-4
yast2-theme-openSUSE-2.16.2-2
yast2-trans-nb-2.15.12-2
yast2-trans-en_GB-2.15.6-2
yast2-trans-ta-2.15.5-11
yast2-country-data-2.16.4-3
yast2-trans-ro-2.15.26-2
yast2-trans-ru-2.15.26-2
yast2-trans-nl-2.15.12-2
yast2-trans-mr-2.15.5-11
yast2-trans-lo-2.15.1-31
yast2-core-devel-2.16.16-2
yast2-2.16.18-3
yast2-slp-server-2.15.0-70
yast2-runlevel-2.16.0-15
yast2-multipath-2.13.0-113
yast2-instserver-2.15.4-69
yast2-ntp-client-2.16.2-9
yast2-bootloader-2.16.3-3
yast2-tune-2.15.7-51
yast2-product-creator-2.16.6-4
yast2-samba-server-2.16.0-27
yast2-storage-2.16.7-2
yast2-metapackage-handler-0.7.3-13
yast2-trans-cs-2.15.14-2
yast2-network-devel-doc-2.16.17-3
yast2-trans-fi-2.15.22-2
yast2-trans-sk-2.15.14-2
yast2-trans-da-2.15.14-2
yast2-trans-bs-2.15.1-34
yast2-trans-et-2.15.12-2
yast2-tftp-server-2.14.0-132
yast2-security-2.15.1-52
yast2-ruby-bindings-0.2.0-29
yast2-python-bindings-2.16.2-5
yast2-drbd-2.13.1-78
yast2-scanner-2.15.5-70
yast2-control-center-2.16.0-7
yast2-mouse-2.16.0-13
yast2-update-2.16.1-15
yast2-update-FACTORY-2.16.1-15
yast2-mail-2.15.23-34
yast2-ftp-server-2.15.9-55
yast2-trans-fr-2.15.17-2
yast2-devtools-2.16.3-5
yast2-ca-management-2.16.4-3
yast2-sysconfig-2.15.3-85
yast2-fingerprint-reader-2.16.2-3
yast2-users-2.16.5-3
yast2-live-installer-2.16.1-13
yast2-storage-lib-2.16.7-2
yast2-trans-gu-2.13.6-11
yast2-trans-bn-2.15.7-11
yast2-trans-es-2.15.7-2
yast2-trans-pt_BR-2.15.15-2
yast2-trans-allpacks-2.15.0-48
yast2-country-2.16.4-3
yast2-squid-2.16.0-23
yast2-online-update-2.16.6-3
yast2-online-update-frontend-2.16.6-3
yast2-backup-2.16.1-3
yast2-firstboot-2.16.2-16
yast2-trans-km-2.15.28-2
yast2-trans-jv-2.15.1-31
yast2-trans-uk-2.15.23-2
yast2-trans-fa-2.15.1-31
yast2-irda-2.15.1-122
yast2-isns-1.0.4-34
yast2-registration-2.16.0-15
autoyast2-installation-2.16.3-3
yast2-dhcp-server-2.15.5-47
yast2-trans-sl-2.15.4-2
yast2-trans-el-2.15.14-2
yast2-trans-sv-2.15.12-2
yast2-trans-ca-2.15.4-11
yast2-slp-2.15.0-59
yast2-pkg-bindings-devel-doc-2.16.7-2
yast2-packager-2.16.12-3
yast2-support-2.15.3-42
yast2-mcs-plugin-0.1.0-64
yast2-kdump-2.16.8-3
yast2-profile-manager-2.16.0-14
yast2-qt-2.16.11-2
yast2-trans-gl-2.15.1-34
yast2-trans-si-2.15.2-34
yast2-trans-hi-2.15.6-11
yast2-trans-hu-2.15.18-2
yast2-perl-bindings-2.16.0-29
yast2-devel-doc-2.16.18-3
yast2-nfs-server-2.15.4-52
yast2-nis-server-2.16.0-31
yast2-phone-services-2.15.0-108
yast2-schema-2.15.0-156
yast2-trans-mk-2.15.2-2
yast2-mail-plugins-2.15.23-34
yast2-hardware-detection-2.16.0-7
yast2-sound-2.16.1-17
yast2-pam-2.16.0-24
yast2-nis-client-2.16.0-23
yast2-dns-server-2.16.1-3
yast2-add-on-2.16.0-22
Comment 1 Casual J. Programmer 2007-12-23 10:15:01 UTC
Created attachment 188619 [details]
yast2logs
Comment 2 Jiří Suchomel 2008-01-02 14:09:17 UTC
Sorry, but the logfiles do not mention lauching yast2 repair at all. Please attach correct logs just after you see the problem.
Comment 3 Casual J. Programmer 2008-01-02 15:10:54 UTC
Created attachment 189027 [details]
yast2logs

This should cover it.
Comment 4 Jiří Suchomel 2008-01-03 08:28:44 UTC
Was the error real or was it a false alarm? Which command did you use to actually fix the problem?

Looks like yast2-repair only attempts to repair the file system (using fsck.ext2 -p -f /dev/sdb1) when the check command (fsck.ext2 -n -f) returned 4 ("File system errors left uncorrected" according to man page). This time, the return value of the check command was 8 ("Operational error"). I'm not sure what should be done in that case... Matthias?
Comment 5 Casual J. Programmer 2008-01-03 08:41:02 UTC
Actually the filesystem had some problems which were fixed in the process. I used the 

umount /media/WS6L-Extern1
e2fsck /dev/sdb1 

commands as suggested in the info pane of yast2 repair.

Not sure whether it matters that /dev/sdb1 is an external firewire drive which has no fstab entry as it is only used occasionally.

Comment 6 Jiří Suchomel 2008-01-03 09:00:25 UTC
Hm, and what the exact commands called by YaST (fsck.ext2 -n -f, fsck.ext2 -p -f). Do they work for you from command line?
Comment 7 Casual J. Programmer 2008-01-03 09:24:20 UTC
workstation6l:/home/cjp # umount /media/WS6L-Extern1
workstation6l:/home/cjp # fsck.ext2 -n -f /dev/sdb1
e2fsck 1.40.2 (12-Jul-2007)
Pass 1: Checking inodes, blocks, and sizes

Looks like it's working.
Comment 8 Jiří Suchomel 2008-01-03 09:32:23 UTC
Hm, so is everything fixed already? Does it still report error when you run yast2 repair?
(Because yast reports "Error while iterating over blocks in inode 435272: Illegal triply indirect block found" after fsck.ext2 -n)
Comment 9 Casual J. Programmer 2008-01-03 10:05:31 UTC
Somewhat has changed here. Now at yast2-repair-2.16.2-18.

Running yast2 repair now starts a job on /dev/sdb1 but never ( within the time I am willing to wait for it ) comes to an end. 

Running e2fsck returns:

e2fsck /dev/sdb1
e2fsck 1.40.2 (12-Jul-2007)
WS6L-Extern1 (/dev/sdb1): clean, 86713/24428544 files, 23143939/48839600 blocks

almost immediately.






Comment 10 Casual J. Programmer 2008-01-03 10:07:18 UTC
Created attachment 189130 [details]
yast2logs
Comment 11 Jiří Suchomel 2008-01-03 10:17:05 UTC
Created attachment 189133 [details]
patch for /usr/share/YaST2/modules/OSRFsck.ycp

Strange. Let's add verbose option to fsck.ext2: Patch OSRFsck.ycp, call 'ycpc -c OSRFsck.ycp', try again and attach new log.
Comment 12 Casual J. Programmer 2008-01-03 10:43:07 UTC
OK, maybe I'm too impatient. It now ran through after 12min. Logs attached.
Comment 13 Casual J. Programmer 2008-01-03 10:44:44 UTC
Created attachment 189140 [details]
yast2logs
Comment 14 Jiří Suchomel 2008-01-03 12:15:53 UTC
According to the last y2log, it looks like the check was correct now, right?
Comment 15 Casual J. Programmer 2008-01-03 15:11:20 UTC
Yes the check was OK, but the the drive was marked clean to begin with and the initial problem was that the check was never carried out in the first place but rather some kind of endless loop announcing it. 

Not sure how to recreate the situation. As far as I recall the drive / filesystem hadn't been checked for so many days and also in fact had quite some problems which were fixed.


Comment 16 Jiří Suchomel 2008-01-04 08:19:52 UTC
The initial problem was caused by the situation described in comment 4. fsck.ext2 first returned strange error code, so YaST doesn't really tried to do a repair attempt. Matthias, could I safely call the "repair" run of fsck.ext2 ("fsck.ext2 -p -f" call) when the "check" command ("fsck.ext2 -n") returned 8 ("Operational error" - the error message was "Error while iterating over blocks in inode 435272: Illegal triply indirect block found")?
Comment 17 Matthias Koenig 2008-01-15 13:58:52 UTC
Yes, it should be safe to call the "repair" run after the "check" run returned 8.

Mostly e2fsck returns 8, when something failed in initialisation error, but there might be cases where this is not the case.
Running -p does not hurt as it operates safely, if it detects the requirement for additional corrections it will exit.
Comment 18 Jiří Suchomel 2008-01-21 09:08:23 UTC
Thanks, Matthias.
Fixed in yast2-repair-2.16.4