LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-11-2011, 03:52 PM   #16
dime111
LQ Newbie
 
Registered: Jan 2011
Posts: 29

Original Poster
Rep: Reputation: 0

Thank you
Seems they only replace the drive rather than adding third one
Anyway i tried DD it completed successfully
but on backed up one i get this error after mounting it
is the backup broken then ?

ls: cannot access bin: Input/output error
ls: cannot access lib: Input/output error
ls: cannot access home: Input/output error
ls: cannot access opt: Input/output error
ls: cannot access boot: Input/output error
ls: cannot access sys: Input/output error
ls: cannot access root: Input/output error
ls: cannot access usr: Input/output error
ls: cannot access srv: Input/output error
ls: cannot access lib64: Input/output error
aquota.user etc installimage.conf media root sys
backup halt installimage.debug mnt sbin tmp
bin home lib opt scripts usr
boot home2 lib64 proc selinux var
dev home3 lost+found quota.user srv
 
Old 04-12-2011, 09:22 PM   #17
beowulfnode
Member
 
Registered: Jun 2007
Distribution: debian, ubuntu, centos, esxi
Posts: 39

Rep: Reputation: 4
Quote:
Originally Posted by dime111 View Post
Anyway i tried DD it completed successfully
copied from where to where?
- from the old drive to a backup file on backup drive then back to new drive?
- or just from the backup drive to the new drive?

possibly you want to do like on this site
- with the old disk in as /dev/sda boot from a livecd and run
dd if=/dev/sda of=/mnt/backup-drive/old-disk.img conv=noerror
the noerror part is so that it keeps going where the old failing drive experiences io errors
- then replace old drive with new drive
- boot from a livecd and run
dd if=/mnt/backup-drive/old-disk.img of=/dev/sda
where /dev/sda is the new disk
- then boot from new disk

however this does require the backup drive to be bigger than the drive being backed up. A possible solution to this would be to pipe the output of dd via gzip or something. eg

when creating the disk image you could use
dd if=/dev/sda conv=noerror | gzip > /mnt/backup-drive/old-disk.img.gz

if your disk has been used for awhile and had files written all over the disk surface you'll probably only get close to 2:1 compression, but if it's a fairly new disk you should get much better compression as an endless stream of zeros compresses very well. There are ways to put zeros in the free space but I wouldn't do that on a failing disk as it stresses the disk even more and the likely compression factor of close to 2:1 isn't too bad.

restoring directly from a compressed file is something I haven't done but I'm guessing something along the lines of
gzip -d /mnt/backup-drive/old-disk.img.gz | dd of=/dev/sda
would get the job done. But I'm only guessing here and would appreciate the thoughts and experiences of others on this bit.

Last edited by beowulfnode; 04-12-2011 at 10:32 PM. Reason: added compression stuff
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Changing hard drive mounts to defaults heberg21 Linux - Newbie 4 01-17-2010 07:55 AM
Changing permissions on a hard drive donk111046 Linux - Hardware 3 05-13-2009 09:36 AM
verify faulty software raid hard drive jwstric2 Linux - Hardware 0 07-06-2004 10:58 PM
Changing Hard drive from one machine to another afubini Linux - Hardware 3 10-30-2003 03:41 AM
changing hard drive location thelight1 Linux - Hardware 3 10-12-2003 06:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration