OpenVZ Forum


Home » General » Support » Devnodes question
Devnodes question [message #34535] Thu, 15 January 2009 22:56 Go to next message
n00b_admin is currently offline  n00b_admin
Messages: 77
Registered: July 2006
Location: Romania
Member
Hello,

I use the latest OpenVZ tools on a 2.6.24-ovz006 kernel with Gentoo.

I'm trying to setup a shared disk storage solution between two or more CT's.

This is not for production purposes, the performance is not paramount... yet Smile

My shared disk approach is performed using a file in which i created a filesystem. This file is mapped as a loopback block device in /dev/loop0.

I am able to mount the filesystem inside the CT's but as soon as the last of the two testing CT's is stopped the loop block device is also released.

Is there a way to stop vzctl from deleting the loopback block device from my HN ?

Thank you in advance for your assistance.
Re: Devnodes question [message #34536 is a reply to message #34535] Thu, 15 January 2009 23:54 Go to previous messageGo to next message
n00b_admin is currently offline  n00b_admin
Messages: 77
Registered: July 2006
Location: Romania
Member
After some poking around here's more info regarding the problem i encounter:

On the HN i perform something like this:

losetup /dev/loop0 /root/disk

After creating the block device file i issue:

losetup -a

Which outputs:

/dev/loop/0: [0803]:12271800 (/root/disk)

I configure the first VE like this:

vzctl set 201 --devnodes loop0:rw --save

Do the same to the second VE:

vzctl set 202 --devnodes loop0:rw --save

Start both VE's and mount the /dev/loop0 as /mnt/disk2 inside the VE's.

Everything works perfect at this point.

Then i stop VE 202 and issue "losetup -a" on the HN which has the same output as before.

After i stop the other VE, "losetup -a" does not output anything signaling that the block device file has been detached.

I repeated this operation with the "DEVNODES" option set to read-only but the same behavior is encountered which leads me to believe it is an operation performed automatically by VZCTL, perhaps, but i was not able to identify how to control it.
Re: Devnodes question [message #34566 is a reply to message #34535] Sun, 18 January 2009 19:43 Go to previous messageGo to next message
n00b_admin is currently offline  n00b_admin
Messages: 77
Registered: July 2006
Location: Romania
Member
Help ? Anyone ?
Re: Devnodes question [message #34579 is a reply to message #34566] Mon, 19 January 2009 11:43 Go to previous message
piavlo is currently offline  piavlo
Messages: 159
Registered: January 2007
Senior Member
Something in dmesg regarding loop device while/after you shutdown the VEs?

My guess is that gentoo openrc shutdown scripts inside VE remove all loop devices (losetup -d ...). Then first VE shutdowns it cannot delete
/dev/loop0 since it is still mounted by second VE and then the second VE shuts down it has no problem removing /dev/loop0

You can try to contact Roy Marples - the author of openrc
and ask him at http://roy.marples.name/
Previous Topic: "cpus" config option and "--set cpus" issue
Next Topic: [solved] Compile problem for xen enabled ovzkernel-2.6.18-92.1.1.el5.028stab057.2
Goto Forum:
  


Current Time: Sun Jul 14 22:15:44 GMT 2024

Total time taken to generate the page: 0.02376 seconds