Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Mythtvnz

Dying OS HDD - What would others do?

 

 

MythTV mythtvnz RSS feed   Index | Next | Previous | View Threaded


tortise at paradise

Jul 1, 2012, 1:52 AM

Post #1 of 5 (416 views)
Permalink
Dying OS HDD - What would others do?

Hi
I've got mythbuntu 10.04 LTS running on a backend with 3 x 2TB drives, a
4th 2TB drive connected over eSATA (for media copies and now OS
backups!) and the OS on an oldish 120G SATA HDD that is failing and I
assume is the one making noise....

The reallocated sector count has risen I think with a crash this evening
that required a reboot from 6 to 21 sectors. SMART status has gone from
healthy to unknown.

I've got a 60G SSD that was intended for a new frontend however it seems
I need to use this as a replacement for the OS drive.

The options I see are to
1 run up a new copy of 10.04 and try to copy back stuff
2 try to copy the file system to the new SSD
3 run up a later version.

Starting with 3 I don't want to do this, I think I need to recreate a
working system before I upgrade from:

mythtv0:/usr/share/mythtv$ mythfrontend --version
xprop: unable to open display ''
Please attach all output as a file in bug reports.
MythTV Version : 26863
MythTV Branch : branches/release-0-23-fixes
Network Protocol : 23056
Library API : 0.23.1.201000710-1
QT Version : 4.6.2
Options compiled in:
linux debug using_oss using_alsa using_pulse using_jack
using_pulseoutput using_backend using_dvb using_firewire using_frontend
using_glx_proc_addr_arb using_hdhomerun using_hdpvr using_iptv
using_ivtv using_joystick_menu using_libudev using_lirc using_mheg
using_opengl_video using_opengl_vsync using_qtdbus using_qtwebkit
using_v4l using_x11 using_xrandr using_xv using_xvmc using_xvmc_vld
using_xvmcw using_bindings_perl using_bindings_python using_opengl
using_vdpau using_ffmpeg_threads using_libavc_5_3 using_live using_mheg

to 0.25. Aside from the HDD issues 0.23 is still (largely) meeting our
needs. When I have some time I'll run up 0.25 on a new machine and try
to copy across or start again... For now I need the system to continue
as is.

Option 2 I'm not sure where to start to do it this way however I expect
it could be done, can anyone give me a starting pointer? Or should I do
option 1?

Option 1 seems the most robust - and ? the longest way to do it.

I've been copying stuff off the dying drive.

So far I've copied:
/var/log/
/var/lib/
/var/www/
/home/
/etc/
The database backup is writing to one of the 2T drives so those are also
safe.
I've copied my repo URL's also.
Anything else I need? Any suggestions?

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


stephen_agent at jsw

Jul 1, 2012, 4:14 AM

Post #2 of 5 (363 views)
Permalink
Re: Dying OS HDD - What would others do? [In reply to]

On Sun, 01 Jul 2012 20:52:02 +1200, you wrote:

>Hi
>I've got mythbuntu 10.04 LTS running on a backend with 3 x 2TB drives, a
>4th 2TB drive connected over eSATA (for media copies and now OS
>backups!) and the OS on an oldish 120G SATA HDD that is failing and I
>assume is the one making noise....
>
>The reallocated sector count has risen I think with a crash this evening
>that required a reboot from 6 to 21 sectors. SMART status has gone from
>healthy to unknown.
>
>I've got a 60G SSD that was intended for a new frontend however it seems
>I need to use this as a replacement for the OS drive.
>
>The options I see are to
>1 run up a new copy of 10.04 and try to copy back stuff
>2 try to copy the file system to the new SSD
>3 run up a later version.
>
>Starting with 3 I don't want to do this, I think I need to recreate a
>working system before I upgrade from:
>
>mythtv0:/usr/share/mythtv$ mythfrontend --version
>xprop: unable to open display ''
>Please attach all output as a file in bug reports.
>MythTV Version : 26863
>MythTV Branch : branches/release-0-23-fixes
>Network Protocol : 23056
>Library API : 0.23.1.201000710-1
>QT Version : 4.6.2
>Options compiled in:
> linux debug using_oss using_alsa using_pulse using_jack
>using_pulseoutput using_backend using_dvb using_firewire using_frontend
>using_glx_proc_addr_arb using_hdhomerun using_hdpvr using_iptv
>using_ivtv using_joystick_menu using_libudev using_lirc using_mheg
>using_opengl_video using_opengl_vsync using_qtdbus using_qtwebkit
>using_v4l using_x11 using_xrandr using_xv using_xvmc using_xvmc_vld
>using_xvmcw using_bindings_perl using_bindings_python using_opengl
>using_vdpau using_ffmpeg_threads using_libavc_5_3 using_live using_mheg
>
>to 0.25. Aside from the HDD issues 0.23 is still (largely) meeting our
>needs. When I have some time I'll run up 0.25 on a new machine and try
>to copy across or start again... For now I need the system to continue
>as is.
>
>Option 2 I'm not sure where to start to do it this way however I expect
>it could be done, can anyone give me a starting pointer? Or should I do
>option 1?
>
>Option 1 seems the most robust - and ? the longest way to do it.
>
>I've been copying stuff off the dying drive.
>
>So far I've copied:
>/var/log/
>/var/lib/
>/var/www/
>/home/
>/etc/
>The database backup is writing to one of the 2T drives so those are also
>safe.
>I've copied my repo URL's also.
>Anything else I need? Any suggestions?

