Hello, I have a 72GB SCSI in RAID mirror. Using LVM version 1.0.3, Redhat 9. Before resizing, the partitions are (snip from lvmdiskscan): /dev/sda1 [ 31.35 MB] Primary [0xDE] (Dell Utility) /dev/sda2 [ 19.53 GB] NTFS /dev/sda3 [ 298.08 MB] Primary LINUX native partition [0x83] (/boot) /dev/sda4 [ 48.51 GB] Primary Windows98 extended partition [0x0F] /dev/sda5 [ 1.95 GB] Extended LINUX swap partition [0x82] /dev/sda6 [ 5.86 GB] Extended LVM partition [0x8E] (VG "Volume00") /dev/sda7 [ 40.69 GB] Extended LVM partition [0x8E] (VG "Volume00") The vg "Volume00" contains PV /dev/sda6 and /dev/sda7, and the LVs (all ext3) are: /dev/Volume00/root (/) /dev/Volume00/home (/home) /dev/Volume00/opt (/opt) /dev/Volume00/tmp (/tmp) /dev/Volume00/usr (/usr) /dev/Volume00/usrlocal (/usr/local) /dev/Volume00/var (/var) I wanted to remove the NTFS partition, make /dev/sda2 as LVM partition, and add it to "/dev/Volume00/opt". Here's what I did: boot to linux rescue mode # vgscan # vgchange -a y use fdisk to remove /dev/sda2, recreate /dev/sda2 # mke2fs -j /dev/sda2 use parted to set the partition type to LVM partition (0x8e) # vgextend Volume00 /dev/sda2 Get the partition size (19.53GB) from # pvdisplay /dev/sda2 # e2fsadm -L+19.53G /dev/Volume00/opt Still have 532MB as shown from # pvdisplay /dev/sda2 # e2fsadm -L+532M /dev/Volume00/opt Step 11 produced error, showed many inode numbers, and asked if I wanted to fix for each inode number. I pressed a few 'y' and Ctrl-C to terminate. # e2fsck -y /dev/sda2 (to answer 'y' to all questions regarding fixing inode) reboot and got a kernel panic with the following msg: vgscan -- removing "/etc/lvmtab" and "/etc/lvmtab.d" vgscan -- creating empty "/etc/lvmtab" and "/etc/lvmtab.d" vgscan -- reading all physical volumes (this may take a while...) vgscan -- scanning for all active volume group(s) first vgscan -- reading data of volume group "Volume00" from physical volume(s) vgscan -- only found 6816 of 7424 LEs for LV /dev/Volume00/opt (2) vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" can't get data of volume group "Volume00" from physical volume(s) vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created vgscan -- WARNING: This program does not do a VGDA backup of your volume group I rebooted into rescue mode, and vgscan also gave the same error as above. And "/etc/lvmtab" and "/etc/lvmtab.d" are blank. How can I recover the VG? Is /dev/sda2 oversized by e2fsadm and therefore mess up the vg? I have attached the output from pvdata for /dev/sda2,6,7. They contain info on related VG, PV and LV. Thanks and regards, zhimin (See attached file: pvdata-sda2-6-7.zip)
Attachment:
pvdata-sda2-6-7.zip
Description: Zip archive
_______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/