linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Seg fault on vgscan
@ 2000-04-07 14:30 Shaw, Marco
  2000-04-07 17:49 ` Andreas Dilger
  0 siblings, 1 reply; 4+ messages in thread
From: Shaw, Marco @ 2000-04-07 14:30 UTC (permalink / raw)
  To: linux-lvm

Not knowing the exact procedure for using lvm's with filesystems already
mounted and in use (/usr, in my case).  I proceeded with the following
commands:

--changed /dev/hda1 (/usr) to 0x8e
--pvcreate /dev/hda1 /dev/hda8
--vgcreate usr_dg /dev/hda8 /dev/hda1

Once this completed, my original /usr had somehow shrunk to 100MB from 300MB
(according to df -k).  I then ran:
--vgchange -an usr_dg

This didn't restore the size expected so rebooted, and the /usr complained
badly about requiring an fsck, which I did, and all appears to be back to
normal.

For now, I'm going to familarize myself more with lvm by using partitions
that are not in use, but I think I need to fix my vgscan problem that
appears to have been caused by my messing around above.  A 'vgscan' output
is below:

#vgscan
....
vg_check_name -- LEAVING with ret: 0
pv_check_new -- CALLED
pv_check_new -- LEAVING with ret: 0
pv_check_consistency -- LEAVING with ret: 0
pv_read_all_pv_of_vg:  pv_name: /dev/hda1  vg_name: usr_dg  p: 0
pv_read_all_pv_of_vg: /dev/hda1[0] hit usr_dg[0]
pv_read_all_pv_of_vg:  pv_name: /dev/hda8  vg_name: usr_dg  p: 1
pv_read_all_pv_of_vg: /dev/hda8[1] hit usr_dg[1]
pv_read_all_pv_of_vg -- LEAVING with ret: 0
vg_read -- pv[0]->pv_name: "/dev/hda1"
vg_read -- pv[1]->pv_name: "/dev/hda8"
vg_copy_from_disk -- CALLED
Segmentation fault

/etc/lvmtab no longer exists, but /etc/lvmconf/usr_dg.conf is still there.


Any ideas?
Marco

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Seg fault on vgscan
  2000-04-07 14:30 [linux-lvm] Seg fault on vgscan Shaw, Marco
@ 2000-04-07 17:49 ` Andreas Dilger
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Dilger @ 2000-04-07 17:49 UTC (permalink / raw)
  To: Shaw, Marco; +Cc: Linux LVM mailing list

You write:
> Not knowing the exact procedure for using lvm's with filesystems already
> mounted and in use (/usr, in my case).  I proceeded with the following
> commands:
> 
> --changed /dev/hda1 (/usr) to 0x8e
> --pvcreate /dev/hda1 /dev/hda8
> --vgcreate usr_dg /dev/hda8 /dev/hda1

This is very bad.  You should not use LVM on existing partitions.  Does it
not say anything in this regard in the documentation?  Probably, as a
safety measure, the LVM commands should verify that a partition is not
mounted before doing a pvcreate/vgcreate on it.

> This didn't restore the size expected so rebooted, and the /usr complained
> badly about requiring an fsck, which I did, and all appears to be back to
> normal.

It probably isn't.  I would suspect that files in the first 200kB of your
/usr partition are corrupted.  I'm surprised that the whole system didn't
just crash when it was overwritten.  Have you had any problems since then?
If you are using Red Hat or other RPM-based system, you should check the
files in all installed against their signatures in the original RPMs.

> For now, I'm going to familarize myself more with lvm by using partitions
> that are not in use

Probably a very good idea.

> but I think I need to fix my vgscan problem that
> appears to have been caused by my messing around above.
> 
> /etc/lvmtab no longer exists, but /etc/lvmconf/usr_dg.conf is still there.

Delete it.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Seg fault on vgscan
  2000-04-07 18:01 Shaw, Marco
@ 2000-04-07 19:19 ` Andreas Dilger
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Dilger @ 2000-04-07 19:19 UTC (permalink / raw)
  To: Shaw, Marco; +Cc: Linux LVM mailing list

Marco writes:
> > This is very bad.  You should not use LVM on existing partitions.  Does it
> > not say anything in this regard in the documentation?  Probably, as a
> > safety measure, the LVM commands should verify that a partition is not
> > mounted before doing a pvcreate/vgcreate on it.
> 
> I've not seen this in writing anywhere, but could have missed it.  I would
> hope there's a way to handle root_vg filesystems.  I thought I saw something
> in the archives regarding 'encapsulating' the root partition...  

I think the "encapsulation" of root is done by copying all of the data to
a new (LVM) filesystem, creating an init ramdisk, fixing up your lilo.conf
and then rebooting.

There was also some mention of modifying your partition table to have two
"overlapping" partitions - one that pointed to the start of the filesystem,
and the other that pointed to the start of the LVM data.  You would normally
boot with the LVM partition, but for lilo you would use the filesystem
partition.  I don't know what happened to this idea.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [linux-lvm] Seg fault on vgscan
@ 2000-04-07 18:01 Shaw, Marco
  2000-04-07 19:19 ` Andreas Dilger
  0 siblings, 1 reply; 4+ messages in thread
From: Shaw, Marco @ 2000-04-07 18:01 UTC (permalink / raw)
  To: Linux LVM mailing list

> This is very bad.  You should not use LVM on existing partitions.  Does it
> not say anything in this regard in the documentation?  Probably, as a
> safety measure, the LVM commands should verify that a partition is not
> mounted before doing a pvcreate/vgcreate on it.

I've not seen this in writing anywhere, but could have missed it.  I would
hope there's a way to handle root_vg filesystems.  I thought I saw something
in the archives regarding 'encapsulating' the root partition...  
 
Thanks,
Marco

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-04-07 19:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-07 14:30 [linux-lvm] Seg fault on vgscan Shaw, Marco
2000-04-07 17:49 ` Andreas Dilger
2000-04-07 18:01 Shaw, Marco
2000-04-07 19:19 ` Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).