Jump to content


Welcome to DBSTalk


Sign In 

Create Account
Welcome to DBSTalk. Our community covers all aspects of video delivery solutions including: Direct Broadcast Satellite (DBS), Cable Television, and Internet Protocol Television (IPTV). We also have forums to discuss popular television programs, home theater equipment, and internet streaming service providers. Members of our community include experts who can help you solve technical problems, industry professionals, company representatives, and novices who are here to learn.

Like most online communities you must register to view or post in our community. Sign-up is a free and simple process that requires minimal information. Be a part of our community by signing in or creating an account. The Digital Bit Stream starts here!
  • Reply to existing topics or start a discussion of your own
  • Subscribe to topics and forums and get email updates
  • Send private personal messages (PM) to other forum members
  • Customize your profile page and make new friends
 
Guest Message by DevFuse

Photo
- - - - -

How to: Copy and Replace Internal Hard Drive


  • Please log in to reply
666 replies to this topic

Poll: I have read the disclaimer and I understand that this process in NOT recommended (611 member(s) have cast votes)

I have read the disclaimer and I understand that this process in NOT recommended

  1. YES - I agree I will not tamper with my leased equipment (424 votes [69.39%] - View)

    Percentage of vote: 69.39%

  2. NO - I agree to accept full financial responsibility for breaking my Customer Agreement (187 votes [30.61%] - View)

    Percentage of vote: 30.61%

Vote Guests cannot vote

#226 OFFLINE   jangell2

jangell2

    Godfather

  • Registered
  • 310 posts
Joined: Apr 06, 2004

Posted 05 November 2010 - 09:06 AM

I tried another restore this morning. Again it failed. I left the original drive turned off overnight, hoping the rest might help it work long enough to be restored to the new drive, but it didn't work.

I could not figure out how to do a cut and past of the terminal screen. I could not see any way to do it. When I clicked on help, nothing came up. So I took photos with my iphone. I've included them as attachments.

The first photo is of the first restore yesterday. This was followed by many error messages which are the same as the errors I got today and that is the third picture. Note the warning in this one.

The second photo is today's restore and it looks different. It refers to a simple strategy.

The third photo contains the error messages received after today's restore. These are the same kind of errors received for the first restore. The errors start occurring at about the same point. Yesterday it was something like 840 seconds and today it was 945 seconds.

Attached Thumbnails

  • IMG_0432[1].jpg
  • IMG_0442[1].jpg
  • IMG_0445[1].jpg

johnny
www.teamfurr.org

...Ads Help To Support This Site...

#227 OFFLINE   P Smith

P Smith

    Mr. FixAnything

  • Registered
  • 20,225 posts
  • LocationMediterranean Sea
Joined: Jul 25, 2002

Posted 05 November 2010 - 10:47 AM

Just for sanity - run fsck for the source drive.

#228 OFFLINE   jangell2

jangell2

    Godfather

  • Registered
  • 310 posts
Joined: Apr 06, 2004

Posted 05 November 2010 - 12:34 PM

Just for sanity - run fsck for the source drive.

Should the command go like this?
fsck -sAR -t xfs /dev/sdb2

I don't know linux and did a little googling to arrive at this. Not sure how correct it is? For instance, should that be sdb2 or sdb3?
johnny
www.teamfurr.org

#229 OFFLINE   P Smith

P Smith

    Mr. FixAnything

  • Registered
  • 20,225 posts
  • LocationMediterranean Sea
Joined: Jul 25, 2002

Posted 05 November 2010 - 01:07 PM

I wouldn't use "-sAR" parameters - it's for use /etc/fstab what is not the case. If it will complain about rtdev, then try to add it to the line...

#230 OFFLINE   jangell2

jangell2

    Godfather

  • Registered
  • 310 posts
Joined: Apr 06, 2004

Posted 05 November 2010 - 01:17 PM

I wouldn't use "-sAR" parameters - it's for use /etc/fstab what is not the case. If it will complain about rtdev, then try to add it to the line...

So it would read:
fsck -t xfs /dev/sdb2

