Linux / UNIX Tech Support Forum
This is a discussion on Question regarding dd backups within the Linux software forums, part of the Linux Getting Started category; I have a simple question. If I used dd to make a full drive backup of a bootable drive will ...
|
Register free or login to your existing account and remove all advertisements. |
|
|||||||
| Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I have a simple question. If I used dd to make a full drive backup of a bootable drive will the copied drive ALSO be bootable?
In other words, if I did a track-by-track clone of the drive won't it also automatically copy track zero thus making the backup copy a bootable exact twin of the original drive? Both drives are dedicated linux drives. There are no Windows or Dos partitions involved. The reason I ask this is because the file system on my server's primary hd is damaged. Fortuantely I have a backup that was made within hours of the time this damage occurred. So, I need to be able to swap the two hd's in my server and try to boot the second (backup) drive RATHER than the current (damaged) primary drive. I'm wondering whether I'll need to use dd to lay down a copy of the boot track on the secondary before I try this maneuver. Thanks! |
| Sponsored Links | ||
|
|
|
|||
|
Okay... the boot of the backup worked. The next thing I did was a "do-no-harm" fsck of the backup and here's what it reports:
Code:
myserver:-# e2fsck -n -f /dev/sda1 e2fsck 1.40-WIP (14-Nov-2006) Warning! /dev/sda1 is mounted. Warning: skipping journal recovery because doing a read-only filesystem check. Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Free blocks count wrong (102099287, counted=102099288). Fix? no Free inodes count wrong (58602648, counted=58602652). Fix? no /dev/sda1: ********** WARNING: Filesystem still has errors ********** /dev/sda1: 969576/59572224 files (0.2x non-contiguous), 17036737/119136024 blocks For the record, when I used fsck to do a manual recovery on the damaged file system of the primary hd (I basically approved all changes fsck recommended and cloned all "shared blocks") , even that messed up the original drive pretty badly. But in all fairness, there was a week's worth of updates to that hd between the date the error was detected and reported by fsck and the date the journaling file system rolled us back to. Obviously that hasn't happened to this backup which has basically been offline since it was made. Last edited by websissy; 10-14-2008 at 12:37 AM. |
|
||||
|
This is not good:
Quote:
Code:
umount /dev/sda1 e2fsck -n -f /dev/sda1
__________________
Vivek Gite Linux Evangelist |
|
|||
|
Thanks! Yes. I do realize now e2fsck and fsck should not be run on a mounted file system. That's why I was deliberately running e2fsck in read-only mode at the time. I wanted it to check the drive but make no changes to it. Unfortunately, I hadn't yet fully understood the importance of that on Saturday when I found myself trapped in fsckland with no way to escape. So, I was probably the cause of some of the damage on my primary boot drive.
If you look close, you'll see the 4th line of the message acknowledged that e2fsck was not doing a journaled recovery because I had forced it to check the file system but placed it in read-only mode. Code:
e2fsck -n -f /dev/sda1 e2fsck 1.40-WIP (14-Nov-2006) Warning! /dev/sda1 is mounted. Warning: skipping journal recovery because doing a read-only filesystem check. But I'm having trouble for some reason. I do NOT have /dev/sdb1 included in the fstab table. Yet, when I reboot the system and try to run even the do-no-harm e2fsck test it warns me that sdb1 is mounted. And when I look linux show that partition when I list the root file system (ls -als /). In short, a directory named /sdb1 does exist in / (although when I list the contents of that directory it shows as empty). Yet, when I try to umount /dev/sdb1 or /sdb1, the system reports it is not mounted. Also when I check the root directory where I normally mount this drive (mount /dev/sdb1 /backup) it also shows it as not present. Yet, when I try to run: e2fsck -nf /dev/sdb1 I STILL get Warning! /dev/sdb1 is mounted. Warning: skipping journal recovery because doing a read-only filesystem check. Can you tell me what GIVES here and how I can get around it? Thanks! |
![]() |
| Tags |
| backup , dd command , disk recovery , linux , partitions |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| bonding question | meirfin | Networking, Firewalls and Security | 0 | 09-24-2008 03:11 PM |
| C question | TOP | Coding in General | 1 | 07-08-2006 12:14 AM |
| C question | TOP | Coding in General | 3 | 03-10-2006 11:08 PM |
| question | TOPHUMAN | Shell scripting | 1 | 02-06-2006 01:25 PM |
| Redirecting question | sonaikar | Linux software | 1 | 06-25-2005 12:18 AM |