The database is the big thing. With that, you can install the same
version of Mythbuntu and then install your database and it should
work. If you have any custom scripts, you will need them too. It
also works to install the database onto a newer MythTV version. On
startup, MythTV will check the database version and upgrade it to the
version it needs. I have done this several times when updating to new
Ubuntu versions.

The procedure for installing an existing database on a new system is
here:

http://www.mythtv.org/wiki/Database_Backup_and_Restore


But what I would do in your situation is Option 2 - just copy the
existing system to a new disk. That is because that should not take
too long unless the failing drive has uncopyable sectors. With
MythTV, I rarely have more than a few hours between recordings when I
can do something like that. So quickest is best for me. What I would
probably do is boot a CD with Clonezilla on it, and use Clonezilla to
make a copy of the partitions on the failing disk. That could be
directly to your new drive, or to image files on another hard disk and
then from there to the new disk. That should take no more than an
hour to do, if it is going to work at all. It should work if SMART
says you do not have any "current pending" sectors (attribute 197), or
"offline uncorrectable" sectors (attribute 198). And it may work even
if you do, as long as those sectors are not currently in use in a
file. Bad sectors that the drive has already managed to remap
(attribute 5) will not cause any problems.

Here is the Clonezilla Live CD:

http://clonezilla.org/clonezilla-live.php

If the backup worked, then you can try booting from the new disk. Due
to the change of disk type, you may need to use the procedure to
install grub onto the new disk from a booted Mythbuntu live CD - there
are web pages to tell you how, but hopefully you will not need to do
that.

If the backup did not work due to damage to the failing disk, then
using Gnu ddrescue to make a copy might still work, but that can take
quite a while due to the massive number of retries that may be needed
to read failing sectors.

I would have a little concern as to whether an SSD drive is properly
supported by 10.04 - I would want to check that first before choosing
it as my new system drive.

As a precaution, I normally have bootable partitions available on at
least two of my data drives, so I can just copy to there and start
running again if I am having problems with my system drive. My system
disk is also a recording drive anyway (3 Tbyte Hitachi - very fast). I
have never had any problems with having my system on a recording
drive, but I have always used a fast disk. I would be wary of doing
it with a "green" type drive.

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


stevehodge at gmail

Jul 1, 2012, 4:25 AM

Post #3 of 5 (363 views)
Permalink
Re: Dying OS HDD - What would others do? [In reply to]

On Sun, Jul 1, 2012 at 8:52 PM, tortise <tortise [at] paradise> wrote:

> Option 2 I'm not sure where to start to do it this way however I expect it
> could be done, can anyone give me a starting pointer? Or should I do option
> 1?
>

I'd try this first. I've done this in the past several times this way:
1. Put the new disk into the system
2. Boot from a live CD
3. Partition and format the new disk
4. Mount the new and the old partitions
5. Copy everything from the old disk to the new disk - you'll need to do
this at the file level
6. Make sure the new disk is bootable. I'm using gentoo so I'm not sure
exactly what you'll need to do here but it shouldn't be hard

Cheers,
Steve


stevehodge at gmail

Jul 1, 2012, 4:32 AM

Post #4 of 5 (362 views)
Permalink
Re: Dying OS HDD - What would others do? [In reply to]

On Sun, Jul 1, 2012 at 11:14 PM, Stephen Worthington <
stephen_agent [at] jsw> wrote:

