All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heinz J . Mauelshagen" <mauelshagen@sistina.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] [Fwd: Mistake(s) on install of EXP300...]
Date: Tue Dec 11 04:52:02 2001	[thread overview]
Message-ID: <20011211115316.A27568@sistina.com> (raw)
In-Reply-To: <3C152EBC.4A74A551@berbee.com>; from pichelma@berbee.com on Mon, Dec 10, 2001 at 03:53:01PM -0600

Scott,

saving your /etc/lvmtab* you can reactivate your VG in case something else
might go wrong by restoring it and "vgchange -ay".


Writing a partition table to /dev/sdb overwrote the PV part of LVMs metadata
on that disk.

Give vgcfgrestore a try on /dev/sdb.

Please don't forget to bakup /etc/lvmconf/ regularly.

Regards,
Heinz    -- The LVM Guy --

On Mon, Dec 10, 2001 at 03:53:01PM -0600, Scott P wrote:
> Hi...
> 
> I did not recieve a response, just wanted to know if somoeone could verify
> that I can use vgcfgrestore and recover my VGDA?
> 
> Please help, if possible. I am working on a Production machine. Therefore,
> I cannot test. I have little margin for errors.
> 
> LVM Ver & driver/patch:
> 0.9.1_beta7
> /boot/vmlinuz-2.2.19-lvm0.9
> lvm-0.9.1_beta7-2.2.19.patch
> 
> 
> Thanks!
> 
> -Scott
> 
> 
> Scott P wrote:
> 
> > Hi list,
> >
> > This is what I've done so far ( I apologize for the large amount of
> > lines/info!):
> >
> > [root@ptb3 /root]# pvcreate -v /dev/sdb
> > pvcreate -- locking logical volume manager
> > pvcreate -- checking physical volume name "/dev/sdb"
> > pvcreate -- getting physical volume size
> > pvcreate -- checking partition type
> > pvcreate -- creating new physical volume
> > pvcreate -- setting up physical volume for /dev/sdb with 860231680
> > sectors
> > pvcreate -- writing physical volume data to disk "/dev/sdb"
> > pvcreate -- physical volume "/dev/sdb" successfully created
> > pvcreate -- unlocking logical volume manager
> >
> > [root@ptb3 /root]# pvscan
> > pvscan -- reading all physical volumes (this may take a while...)
> > pvscan -- inactive PV "/dev/sdb"  is in no VG  [410.19 GB]
> > pvscan -- ACTIVE   PV "/dev/sdc1" of VG "exp300_2" [440.69 GB / 0 free]
> > pvscan -- ACTIVE   PV "/dev/sdd1" of VG "exp300_2" [440.69 GB / 0 free]
> > pvscan -- total: 3 [1.26 TB] / in use: 2 [881.43 GB] / in no VG: 1
> > [410.19 GB]
> >
> > [root@ptb3 /root]# dmesg | less
> > [root@ptb3 /root]# vgscan
> > vgscan -- reading all physical volumes (this may take a while...)
> > vgscan -- found active volume group "exp300_2"
> > vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
> > vgscan -- WARNING: This program does not do a VGDA backup of your volume
> > group
> >
> > [root@ptb3 /root]# lvscan
> > lvscan -- ACTIVE            "/dev/exp300_2/exp300_lv2" [881.38 GB]
> > lvscan -- 1 logical volumes with 881.38 GB total in 1 volume group
> > lvscan -- 1 active logical volumes
> >
> > [root@ptb3 /root]# vgextend -A y exp300_2 /dev/sdb
> > vgextend -- INFO: maximum logical volume size is 1 Terabyte
> > vgextend -- doing automatic backup of volume group "exp300_2"
> > vgextend -- volume group "exp300_2" successfully extended
> >
> > [root@ptb3 /root]# lvextend -L +440.7 /dev/exp300_2/exp300_lv2 /dev/sdb
> > lvextend -- rounding size to physical extent boundary
> > lvextend -- extending logical volume "/dev/exp300_2/exp300_lv2" to
> > 881.81 GB
> > lvextend -- doing automatic backup of volume group "exp300_2"
> > lvextend -- logical volume "/dev/exp300_2/exp300_lv2" successfully
> > extended
> >
> > Then,  not thinking at all,  I went back and ran fdisk, since I forgot
> > to run fdisk, it was 2:00 a.m. in the morning!!!
> >
> > root@ptb3 rc3.d]# fdisk /dev/sdb
> >
> > The number of cylinders for this disk is set to 53757.
> > There is nothing wrong with that, but this is larger than 1024,
> > and could in certain setups cause problems with:
> > 1) software that runs at boot time (e.g., LILO)
> > 2) booting and partitioning software from other OSs
> >    (e.g., DOS FDISK, OS/2 FDISK)
> >
> > Command (m for help): p
> >
> > Disk /dev/sdb: 254 heads, 63 sectors, 53757 cylinders
> > Units = cylinders of 16002 * 512 bytes
> >
> >    Device Boot    Start       End    Blocks   Id  System
> >
> > Command (m for help): m
> > Command action
> >    a   toggle a bootable flag
> >    b   edit bsd disklabel
> >    c   toggle the dos compatibility flag
> >    d   delete a partition
> >    l   list known partition types
> >    m   print this menu
> >    n   add a new partition
> >    o   create a new empty DOS partition table
> >    p   print the partition table
> >    q   quit without saving changes
> >    s   create a new empty Sun disklabel
> >    t   change a partition's system id
> >    u   change display/entry units
> >    v   verify the partition table
> >    w   write table to disk and exit
> >    x   extra functionality (experts only)
> >
> > Command (m for help): n
> > Command action
> >    e   extended
> >    p   primary partition (1-4)
> > p
> > Partition number (1-4): 1
> > First cylinder (1-53757, default 1):
> > Using default value 1
> > Last cylinder or +size or +sizeM or +sizeK (1-53757, default 53757):
> > Using default value 53757
> >
> > Command (m for help): p
> >
> > Disk /dev/sdb: 254 heads, 63 sectors, 53757 cylinders
> > Units = cylinders of 16002 * 512 bytes
> >
> >    Device Boot    Start       End    Blocks   Id  System
> > /dev/sdb1             1     53757 430109725+  83  Linux
> >
> > Command (m for help): l
> >
> >  0  Empty           17  Hidden HPFS/NTF 5c  Priam Edisk     a6  OpenBSD
> >  1  FAT12           18  AST Windows swa 61  SpeedStor       a7  NeXTSTEP
> >
> >  2  XENIX root      1b  Hidden Win95 FA 63  GNU HURD or Sys b7  BSDI fs
> >  3  XENIX usr       1c  Hidden Win95 FA 64  Novell Netware  b8  BSDI
> > swap
> >  4  FAT16 <32M      1e  Hidden Win95 FA 65  Novell Netware  c1
> > DRDOS/sec (FAT-
> >  5  Extended        24  NEC DOS         70  DiskSecure Mult c4
> > DRDOS/sec (FAT-
> >  6  FAT16           3c  PartitionMagic  75  PC/IX           c6
> > DRDOS/sec (FAT-
> >  7  HPFS/NTFS       40  Venix 80286     80  Old Minix       c7  Syrinx
> >  8  AIX             41  PPC PReP Boot   81  Minix / old Lin db  CP/M /
> > CTOS / .
> >  9  AIX bootable    42  SFS             82  Linux swap      e1  DOS
> > access
> >  a  OS/2 Boot Manag 4d  QNX4.x          83  Linux           e3  DOS R/O
> >  b  Win95 FAT32     4e  QNX4.x 2nd part 84  OS/2 hidden C:  e4
> > SpeedStor
> >  c  Win95 FAT32 (LB 4f  QNX4.x 3rd part 85  Linux extended  eb  BeOS fs
> >  e  Win95 FAT16 (LB 50  OnTrack DM      86  NTFS volume set f1
> > SpeedStor
> >  f  Win95 Ext'd (LB 51  OnTrack DM6 Aux 87  NTFS volume set f4
> > SpeedStor
> > 10  OPUS            52  CP/M            93  Amoeba          f2  DOS
> > secondary
> > 11  Hidden FAT12    53  OnTrack DM6 Aux 94  Amoeba BBT      fd  Linux
> > raid auto
> > 12  Compaq diagnost 54  OnTrackDM6      a0  IBM Thinkpad hi fe  LANstep
> > 14  Hidden FAT16 <3 55  EZ-Drive        a5  BSD/386         ff  BBT
> > 16  Hidden FAT16    56  Golden Bow
> >
> > Command (m for help): m
> > Command action
> >    a   toggle a bootable flag
> >    b   edit bsd disklabel
> >    c   toggle the dos compatibility flag
> >    d   delete a partition
> >    l   list known partition types
> >    m   print this menu
> >    n   add a new partition
> >    o   create a new empty DOS partition table
> >    p   print the partition table
> >    q   quit without saving changes
> >    s   create a new empty Sun disklabel
> >    t   change a partition's system id
> >    u   change display/entry units
> >    v   verify the partition table
> >    w   write table to disk and exit
> >    x   extra functionality (experts only)
> >
> > Command (m for help): t
> > Partition number (1-4): 1
> > Hex code (type L to list codes): l
> >
> >  0  Empty           17  Hidden HPFS/NTF 5c  Priam Edisk     a6  OpenBSD
> >  1  FAT12           18  AST Windows swa 61  SpeedStor       a7  NeXTSTEP
> >
> >  2  XENIX root      1b  Hidden Win95 FA 63  GNU HURD or Sys b7  BSDI fs
> >  3  XENIX usr       1c  Hidden Win95 FA 64  Novell Netware  b8  BSDI
> > swap
> >  4  FAT16 <32M      1e  Hidden Win95 FA 65  Novell Netware  c1
> > DRDOS/sec (FAT-
> >  5  Extended        24  NEC DOS         70  DiskSecure Mult c4
> > DRDOS/sec (FAT-
> >  6  FAT16           3c  PartitionMagic  75  PC/IX           c6
> > DRDOS/sec (FAT-
> >  7  HPFS/NTFS       40  Venix 80286     80  Old Minix       c7  Syrinx
> >  8  AIX             41  PPC PReP Boot   81  Minix / old Lin db  CP/M /
> > CTOS / .
> >  9  AIX bootable    42  SFS             82  Linux swap      e1  DOS
> > access
> >  a  OS/2 Boot Manag 4d  QNX4.x          83  Linux           e3  DOS R/O
> >  b  Win95 FAT32     4e  QNX4.x 2nd part 84  OS/2 hidden C:  e4
> > SpeedStor
> >  c  Win95 FAT32 (LB 4f  QNX4.x 3rd part 85  Linux extended  eb  BeOS fs
> >  e  Win95 FAT16 (LB 50  OnTrack DM      86  NTFS volume set f1
> > SpeedStor
> >  f  Win95 Ext'd (LB 51  OnTrack DM6 Aux 87  NTFS volume set f4
> > SpeedStor
> > 10  OPUS            52  CP/M            93  Amoeba          f2  DOS
> > secondary
> > 11  Hidden FAT12    53  OnTrack DM6 Aux 94  Amoeba BBT      fd  Linux
> > raid auto
> > 12  Compaq diagnost 54  OnTrackDM6      a0  IBM Thinkpad hi fe  LANstep
> > 14  Hidden FAT16 <3 55  EZ-Drive        a5  BSD/386         ff  BBT
> > 16  Hidden FAT16    56  Golden Bow
> > Hex code (type L to list codes): 8e
> > Changed system type of partition 1 to 8e (Unknown)
> >
> > Command (m for help): p
> >
> > Disk /dev/sdb: 254 heads, 63 sectors, 53757 cylinders
> > Units = cylinders of 16002 * 512 bytes
> >
> >    Device Boot    Start       End    Blocks   Id  System
> > /dev/sdb1             1     53757 430109725+  8e  Unknown
> >
> > Command (m for help): m
> > Command action
> >    a   toggle a bootable flag
> >    b   edit bsd disklabel
> >    c   toggle the dos compatibility flag
> >    d   delete a partition
> >    l   list known partition types
> >    m   print this menu
> >    n   add a new partition
> >    o   create a new empty DOS partition table
> >    p   print the partition table
> >    q   quit without saving changes
> >    s   create a new empty Sun disklabel
> >    t   change a partition's system id
> >    u   change display/entry units
> >    v   verify the partition table
> >    w   write table to disk and exit
> >    x   extra functionality (experts only)
> >
> > Command (m for help): v
> > 62 unallocated sectors
> >
> > Command (m for help): w
> > The partition table has been altered!
> >
> > Calling ioctl() to re-read partition table.
> >
> > WARNING: If you have created or modified any DOS 6.x
> > partitions, please see the fdisk manual page for additional
> > information.
> > Syncing disks.
> >
> > So,  now I have these errors when running most of the LVM cmds!!
> >
> > [root@ptb3 rc3.d]# vgscan
> > vgscan -- reading all physical volumes (this may take a while...)
> > vgscan -- found active volume group "exp300_2"
> > vgscan -- ERROR "pv_read_pe(): PV size invalid" can't get data of volume
> > group "exp300_2" from physical volume(s)
> > vgscan -- ERROR "pv_read_pe(): PV size invalid" creating "/etc/lvmtab"
> > and "/etc/lvmtab.d"
> >
> > [root@ptb3 rc3.d]# vgdisplay
> > vgdisplay -- ERROR: VGDA in kernel and lvmtab are NOT consistent; please
> > run vgscan
> >
> > [root@ptb3 rc3.d]# pvscan
> > pvscan -- reading all physical volumes (this may take a while...)
> > pvscan -- ACTIVE   PV "/dev/sdb"   is associated to an unknown VG (run
> > vgscan)
> > pvscan -- ACTIVE   PV "/dev/sdc1"  is associated to an unknown VG (run
> > vgscan)
> > pvscan -- ACTIVE   PV "/dev/sdd1"  is associated to an unknown VG (run
> > vgscan)
> > pvscan -- total: 3 [889.43 GB] / in use: 3 [889.43 GB] / in no VG: 0 [0]
> >
> > [root@ptb3 rc3.d]# lvscan
> > lvscan -- ERROR: VGDA in kernel and lvmtab are NOT consistent; please
> > run vgscan
> >
> > Hence, chaos ensues on this machine....
> >
> > Please let me know if "vgcfgrestore" will work for me.
> > Or do I try to remove the partition from fdisk? I really don't think
> > that will help though!
> > I think the damage is done from the partition write to the EXP300 disk
> > array.
> >
> > Also,  if I reboot, will there be a disaster?(For fdisk...)
> > This is a production machine.
> >
> > Please help me if you can...
> >
> > TIA!
> >
> > -Scott
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

      reply	other threads:[~2001-12-11  4:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-10 15:54 [linux-lvm] [Fwd: Mistake(s) on install of EXP300...] Scott P
2001-12-11  4:52 ` Heinz J . Mauelshagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011211115316.A27568@sistina.com \
    --to=mauelshagen@sistina.com \
    --cc=linux-lvm@sistina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.