# dmsetup

## RobinVossen

I cant get dmsetup working..

I think its a Kernel Issue. I run in a Gentoo box using a OpenVZ kernel..

This is my console output:

```

1 / # ls -al /dev/mapper/control /dev/mapper

crw------- 1 root root 10, 63 Dec 20 16:08 /dev/mapper/control

/dev/mapper:

total 0

drwxrwxrwx 2 root root     60 Dec 20 16:08 .

drwxr-xr-x 6 root root    540 Dec 20 16:08 ..

crw------- 1 root root 10, 63 Dec 20 16:08 control

1 / # dmsetup create sxb

device-mapper: version ioctl failed: Permission denied

Command failed

1 / # whoami

root

```

I need this (or any other On the Fly Disk Encryption program, I use http://www.saout.de/misc/dm-crypt/)

Can anyone help me with this?

Thanks,

Cheers,

Robin

----------

## marrowhk

Q. #rc-status boot

Shows device-mapper running, yes?

----------

## RobinVossen

No it doesnt.

But I cant make change my boot flags..

So, well hoow can I do that then??

----------

## marrowhk

Perhaps you misunderstand, this is just a standard emerge enabling a kernel feature.

I have no experience with OpenVZ kernels, perhaps someone else will point out if the below is not possible with your kernel.

This would be for a standard kernel:

1. enable device mapper in your kernel

```
CONFIG_MD_MULTIPATH=y

CONFIG_BLK_DEV_DM=y

CONFIG_DM_CRYPT=y

CONFIG_DM_MULTIPATH=y
```

2. rebuild your kernel

3. reboot into the new kernel

4. emerge device-mapper

5. rc-update add device-mapper boot

6. /etc/init.d/device-mapper start

7. done

----------

## RobinVossen

rc-update add device-mapper boot 

Cant be done.

But Ill just try the /init.d thing since I did forget that.

And well OpenVZ is really annoying when you have kernel modules.

Since the you run Virtual Boxes with a "Shared" Kernel.

Thanks  :Wink: 

----------

## marrowhk

 *RobinVossen wrote:*   

> rc-update add device-mapper boot 
> 
> Cant be done.
> 
> But Ill just try the /init.d thing since I did forget that.
> ...

 

Then build it in (Yes), don't use modules (M)

----------