> What I would
> probably do is boot a CD with Clonezilla on it, and use Clonezilla to
> make a copy of the partitions on the failing disk. That could be
> directly to your new drive, or to image files on another hard disk and
> then from there to the new disk.


In this particular case the new disk is smaller than the old disk so
copying partitions directly probably isn't going to be easy. Though backing
up the partitions to another drive that way is a very good idea.

My system
> disk is also a recording drive anyway (3 Tbyte Hitachi - very fast). I
> have never had any problems with having my system on a recording
> drive, but I have always used a fast disk. I would be wary of doing
> it with a "green" type drive.
>

In my case I've run from a single drive for over 7 years now and never had
a problem. That's a combined BE/FE that also does commflagging. Though I
rarely record more than 3 things at once, and I'm still SD only at the
moment.

Cheers,
Steve


tortise at paradise

Dec 22, 2012, 7:27 PM

Post #5 of 5 (170 views)
Permalink
Re: Dying OS HDD - What would others do? [In reply to]

On 1/07/2012 11:25 p.m., Steve Hodge wrote:
> On Sun, Jul 1, 2012 at 8:52 PM, tortise <tortise [at] paradise
> <mailto:tortise [at] paradise>> wrote:
>
> Option 2 I'm not sure where to start to do it this way however I
> expect it could be done, can anyone give me a starting pointer? Or
> should I do option 1?
>
>
> I'd try this first. I've done this in the past several times this way:
> 1. Put the new disk into the system
> 2. Boot from a live CD
> 3. Partition and format the new disk
> 4. Mount the new and the old partitions
> 5. Copy everything from the old disk to the new disk - you'll need to do
> this at the file level
> 6. Make sure the new disk is bootable. I'm using gentoo so I'm not sure
> exactly what you'll need to do here but it shouldn't be hard
>
> Cheers,
> Steve

Thanks Steve et al. To cap this off this is what I ended up doing (and
have just got around to completing!). I ran up a new install of
mythbuntu 10.04 on the 60GB SSD and copied the database across. It did
not work properly as an example the upcoming recordings were not listed
and seemed lost. I didn't really explore this in much detail, it might
have been a mismatch of mythtv version or possibly it needed install of
tv_grab_nz-py (probably not though) and I was also mindful that issues
right up front is likely to flag other less obvious issues in the
wind... As I didn't want to spend too much time on this (risks of
backend down when the next required recordings expected...etc) as there
was quite a bit to update with customisations, upgrade various apps such
as NVIDIA etc so I decided to buy a 120GB SSD to use instead as that
should make it easy to copy what I have with the various customisations
added.... I tried dd'ing the whole 120G HDD to the SSD however the
partitions did not come through properly (as I'd expected) when it was
subsequently mounted, and it would not boot either which seemed a risky
and/ or long road for a rel. newb to continue down....

I then started again using Steve's steps 1-3, running up a new install
of mythbuntu 10.04 on the 120G SSD drive, mainly for the partitions. I
also installed all the updates, which was arguably a bit excessive
however also reliable for updating grub and anything else unknown to me.
(I'm not entirely sure where grub is, think its in the main partition
however seems it did not matter this way) I took the backend down,
removed the 120 HDD, and put the old and new SSD into a frontend, used
fdisk -l to identify the partitions along with disk utility to confirm I
was copying the right direction. I was surprised and delighted to find
the partition sizes were an exact match. next:

sudo dd if=/dev/sdb1 of=/dev/sdc1 conv=noerror
224825344+0 records in
224825344+0 records out
115110576128 bytes (115 GB) copied, 4363.06 s, 26.4 MB/s

I cloned the main partition, shut down, installed the new SSD in the
backend, fired it up...and bingo, seems fine.

Was it worth it - and should you do it too? The HDD was likely to die
at some stage, and made a vast amount of noise compared to the newer
larger media drives which are largely silent in comparison. The SSD is
of course essentially inaudible in the case (however to my surprise they
are not always silent) Beyond these benefits applications in the backend
start much faster (as does booting up which is infrequently done, mainly
when new kernal images come down), as expected, and mythweb populates a
litle faster, but not as much as I was hoping for. (Perfection would be
no discernible delay)

In anticipation of some list advice the next contemplation seems to be
upgrading from 0.23.... however 0.23 is working very well for me
currently.... Merry Christmas to the list!

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/

MythTV mythtvnz RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.