Should it be sdb2 or sdb3?
johnny
www.teamfurr.org

#231 OFFLINE   leres

leres

    Mentor

  • Registered
  • 42 posts
Joined: Jun 02, 2007

Posted 05 November 2010 - 01:59 PM

I recently upgraded one of my HR20-100s from 750GB to a 1.5TB. Here are a few things I learned in the process.

I started with the current stable gparted live (0.7.0-3). The dump/restore starts ok but then stalls. After a couple of hours I looked at /proc/<pid>/io and it was clear neither xfsdump nor xfsrestore were doing anything. I was able to kill xfsdump (which was good because it allowed me to cleanly dismount my original disk) but not xfsrestore.

I tried one more time but got errors about the incomplete restore so I decided the safest course was to have the HR20-100 format the drive. To do this I used dd to zero out the first part of the disk:

dd if=/dev/zero of=/dev/sdb bs=8K count=512


and then booted the HR20 with the drive connected. (And just to be safe, I removed the original disk before this step.)

It's a pain that you have to wait for the HR20 to boot before you can perform a clean shutdown. A trick I found is that if the DVR is not connected to the satellite it quickly gives an error and then you can use the front panel buttons (menu and arrow keys) to reboot.

As noted, If the disks are different sizes you can use the gparted window to see which one is sda or sdb. But when you have both disks mounted, you can also tell but looking at viewer/messages*. The original disk will have more than one of these and they will contain timestamps spanning multiple days but the new disk will one have one messages file with a short range of timestamps.

One final trick is to mount the original disk read/only:

mount -t xfs -o ro -o rtdev=/dev/sdb3 /dev/sdb2 /mnt/hr20


It'll protect you if you get the xfsdump|xfsrestore backwards and the filesystem won't be marked unclean if the system crashes.

Ultimately, I burned a 0.3.7-7 gparted live CD, reinitialized my new disk and was able to complete the copy without errors. I think xfsdump said the backup was about 500GB and it took slightly less than 3 hours for the process to complete.
HR20-100
THR22-100

#232 OFFLINE   P Smith

P Smith

    Mr. FixAnything

  • Registered
  • 20,225 posts
  • LocationMediterranean Sea
Joined: Jul 25, 2002

Posted 05 November 2010 - 02:15 PM

So it would read:
fsck -t xfs /dev/sdb2

Should it be sdb2 or sdb3?

Yes, the partition is sdb2, while sdb3 is real-time extension; I expect it will ask to include the extension somehow.

#233 OFFLINE   jangell2

jangell2

    Godfather

  • Registered
  • 310 posts
Joined: Apr 06, 2004

Posted 05 November 2010 - 02:44 PM

I started with the current stable gparted live (0.7.0-3). The dump/restore starts ok but then stalls.

I tried one more time but got errors about the incomplete restore so I decided the safest course was to have the HR20-100 format the drive. To do this I used dd to zero out the first part of the disk:

dd if=/dev/zero of=/dev/sdb bs=8K count=512


and then booted the HR20 with the drive connected. (And just to be safe, I removed the original disk before this step.)


Are you entering that command in the gparted terminal window? The first thing I did was to attach the new drive as an esata and my HR20 successfully formatted it. Not sure if I need to do it again.

Ultimately, I burned a 0.3.7-7 gparted live CD, reinitialized my new disk and was able to complete the copy without errors. I think xfsdump said the backup was about 500GB and it took slightly less than 3 hours for the process to complete.

Why did you settle on that release of gparted. Others are touting 0.4.6-1, however I'm open to using a differnet version.

Unfortunately, I've not got a problem of the process hanging up, it just encounters errors and is not successful. If you look up a few messages you'll see my latest with attached images.
johnny
www.teamfurr.org

#234 OFFLINE   jangell2

jangell2

    Godfather

  • Registered
  • 310 posts
Joined: Apr 06, 2004

Posted 05 November 2010 - 02:49 PM

Yes, the partition is sdb2, while sdb3 is real-time extension; I expect it will ask to include the extension somehow.

