vgscan not returning
James:
Thanks a lot for your help.
Although i am still not having any luck. Here is what i did. I got rid of the many partitions and created a single LVM partition. Here is how it looks now
================================================================
Device Boot Start End Blocks Id System /dev/hda1 * 1 1020 8193118+ 83 Linux /dev/hda2 1021 1148 1028160 82 Linux swap /dev/hda3 1149 2491 10787647+ 8e Linux LVM
================================================================
From that point here is a log of the commands i tried
================================================================
[root@fixx /root]# dd if=/dev/zero of=/dev/hda3 bs=512 count=1 1+0 records in
1+0 records out
[root@fixx /root]# pvcreate /dev/hda3
pvcreate -- ERROR: "/etc/lvmtab" doesn't exist; please run vgscan [root@fixx /root]# dd if=/dev/zero of=/dev/hda3 bs=512 count=100 100+0 records in
100+0 records out
[root@fixx /root]# pvcreate -v /dev/hda3
pvcreate -- ERROR: "/etc/lvmtab" doesn't exist; please run vgscan
[root@fixx /root]# vgscan -v
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...)
================================================================
So as you can see i am unable to run pvcreate as it complains about vgscan. And again it seems that vgscan is never going to return.
Hoping for some pointers
Thanks
Ali
Quoted 6 lines · James Hawtin
Quoted 2 lines · Ali Zaidi
Hi:
I am a novice with LVM but after going through the man pages and howtos i
was
Quoted 1 line
Quoted 1 line
unable to find a solution to my problem. I am hoping one of you might find
some
Quoted 4 lines
Quoted 4 lines
time to point me in the right direction.
I am trying to setup LVM on a RH box. I run vgscan before i can create the volumes but it never returns. Same thing happens with lvmdiskscan and
pvscan.
Quoted 63 lines
Quoted 1 line
Here is a -v and -d output of vgscan
Ok and now to try to answer your problem....
Did you do a pvcreate?
did the disk have existing data on it?
Try dd to write
/dev/zeroto the first bit of the partitions you want to put into lvm. then do you vgscan which should then return with an error saying it found nothing.... you can then use pvcreate on themOf course your LAME disk layout could be confusing lvm in which case as a work arround just have one lvm partion and use lvm to allocate the disk, which is what you should be doing in the first place!
------
And now a few quick questions and answers....
Q: I can allocate my disk better than LVM!
A: No you cannot! or rather you can allocate your disk when you first get the machine to produce nice continuous partions. YOU CAN DO THIS WITH LVM. If you have a brand new volume group and just add partions to it they will be continuous with LVM as well.... Don't trust LVM.. you can do a pvdisplay to show you this fact!
A2: Sure, but what happens if you want to remove 2 partions, that are not next door to each other, and them make the one big partion... with fdisk its a dd nigtmare... with LVM its easy.
Q: but how can I move my stuff onto another disk... I use DD!
A: SO? There is nothing special about lvm devices apart from the fact they make things easer for you... You want to work that way, make your new device using LVM or fdisk and do your dd! But you could save yourself time by using pvmove!
Q: LVM adds a level of indirection to my disk.. surely its better to use the real disk
A: Theoritically yes... but the translation to where on the disk is a calculation done on your computer not on the disk the slowest part of the operation is pulling stuff from your disk! Think about is a software raid faster or slower? Its faster cos the slow part was the disk and now there is more than one disk!Q: I like to micromanage my disk...
A: You can do that with LVM if you like or you can let LVM do the best it can for you and use your bonus time to go down the pub.James
_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html