cancel
Showing results for 
Search instead for 
Did you mean: 

tags { hosttags = 1 }

SOLVED
Go to solution
Michael Aos
Advisor

tags { hosttags = 1 }

When I add hosttags to lvm.conf and recreate initrd I can't mount the root filesystem.

Activating logical volumes
0 logical volume(s) in volume group "vg00" now active
Creating root device
mkroodev: mknod failed: 17
.
.
Kernel panic - not syncing: Attempted to kill init!
--
serviceguard-A.11.16.07-0
Red Hat Enterprise Linux ES release 4 (Nahant Update 5)
2.6.9-55.ELsmp on x86_64

vg00 is on internal (cciss) disk. Clustered VG is on CLARiiON with PowerPath

lvm_.conf:
activation { volume_list=["@"] }

I tried adding a tag to vg00 but that didn't help. I assume I want to modify this "activation" command to include vg00 regardless of tags but I'm not seeing the syntax.

Mike
2 REPLIES
Michael Aos
Advisor

Re: tags { hosttags = 1 }

I've discovered if I comment-out the entry in lvm.conf:

#tags { hosttags = 1 }

Then

mkinitrd /boot/initrd-`uname -r`.img `uname -r`

Then uncomment lvm.conf:

tags { hosttags = 1 }

And reboot, then vg00 gets activated properly AND I still get the exclusive activation functionality of the clustered VG.

Mike
Matti_Kurkela
Honored Contributor
Solution

Re: tags { hosttags = 1 }

You're on the right track. The problem seems to be that vg00 must be activated while the system's hostname is not set yet, so the LVM commands cannot know they should read the lvm_.conf.

I had this problem too, and ended up putting the volume_list configuration line to /etc/lvm/lvm.conf instead of host-specific /etc/lvm/lvm_.conf. I don't really see why the setting should be in a host-specific file.

This change eliminates the requirement to comment out the hosttags configuration while running a mkinitrd.

In the "activation" section of lvm.conf, there is even a commented example of the volume_list keyword. It gives a big clue about how the volume_list configuration works. Search for "volume_list" in the lvm.conf file and you'll find it.

The syntax for the volume_list configuration:

volume_list = [ "vg00", "@" ]

It means: "you're allowed to activate vg00 always, and any other VGs only if they have the tag".

MK
MK