User:Trogod/System0Maintai

From MythTV Official Wiki
< User:Trogod
Revision as of 03:39, 23 May 2011 by Trogod (talk | contribs) (23 May 2011)

Jump to: navigation, search

disk repair

some links

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?

23 May 2011

I'm in the process of adding a 2 TB hard drive. I booted into a GParted live-CD to format the drive but when I booted back to mythtv, I received the message, again, about not being able to mount /storage. So, here I am again doing fsck

$ sudo parted -l    
Model: ATA Hitachi HDT72101 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt 

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  1000GB  1000GB  jfs


Model: ATA SAMSUNG SP0822N (scsi)
Disk /dev/sdb: 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: SAMSUNG S2H7J9AB303120 (scsi)
Disk /dev/sdc: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2000GB  2000GB  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                                  


$ time sudo fsck.jfs -f /dev/sdb1                               
fsck.jfs version 1.1.12, 24-Aug-2007
processing started: 5/23/2011 3.32.12
The current device is:  /dev/sdb1

The superblock does not describe a correct jfs file system.

If device /dev/sdb1 is valid and contains a jfs file system,
then both the primary and secondary superblocks are corrupt
and cannot be repaired, and fsck cannot continue.

Otherwise, make sure the entered device /dev/sdb1 is correct.


real	0m1.488s
user	0m0.000s
sys	0m0.010s

OOPS, thank you fsck.jfs for catching my typo!! I didn't pay attention enough to the output of parted, I really meant

ubuntu@ubuntu:~$ time sudo fsck.jfs -f /dev/sda1
fsck.jfs version 1.1.12, 24-Aug-2007
processing started: 5/23/2011 3.33.41
The current device is:  /dev/sda1
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.
   146109 kilobytes in 66698 directories.
961693217 kilobytes in 413659 user files.
       20 kilobytes in extended attributes
   507048 kilobytes reserved for system use.
 14707540 kilobytes are available for use.
Filesystem is clean.
.|.......
real	1m46.440s
user	0m2.610s
sys	0m2.540s
ubuntu@ubuntu:~$ time sudo fsck.jfs -n /dev/sda1
fsck.jfs version 1.1.12, 24-Aug-2007
processing started: 5/23/2011 3.36.4
The current device is:  /dev/sda1
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.
   146109 kilobytes in 66698 directories.
961693217 kilobytes in 413659 user files.
       20 kilobytes in extended attributes
   507048 kilobytes reserved for system use.
 14707540 kilobytes are available for use.
File system checked READ ONLY.
Filesystem is clean.

real	1m27.786s
user	0m3.100s
sys	0m1.510s
ubuntu@ubuntu:~$ sudo fsck.ext2 -p /dev/sdb1
/dev/sdb1 was not cleanly unmounted, check forced.
/dev/sdb1: 216/628320 files (1.4% non-contiguous), 116856/1256416 blocks
ubuntu@ubuntu:~$ sudo fsck.ext2 -pv /dev/sdb1
/dev/sdb1: clean, 216/628320 files, 116856/1256416 blocks
ubuntu@ubuntu:~$ sudo fsck.ext2 -pv /dev/sdb3
/dev/sdb3: clean, 131936/983488 files, 796075/3933916 blocks
ubuntu@ubuntu:~$ sudo fsck.ext2 -pv /dev/sdb4
/dev/sdb4: clean, 2236/1313280 files, 242459/5242880 blocks (check in 5 mounts)