Tema: LVM ext2 recovery
Autorius: lingus
Data: 2011-02-15 12:30:08
Sveiki, nulėkė debian servas, su LVM, o po juo XEN virtualios mašinos. 
Turiu backupą su Norton Ghost, bet jis nesupportina LVM ir atkuria kaip 
paprastas particijas taigi gaunu:

# /sbin/fdisk -l
Warning: omitting partitions after #15.
They will be deleted if you save this partition table.

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         122      979933+  83  Linux
/dev/sda2             123       30401   243216067+   f  W95 Ext'd (LBA)
/dev/sda5             123         960     6731203+  83  Linux
/dev/sda6             961        4310    26908843+  83  Linux
/dev/sda7            4311       12683    67256091   83  Linux
/dev/sda8           12684       13102     3365586   83  Linux
/dev/sda9           13103       16452    26908843+  83  Linux
/dev/sda10          16453       18127    13454406   82  Linux swap / Solaris
/dev/sda11          18128       27265    73400953+  83  Linux
/dev/sda12          27266       27527     2104483+  83  Linux
/dev/sda13          27528       27658     1052226   83  Linux
/dev/sda14          27659       29617    15735636   83  Linux
/dev/sda15          29618       30270     5245191   83  Linux

nuo 1 iki 10 yra sisteminės particijos var, home, tmp, usr, swap, 
tereikėjo pa'editint GRUB, fstab ir sistema pakilo.

/dev/vg00/root          /                       ext3
/dev/vg00/var           /var                    ext3
/dev/vg00/home          /home                   ext3
/dev/vg00/tmp           /tmp                    ext3
/dev/vg00/usr           /usr                    ext3
--------------------
/dev/sda5          /                       ext3
/dev/sda6           /var                    ext3
/dev/sda7          /home                   ext3
/dev/sda8           /tmp                    ext3
/dev/sda9           /usr                    ext3

Svarbiausiam man ši mašina:

# cat /etc/xen/oracle
name = "oracle"
uuid = "cafff27f-362b-866f-53f7-1f3571fcb665"
maxmem = 1024
memory = 1024
vcpus = 2
bootloader = "/usr/bin/pygrub"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
#vfb = [ "type=vnc,vncdisplay=1,vncpasswd=oracle" ]
vfb = [ ]
# fix the lagging mouse in VNC
#usbdevice = 'tablet'
disk = [ "phy:/dev/vg00/oracle.xen-disk,xvda,w", 
"phy:/dev/vg00/oracle.xen-swap,xvdb,w" ]
vif = [ "mac=00:16:3e:2f:10:e3,bridge=xenbr0" ]

# tail -20 /etc/lvm/archive/vg00_00010.vg:

                 oracle.xen-disk {
                         id = "RwCJVW-ik57-PJNz-1uRD-k3Ik-xoqb-sQ06fu"
                         status = ["READ", "WRITE", "VISIBLE"]
                         segment_count = 1

                         segment1 {
                                 start_extent = 0
                                 extent_count = 2240     # 70 Gigabytes

                                 type = "striped"
                                 stripe_count = 1        # linear

                                 stripes = [
                                         "pv0", 688
                                 ]
                         }
                 }

Pagal šitą sprendžiu, kad man reikalinga particija yra 70GB, taigi  - 
"/dev/sda11", tačiau:

# mount -v -t ext2 /dev/sda11 /mnt/
mount: wrong fs type, bad option, bad superblock on /dev/sda11,
        missing codepage or other error

# dmesg | tail
hfs: unable to find HFS+ superblock
hfs: unable to find HFS+ superblock
hfs: unable to find HFS+ superblock
VFS: Can't find an ext2 filesystem on dev sda11.

Bandysiu drožt tą particiją su ext2 recovery toolsais, šiuo metu sukasi 
http://www.diskinternals.com/linux-recovery/. Bet labiau norėtųsi kaip 
nors pakišti tą particiją XEN'ui vietoj naudotos LVM, kad jis 
užsikrautų, gal užtektų ką nors gudraus parašyti čia?
disk = [ "phy:/dev/vg00/oracle.xen-disk,xvda,w", "phy:/dev
Gal eina nesudėtingai atgal surankioti LVM sistemą?
Gal koks geresnis toolsas recoverinimui yra?

Labai laukiu pasiūlymų, Dėkui =]