[olug] lost partition table

Obi-Wan obiwan at jedi.com
Tue Jul 15 20:00:40 UTC 2008


> I ran an upgrade this weekend and have 3 drives. sda, sdb are / and /home.
> sdc was reserved as a full copy of /home.
> 
> Disk druid marked sdc as an unallocated lvm PV but never formated it, only
> changed the partition table so I'm sure the data is still there.

I can't help you with your current problem, but I can tell you what I do
to get around it.  I keep a separate physical drive (currently 1TB) in
my machine that is partitioned to match or exceed the main drive
(just /boot and / in my case).  RAID mirroring won't help you if the
problem is user-induced, so I have a nightly cron job that mounts the
backup drive, rsyncs the contents from the main drive, and unmounts
the backup drive.  Before I do any significant upgrades, I comment out
the cron job until I'm content that I haven't hosed anything.  If I
do lose an entire drive, I can just boot off the backup disk.

This is better than a backup partition, because I can survive a drive
failure.  This spring, I almost lost 7 years of photos when I forgot
to comment out the cron job during major surgery that (I thought) torched
my home directory from the main drive.  The script synced over an empty
home directory, which deleted it from the backup drive.  I can't tell
you (but probably don't have to) how sick I was when I realized what had
happened.

I do have a USB drive at work that acts as a third backup location.
At the time, it was an NTFS drive on a windows box, which meant I still
had all my data, but I lost all my permissions and time stamps.

Fortunately, my home directory wasn't completely torched, and I was able
to recover.  I made several changes after that:

1.  My off-site drive is now ext3 hanging off a linux box.
2.  My nightly cron job to sync the local backup drive no longer deletes
	files, it only adds them.  The script takes an optional "--delete"
	parameter that I run manually from time to time to clean out all
	the old stuff when I know it's safe to do so.
3.  Just in case, I comment out the cron job before updates.

For those of you that don't have a large amount of critical data, burning
it to optical drives periodically and housing them in a different room
(or better yet, a different neighborhood) is a better idea.  I have about
250 GB (yes, GB) of digital photos, so optical storage isn't an affordable
option for me.  Maybe when BluRay burners come down...

At least you only lost your partition table.  I know from my experience
that it's impossible to recover files on ext3 once they've been deleted,
since the journalling mechanism immediately overwrites vital info upon
delete.

-- 
Ben "Obi-Wan" Hollingsworth                             obiwan at jedi.com
   The stuff of earth competes for the allegiance I owe only to the
     Giver of all good things, so if I stand, let me stand on the
       promise that You will pull me through.  -- Rich Mullins



More information about the OLUG mailing list