Skip to contentSkip to conversation

hello sir

linux-lvm [email protected] 3 participants 3 messages Apr 6, 2002 – Apr 8, 2002

lore
Share & tools
lore
#0 lore raw

dear sir:
I am a lvm user in China. I found 2 bugs when I using it.
One: the patches of lvm-1.0.3 for kernel-2.4.18 has a wrong definition
in
lvm-internal.h:
#define lvm_sectsize(dev) get_hardblocksize(dev)
should change to
#define lvm_sectsize(dev) get_hardsect_size(dev)

    Two:after creating /dev/hda3 and changing it to type 0x8e by fdisk,why

does pvcreate say it is a invalid partition? But pvcreate can process it after reboot the system.However, it is ok for a existing partition(needn't create but need change type).Is reboot a necessary step? I think there must be something wrong with it. Can you tell me why?
Thanks very much!

--http://www.eyou.com
--�ȶ��ɿ�����ѵ������� �����ʼ� �ƶ���ǩ �������� ����洢...����δ��

#1 lore raw

Hello!

[email protected] ([email protected]) wrote 32 lines:

Quoted 2 lines
    Two:after creating /dev/hda3 and changing it to type 0x8e by fdisk,why

does pvcreate say it is a invalid partition?

To be able to read in the patition table of a HD in *all* cases, the complete HD must be completely umounted. No Swap, no /-partition, nothing may be in use or just allocated.

Otherwise it will work in some cases but not in other cases, and if you are very unlucky, you could lose data. (But then, if you can create partitions, you can also run
dd if=/dev/zero of=/dev/hda)

Quoted 1 line

But pvcreate can process it after reboot the system.

This happens eg. during the boot process, so rebooting can be needed there, if you have a single-HD-system and are not running completely from the ramdisk.

Quoted 2 lines

However, it is ok for a existing partition(needn't create but need change type).

In this case, it seems, your kernel had the good luck of picking up the change, even without completely umounting and de-allocating the HD.

At least, that's my best understanding based on personal experience and discussion on several mailing lists.

-Wolfgang

#2 lore raw
In reply to [email protected]
Quoted 8 lines · On Sat, Apr 06, 2002 at 06:38:00PM +0800, [email protected] wrote:

dear sir:
I am a lvm user in China. I found 2 bugs when I using it.
One: the patches of lvm-1.0.3 for kernel-2.4.18 has a wrong definition
in
lvm-internal.h:
#define lvm_sectsize(dev) get_hardblocksize(dev)
should change to
#define lvm_sectsize(dev) get_hardsect_size(dev)

Sounds like the patch hasn't been generated correctly.

Make sure you configured LVM with the right kernel directory:

./configure with-kernel_dir=/your/kernel/here

Then do a "make clean" and a "make" in the PATCHES directory.

Signature · 1 line
patrick