[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LVM: lvcreate fails: "Couldn't load device"



Andrew Schulman(andrex@alumni.utexas.net) is reported to have said:
> I'm trying to set up LVM for the first time.  I'm running
> testing/unstable with kernel 2.6.7 and lvm2 version 2.00.24-1.  The 
> dm-mod kernel module is loaded.  No udev or devfs here.
> 
> Since I've never done this before, I'm following the LVM HOWTO.  The 
> following commands all succeed:
> 
> pvcreate /dev/hda1
> vgcreate vg /dev/hda1
> vgchange -ay vg

This is from my notes:
I don't do the "vgchange -ay vg"
> 
> Now I want to create a logical volume, but the command seems to fail:
> 
> # lvcreate -L15000M vg

pvcreate /dev/hda6  /dev/hdb1           # 2 1G+ partitions
vg create LV_Home_Group /dev/hda6 /dev/hdb1  # in one group
lvcreate -L1.5G -n LV_Home LV_Home_Group  

Then I make a FS for LV_Home
mkreiserfs /dev/LV_Home_Group LV_Home

DF shows them like this:
/dev/mapper/lv_home_group-lv_home 1048540    740348    308192  71% /home

>   device-mapper ioctl cmd 9 failed: Invalid argument
>   Couldn't load device 'vg-lvol1'.
>   Failed to activate new LV.
> 
> syslog says
> 
> Feb  4 15:04:17 helium kernel: device-mapper: : dm-linear: Device lookup 
> failed
> Feb  4 15:04:17 helium kernel: device-mapper: error adding target to 
> table
> 
> Now, as I understand the HOWTO, lvcreate should have created the block 
> device file /dev/vg/lvol1, that I can use to create filesystems on.  But 
> it didn't.  OTOH, I do now have
> 
> # ls -l /dev/mapper
> total 0
> crw-------  1 root root  10, 63 Feb  3 16:31 control
> brw-------  1 root root 254,  0 Feb  4 15:04 vg-lvol1
It looks like you made it but you didn't put a file system on it, yet.
> 
> However all of lvdisplay, lvscan, vgdisplay, etc. act as though the 
> volume has been created on /dev/vg/lvol1: e.g.
> 
> # lvscan
>   ACTIVE            '/dev/vg/lvol1' [1.46 GB] inherit
> 
> (although the volume size is too small-- a separate problem I think).  
> But there's no /dev/vg* in my filesystem.  Now maybe those devices 
> aren't supposed to exist in /dev; maybe they're only logical devices 
> that the kernel "sees".  I wouldn't be crazy about that, but I could 
> live with it.  But then why the error about "Failed to activate new LV"?
> 
> LVM newbie is frustrated by this contradictory information and seemingly 
> inexplicable behavior.  Any help appreciated.

I think I found an LVM howto on the IBM site and also on the Suse
site.  I used them both to get LVM going, this time, and IIRC is
took only a few minutes to set them all up, I have 6 different Groups,
as of now.

HTH=Hope This Helps, YMMV=Your Mileage May Vary, HAND=Have A Nice Day

Wayne
-- 
Home is where the computer is plugged in.
_______________________________________________________



Reply to: