OpenVZ Forum

Home » General » Support » raw disk access from container
raw disk access from container [message #51100] Tue, 04 February 2014 12:20 Go to previous message
smal2014 is currently offline  smal2014
Messages: 2
Registered: February 2014
Junior Member
I've been trying to evaluate if OpenVZ would work to give physical access to a raw device from the container. So far I have been unsuccessful (partly). This is on Centos 6.5 host and container.

Basically, here's what I've done :
# lvcreate -L 500m /dev/virtual-machines
# raw /dev/raw/raw1 /dev/virtual-machines/lvol0
# raw -qa
/dev/raw/raw1: bound to major 253, minor 9
# vzctl set 1 --devnodes "raw/raw1:rwq raw/rawctl:rwq" --save

# vzctl enter 1

# [root@ /]# raw -qa
/dev/raw/raw1: bound to major 253, minor

# [root@ /]# udevadm test /dev/raw/raw1
run_command: calling: test
unable to open device '/sys/dev/raw/raw1'

I've got to the point where I can see /dev/raw/rawctl be able to query it. Although it is not putting the raw device in the /sys/dev/block

I've put the following in /etc/udev/rules.d/60-raw.rules (although didn't really understand) :
SUBSYSTEM=="block", ENV{MAJOR}=="253", ENV{MINOR}=="9", GROUP:="ats", OWNER="nobody"

I'm sure I'm missing important pieces. Basically I can't open the raw device I created.

Read Message
Read Message
Previous Topic: /proc/partitions is empty
Next Topic: Need help in container creation
Goto Forum:

Current Time: Fri Jul 19 20:58:02 GMT 2024

Total time taken to generate the page: 0.02243 seconds