[mythtv-users] LVM woes....is everything gone

David Greaves myth at dgreaves.com
Sun May 6 14:35:30 UTC 2007


j mccord wrote:
> I did a bad thing.  I tried to create an lvm group on a drive with
> existing data on it.  The commands I ran:
> 
> pvcreate hdb1 <---drive with data
> pvcreate hdc2
> 
> vgcreate gaia /dev/hdb1 /dev/hdc2
> 
> At this point I realized that I might not be able to see my data when
> I created a logical volume, so I stopped.  I have removed the Volume
> Group and then tried to mount the drive, it was an xfs file type,
> however mount errored telling me to specify file type. I tried
> specifying -t xfs to no avail.
> 
> Is my data gone, I had 200G full of movies.
> 
> Can anyone help me recover, I know I'm stupid but even idiots deserve
> a break sometimes

LVM will have written headers over a few blocks.
You should be OK but you'll probably lose some data files.

first run:
  xfs_repair -n /dev/hdb1

This is 'read only' and should indicate that it understands the disk and
displays what it would like to do.

If this looks OK then run:
  xfs_repair /dev/hdb1

if it complains about the log you may need the -L option.

  xfs_repair -L /dev/hdb1

Look in .../lost+found/ once you re-mount.

David




More information about the mythtv-users mailing list