I notice thee are 3 partitions on the disk. Only part 2 is known to be xfs file system, while gparted indicates 1 & 3 are unknown. Based on the size, part 3 contains the recorded programs. Gparted only knows how much is used for part 2.
johnny
www.teamfurr.org

#235 OFFLINE   leres

leres

    Mentor

  • Registered
  • 42 posts
Joined: Jun 02, 2007

Posted 05 November 2010 - 03:12 PM

Are you entering that command in the gparted terminal window? The first thing I did was to attach the new drive as an esata and my HR20 successfully formatted it. Not sure if I need to do it again.


Yes, in a gparted live terminal window.

(BTW, my post wasn't in reponse to yours; I was posting my own experiences/comments.)

If you start a xfsdump|xfsrestore and it fails to complete, it leaves the "new" xfs filesystem in an incomplete state. I was showing how to use dd to force the DVR put a fresh filsystem on it.

Why did you settle on that release of gparted. Others are touting 0.4.6-1, however I'm open to using a differnet version.


I used 0.3.7-7 because it's the version listed in the instructions; I figured there was a good chance it would work. It would appear 0.7.0-3 is too new.

I'm not really interested in finding the latest version that will work; what I wanted is the version that has the best chances of working...
HR20-100
THR22-100

#236 OFFLINE   P Smith

P Smith

    Mr. FixAnything

  • Registered
  • 20,225 posts
  • LocationMediterranean Sea
Joined: Jul 25, 2002

Posted 05 November 2010 - 03:13 PM

As mentioned before, partition#3 is REAL-TIME EXTENSION, ie not regular separate partition.

#237 OFFLINE   jangell2

jangell2

    Godfather

  • Registered
  • 310 posts
Joined: Apr 06, 2004

Posted 05 November 2010 - 03:50 PM

If you start a xfsdump|xfsrestore and it fails to complete, it leaves the "new" xfs filesystem in an incomplete state. I was showing how to use dd to force the DVR put a fresh filsystem on it.

Even though my process is not completing the way I want, it apparently is completing successfully, it even gives that message. It's encountering errors on the original drive. When I put the new drive as an esata in the HR20 it shows up when get a Play List. Of course it's empty.
johnny
www.teamfurr.org

#238 OFFLINE   jangell2

jangell2

    Godfather

  • Registered
  • 310 posts
Joined: Apr 06, 2004

Posted 05 November 2010 - 03:55 PM

Just for sanity - run fsck for the source drive.

When I ran the fsck I'm told use xfs_check or xfs_repair. I had already done it, but ran it again.

What I entered was:
xfs_repair -t -L -r /dev/sdb3 /dev/sdb2

Than I did the restore process and got the same results. I can't think of anything else to try, it would appear my original drive has deteriorated so much it cannot be read accurately.
johnny
www.teamfurr.org

#239 OFFLINE   ntrance

ntrance

    Legend

  • Registered
  • 147 posts
Joined: Aug 18, 2006

Posted 05 November 2010 - 04:01 PM

I could not figure out how to do a cut and past of the terminal screen. I could not see any way to do it.

Here's a way to cut and paste:
Boot gparted with a thumb drive attached in addition to the SATA drives. The thumb drive can actually be inserted at any time, but if you insert it before booting, then you can easily see the drive letter within the gparted gui without having to refresh devices in the gui, or typing fdisk -l. Within gparted, leave the window used to do the copying open, and open a second terminal window
In that second window, type:

root@debian:~# mkdir /mnt/usb
root@debian:~# mount /dev/sd?1 /mnt/usb (where ? is the letter of the USB drive)
root@debian:~# nano /mnt/usb/copylog.txt

Highlight text from first terminal window, use middle mouse button to paste within nano.

Press ctrl-o, then enter, then ctrl-x

root@debian:~# umount /mnt/usb

Remove usb drive and view text file on your main computer.

Edited by ntrance, 05 November 2010 - 06:37 PM.


#240 OFFLINE   P Smith

P Smith

    Mr. FixAnything

  • Registered
  • 20,225 posts
  • LocationMediterranean Sea
Joined: Jul 25, 2002

Posted 05 November 2010 - 04:15 PM

When I ran the fsck I'm told use xfs_check or xfs_repair. I had already done it, but ran it again.

What I entered was:
xfs_repair -t -L -r /dev/sdb3 /dev/sdb2

Than I did the restore process and got the same results. I can't think of anything else to try, it would appear my original drive has deteriorated so much it cannot be read accurately.

That's close to what I expect [-r /dev/sdb3] - is your Gparted distro has the xfs_check ?

#241 OFFLINE   ntrance

ntrance

    Legend

  • Registered
  • 147 posts
Joined: Aug 18, 2006

Posted 05 November 2010 - 04:34 PM

When I ran the fsck I'm told use xfs_check or xfs_repair. I had already done it, but ran it again.

What I entered was:
xfs_repair -t -L -r /dev/sdb3 /dev/sdb2

Than I did the restore process and got the same results. I can't think of anything else to try, it would appear my original drive has deteriorated so much it cannot be read accurately.

Did you run xfs_check first? What was the output?

For xfs_repair, I believe you would need to specify an interval to use the -t option, like -t 1 for one minute intervals. I wouldn't think you would want to delete the log file -L unless you had too. What was the output of xfs_repair?

#242 OFFLINE   jangell2

jangell2

    Godfather

  • Registered
  • 310 posts
Joined: Apr 06, 2004

Posted 05 November 2010 - 04:54 PM

Did you run xfs_check first? What was the output?

For xfs_repair, I believe you would need to specify an interval to use the -t option, like -t 1 for one minute intervals. I wouldn't think you would want to delete the log file -L unless you had too. What was the output of xfs_repair?

I didn't run the check. The output of the xfs_repair is in the attached file. It spans 2 iphone pics and in the second you see the results of the attempted restore before the error messages started. They are the same as previous pics.

Attached Thumbnails

  • IMG_0446[1].jpg
  • IMG_0448[1].jpg

johnny
www.teamfurr.org

#243 OFFLINE   ntrance

ntrance

    Legend

  • Registered
  • 147 posts
Joined: Aug 18, 2006

Posted 05 November 2010 - 05:04 PM

I recently upgraded one of my HR20-100s from 750GB to a 1.5TB. Here are a few things I learned in the process.

I started with the current stable gparted live (0.7.0-3). The dump/restore starts ok but then stalls. After a couple of hours I looked at /proc/<pid>/io and it was clear neither xfsdump nor xfsrestore were doing anything. I was able to kill xfsdump (which was good because it allowed me to cleanly dismount my original disk) but not xfsrestore.

I tried one more time but got errors about the incomplete restore so I decided the safest course was to have the HR20-100 format the drive. To do this I used dd to zero out the first part of the disk:

dd if=/dev/zero of=/dev/sdb bs=8K count=512


and then booted the HR20 with the drive connected. (And just to be safe, I removed the original disk before this step.)

It's a pain that you have to wait for the HR20 to boot before you can perform a clean shutdown. A trick I found is that if the DVR is not connected to the satellite it quickly gives an error and then you can use the front panel buttons (menu and arrow keys) to reboot.

As noted, If the disks are different sizes you can use the gparted window to see which one is sda or sdb. But when you have both disks mounted, you can also tell but looking at viewer/messages*. The original disk will have more than one of these and they will contain timestamps spanning multiple days but the new disk will one have one messages file with a short range of timestamps.

One final trick is to mount the original disk read/only:

mount -t xfs -o ro -o rtdev=/dev/sdb3 /dev/sdb2 /mnt/hr20


It'll protect you if you get the xfsdump|xfsrestore backwards and the filesystem won't be marked unclean if the system crashes.

Ultimately, I burned a 0.3.7-7 gparted live CD, reinitialized my new disk and was able to complete the copy without errors. I think xfsdump said the backup was about 500GB and it took slightly less than 3 hours for the process to complete.

I like the tip about leaving the DVR disconnected from the satellite because the DVR boot process sure is long. I wish the original instructions would get updated with working versions of gparted like I linked in post 220. Additionally, if the instructions were updated to include progress reporting (i.e. xfsdump -J - /mnt/hr20 | xfsrestore -J -p 600 - /mnt/fap) people would be able to spot problems much earlier.
hdparm -i /dev/sd? (where ? is the letter of one of the drives) will give model number and serial number info, which is another way to distinguish drives of the same size.
Just to clarify, getting the xfsdump|xfsrestore backwards will not destroy your recordings. Normally, it would be the target file system that would be left unclean during an aborted copy, so I'm not sure the -o ro on the source drive buys you any additional safety.

#244 OFFLINE   ntrance

ntrance

    Legend

  • Registered
  • 147 posts
Joined: Aug 18, 2006

Posted 05 November 2010 - 05:17 PM

I didn't run the check. The output of the xfs_repair is in the attached file. It spans 2 iphone pics and in the second you see the results of the attempted restore before the error messages started. They are the same as previous pics.


Try using the DVR to fix the original disk using the instructions in this post:

http://www.dbstalk.c...294#post2504294

Follow that with a graceful shutdown, and retry the copy procedure. If that doesn't work try xfs_check, and report back. You can also try xfs_repair without deleting the log after that.

#245 OFFLINE   jangell2

jangell2

    Godfather

  • Registered
  • 310 posts
Joined: Apr 06, 2004

Posted 06 November 2010 - 08:42 AM

Try using the DVR to fix the original disk using the instructions in this post:

http://www.dbstalk.c...294#post2504294

Follow that with a graceful shutdown, and retry the copy procedure. If that doesn't work try xfs_check, and report back. You can also try xfs_repair without deleting the log after that.

It just so happens that yesterday the receiver did do a scan on it's own. When I booted it up with the original esata drive attached it said there was a problem with it and did a scan. When the receiver did boot up, it was running on the internal drive. So that's been done.

I'll try your cut and past and do an xfs_check, than a repair without deleting the log, and then the restore. Try to do cut and pastes for everything.
johnny
www.teamfurr.org

#246 OFFLINE   jangell2

jangell2

    Godfather

  • Registered
  • 310 posts
Joined: Apr 06, 2004

Posted 06 November 2010 - 11:03 AM

I'm running the xfs_check now. I first entered
xfs_check /dev/sdb2
and nothing seemed to be happening, so I reran it with the verbose command and now I'm getting a million messages. It's beein running for at least a couple of hours. I'm seeing messages like "setting block nnnn to free1" and "setting rtblock nnnn to rtfree." The "setting" implies it's making changes, is that true?
johnny
www.teamfurr.org

#247 OFFLINE   jangell2

jangell2

    Godfather

  • Registered
  • 310 posts
Joined: Apr 06, 2004

Posted 06 November 2010 - 01:36 PM

Holy crap, it's still running. I guess it runs as long as a successful restore would.
johnny
www.teamfurr.org

#248 OFFLINE   P Smith

P Smith

    Mr. FixAnything

  • Registered
  • 20,225 posts
  • LocationMediterranean Sea
Joined: Jul 25, 2002

Posted 06 November 2010 - 02:26 PM

Do you have first messages of the run ?

I'm worried about a rtdev [sdb3] activation - if it not happened during first stage of xfs_check, you're in big trouble ...

Edited by P Smith, 06 November 2010 - 02:38 PM.


#249 OFFLINE   jangell2

jangell2

    Godfather

  • Registered
  • 310 posts
Joined: Apr 06, 2004

Posted 06 November 2010 - 02:34 PM

Post 226 and 242 contain my iphone photos of a restore (226) and an xfs_repair. Let me know what you think.
johnny
www.teamfurr.org

#250 OFFLINE   P Smith

P Smith

    Mr. FixAnything

  • Registered
  • 20,225 posts
  • LocationMediterranean Sea
Joined: Jul 25, 2002

Posted 06 November 2010 - 02:37 PM

I'm concern about current run of xfs_check.




Protected By... spam firewall...And...