User:Trogod/System0Maintai
disk repair
3 May 2011
booted from live DVD for mythbuntu
ubuntu@ubuntu:~$ sudo parted -l Model: ATA SAMSUNG SP0822N (scsi) Disk /dev/sda: 80.1GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1287MB 1287MB primary ext2 boot 2 1287MB 10.3GB 9052MB primary linux-swap(v1) 3 10.3GB 26.5GB 16.1GB primary ext3 4 26.5GB 47.9GB 21.5GB primary ext3 Model: ATA Hitachi HDT72101 (scsi) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 1000GB 1000GB jfs Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only. Error: /dev/sr0: unrecognised disk label
and then I ran fsck:
ubuntu@ubuntu:~$ sudo fsck.jfs -n /dev/sdb1 fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 5/4/2011 3.21.10 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 244190429 **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Verify File/Directory Allocation Maps Errors detected in the Fileset File/Directory Allocation Map control information. (F) Errors detected in the Fileset File/Directory Allocation Map. (F) **Phase 8 - Verify Disk Allocation Maps Incorrect data detected in disk allocation control structures. 976761716 kilobytes total disk space. 146077 kilobytes in 66698 directories. 964783365 kilobytes in 413547 user files. 20 kilobytes in extended attributes 513312 kilobytes reserved for system use. 11611096 kilobytes are available for use. File system checked READ ONLY. Filesystem is dirty. Filesystem is dirty but is marked clean. In its present state, the results of accessing /dev/sdb1 (except by this utility) are undefined. ubuntu@ubuntu:~$
and then I tried to fix it
ubuntu@ubuntu:~$ sudo fsck.jfs -f /dev/sdb1 fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 5/4/2011 3.29.15 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 244190429 **Phase 0 - Replay Journal Log **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Rebuild File/Directory Allocation Maps **Phase 8 - Rebuild Disk Allocation Maps 976761716 kilobytes total disk space. 146077 kilobytes in 66698 directories. 964783365 kilobytes in 413547 user files. 20 kilobytes in extended attributes 506992 kilobytes reserved for system use. 11617416 kilobytes are available for use. Filesystem is clean.
and ran it again, just to check...
ubuntu@ubuntu:~$ sudo fsck.jfs -n /dev/sdb1 fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 5/4/2011 3.32.51 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 244190429 **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Verify File/Directory Allocation Maps **Phase 8 - Verify Disk Allocation Maps 976761716 kilobytes total disk space. 146077 kilobytes in 66698 directories. 964783365 kilobytes in 413547 user files. 20 kilobytes in extended attributes 506992 kilobytes reserved for system use. 11617416 kilobytes are available for use. File system checked READ ONLY. Filesystem is clean. ubuntu@ubuntu:~$
13 May 2011
There was, apparently, a power failure, today. My wife booted up the System0, but it didn't boot properly. There was some text on the screen with some error messages about mounting filesystems. I should've paid closer attention to those messages. Instead, I went straight to trying to repair the filesystems. I booted from live DVD for mythbuntu
ubuntu@ubuntu:~$ sudo parted -l Model: ATA SAMSUNG SP0822N (scsi) Disk /dev/sda: 80.1GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1287MB 1287MB primary ext2 boot 2 1287MB 10.3GB 9052MB primary linux-swap(v1) 3 10.3GB 26.5GB 16.1GB primary ext3 4 26.5GB 47.9GB 21.5GB primary ext3 Model: ATA Hitachi HDT72101 (scsi) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 1000GB 1000GB jfs Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 vhas been opened read-only. vError: /dev/sr0: unrecognised disk label
then I checked for errors
ubuntu@ubuntu:~$ sudo fsck.jfs -n /dev/sdb1 fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 5/13/2011 2.43.16 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 244190429 **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Verify File/Directory Allocation Maps Errors detected in the Fileset File/Directory Allocation Map control information. (F) Errors detected in the Fileset File/Directory Allocation Map. (F) **Phase 8 - Verify Disk Allocation Maps Incorrect data detected in disk allocation control structures. 976761716 kilobytes total disk space. 146089 kilobytes in 66698 directories. 953111998 kilobytes in 413620 user files. 20 kilobytes in extended attributes 507043 kilobytes reserved for system use. 23288744 kilobytes are available for use. File system checked READ ONLY. Filesystem is dirty. Filesystem is dirty but is marked clean. In its present state, the results of accessing /dev/sdb1 (except by this utility) are undefined.
then I attempted repair
ubuntu@ubuntu:~$ time sudo fsck.jfs -f /dev/sdb1 fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 5/13/2011 2.45.33 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 244190429 **Phase 0 - Replay Journal Log **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Rebuild File/Directory Allocation Maps **Phase 8 - Rebuild Disk Allocation Maps 976761716 kilobytes total disk space. 146089 kilobytes in 66698 directories. 953111998 kilobytes in 413620 user files. 20 kilobytes in extended attributes 506995 kilobytes reserved for system use. 23288792 kilobytes are available for use. Filesystem is clean. real 1m51.009s user 0m2.770s sys 0m2.390s
ubuntu@ubuntu:~$ sudo fsck.jfs -n /dev/sdb1 fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 5/13/2011 2.48.53 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 244190429 **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Verify File/Directory Allocation Maps **Phase 8 - Verify Disk Allocation Maps 976761716 kilobytes total disk space. 146089 kilobytes in 66698 directories. 953111998 kilobytes in 413620 user files. 20 kilobytes in extended attributes 506995 kilobytes reserved for system use. 23288792 kilobytes are available for use. File system checked READ ONLY. Filesystem is clean.
ubuntu@ubuntu:~$ sudo fsck.ext2 -p /dev/sda1 /dev/sda1 was not cleanly unmounted, check forced. /dev/sda1: 216/628320 files (1.4% non-contiguous), 116856/1256416 blocks ubuntu@ubuntu:~$ sudo fsck.ext2 -pv /dev/sda1 /dev/sda1: clean, 216/628320 files, 116856/1256416 blocks ubuntu@ubuntu:~$ sudo fsck.ext2 -pv /dev/sda2 /dev/sda2 is mounted. WARNING!!! The filesystem is mounted. If you continue you ***WILL*** cause ***SEVERE*** filesystem damage. Do you really want to continue (y/n)? no check aborted.
oh, yeah - that's the swap partititon. oops....
ubuntu@ubuntu:~$ sudo fsck.ext2 -pv /dev/sda3 /dev/sda3: clean, 131773/983488 files, 790678/3933916 blocks ubuntu@ubuntu:~$ sudo fsck.ext2 -pv /dev/sda4 /dev/sda4: clean, 1801/1313280 files, 218299/5242880 blocks
So both my /storage drive (/dev/sdb1) and my boot partition (/dev/sda1) needed repair...
when I rebooted, mythtv complained that it couldn't talk to the backend. I quit the frontend and check the log of the backend. I couldn't tell if any of the messages were particularly bad. there were some messages that seem to indicate that it couldn't talk to my HDHomeRun tuner. I restarted the frontend and found that I was able to play recorded shows. After I noticed that live TV didn't seem to be working, I tried to reboot.
On reboot, there was a message about a problem trying to mount /storage. ugh!!
So, I booted from the CD again and ran fsck
ubuntu@ubuntu:~$ time sudo fsck.jfs -f /dev/sdb1 fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 5/13/2011 3.54.20 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 244190429 **Phase 0 - Replay Journal Log **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Rebuild File/Directory Allocation Maps **Phase 8 - Rebuild Disk Allocation Maps 976761716 kilobytes total disk space. 146097 kilobytes in 66698 directories. 940169594 kilobytes in 413669 user files. 20 kilobytes in extended attributes 506987 kilobytes reserved for system use. 36231212 kilobytes are available for use. Filesystem is clean. .|....... real 1m47.821s user 0m2.940s sys 0m2.330s ubuntu@ubuntu:~$ time sudo fsck.ext2 -p /dev/sda1 /dev/sda1: clean, 216/628320 files, 116856/1256416 blocks real 0m5.592s user 0m0.000s sys 0m0.040s ubuntu@ubuntu:~$ time sudo fsck.ext2 -p /dev/sda3 /dev/sda3: clean, 131774/983488 files, 790797/3933916 blocks real 0m0.347s user 0m0.000s sys 0m0.010s ubuntu@ubuntu:~$ time sudo fsck.ext2 -p /dev/sda4 /dev/sda4: clean, 1921/1313280 files, 234080/5242880 blocks real 0m0.266s user 0m0.000s sys 0m0.010s
then I rebooted again. I bet I need a new hard drive for /storage...
17 May 2011
again, apparently a power outage. When I tried to boot System0, it complained of trouble mounting /storage, so back to fsck...
ubuntu@ubuntu:~$ sudo parted -l Model: ATA SAMSUNG SP0822N (scsi) Disk /dev/sda: 80.1GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1287MB 1287MB primary ext2 boot 2 1287MB 10.3GB 9052MB primary linux-swap(v1) 3 10.3GB 26.5GB 16.1GB primary ext3 4 26.5GB 47.9GB 21.5GB primary ext3 Model: ATA Hitachi HDT72101 (scsi) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 1000GB 1000GB jfs Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only. Error: /dev/sr0: unrecognised disk label
ubuntu@ubuntu:~$ time sudo fsck.jfs -f /dev/sdb1 fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 5/17/2011 2.39.13 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 244190429 **Phase 0 - Replay Journal Log **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems File system object FF8765 is linked as: /mythtv/recordings/1071_20110516003400.mpg cannot repair the data format error(s) in this file. cannot repair FF8765. Will release. **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Rebuild File/Directory Allocation Maps **Phase 8 - Rebuild Disk Allocation Maps 976761716 kilobytes total disk space. 146105 kilobytes in 66698 directories. 952457952 kilobytes in 413640 user files. 20 kilobytes in extended attributes 507049 kilobytes reserved for system use. 23942800 kilobytes are available for use. Filesystem is clean. .|....... real 1m45.254s user 0m2.900s sys 0m2.360s
ubuntu@ubuntu:~$ sudo fsck.jfs -n /dev/sdb1 fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 5/17/2011 2.41.34 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 244190429 **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Verify File/Directory Allocation Maps **Phase 8 - Verify Disk Allocation Maps 976761716 kilobytes total disk space. 146105 kilobytes in 66698 directories. 952457952 kilobytes in 413640 user files. 20 kilobytes in extended attributes 507049 kilobytes reserved for system use. 23942800 kilobytes are available for use. File system checked READ ONLY. Filesystem is clean.
and my primary drive...
ubuntu@ubuntu:~$ sudo fsck.ext2 -p /dev/sda1 /dev/sda1 was not cleanly unmounted, check forced. /dev/sda1: 216/628320 files (1.4% non-contiguous), 116856/1256416 blocks ubuntu@ubuntu:~$ sudo fsck.ext2 -pv /dev/sda1 /dev/sda1: clean, 216/628320 files, 116856/1256416 blocks ubuntu@ubuntu:~$ sudo fsck.ext2 -pv /dev/sda3 /dev/sda3: clean, 131781/983488 files, 792256/3933916 blocks ubuntu@ubuntu:~$ sudo fsck.ext2 -pv /dev/sda4 /dev/sda4: clean, 1931/1313280 files, 234856/5242880 blocks
again, both the boot partition and /storage needed repair. Ugh! why doesn't ubuntu fix this itself?