Friday, August 13, 2010

More lvm2 weirdness

I have just install lv,2 on my Ubuntu 9.10 instance on EC2. I go to create the logical volume and got the following

# lvcreate -L 1g -n data_vol data_vg
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
Incompatible libdevmapper 1.02.27 (2008-06-25)(compat) and kernel driver
striped: Required device-mapper target(s) not detected in your kernel
Run `lvcreate --help' for more information.

It turns out that after install some of the modules are not loaded, so you have to

# modprobe dm_mod
# modprobe dm_mirror
# modprobe dm_snapshot

After that the command executes correctly!

# lvcreate -L 1g -n data_vol data_vg
Logical volume "data_vol" created

2 comments:

Unknown said...

Lifesaver. Thanks for posting.

Unknown said...

And as an additional note for readers ... Once you're happy with your configuration, go ahead and add "dm_mod", "dm_mirror", and "dm_snapshot" to your "/etc/modules" file.