OpenVZ Forum


Home » Mailing lists » Users » Access Cdrom, reboot and other questions
Access Cdrom, reboot and other questions [message #9083] Fri, 15 December 2006 20:46 Go to next message
Romeo Theriault is currently offline  Romeo Theriault
Messages: 20
Registered: December 2006
Junior Member
Hi, I have a program which needs to access a cdrom. What is the best way to
access a cdrom via a vps?

On another note, I noticed that from within a vps if I send the command
"reboot", the vps goes down but does not come back up. I need to start it
from the HN. It seems to me that this worked for me a few days ago. But I
recently upgraded to the recently released stable kernel. Is this a possible
cause?

Also, is it recommended to shutdown all of the vps's before doing a reboot
on the HN? I did a reboot today on the HN after installing the new kernel
and got to thinking I probably should have stopped the vps's first. Is this
true?

Thanks for any insight in these matters.

Romeo
Re: Access Cdrom, reboot and other questions [message #9084 is a reply to message #9083] Fri, 15 December 2006 23:34 Go to previous messageGo to next message
Romeo Theriault is currently offline  Romeo Theriault
Messages: 20
Registered: December 2006
Junior Member
Ok, I searched the forums better and found the answer to the vps not
rebooting. I guess I just have to be a little more patient. The vps does
indeed reboot it just takes it a little longer that I was expecting because
it's waiting for a cron job.


On 12/15/06 3:46 PM, "Romeo Theriault" <romeotheriault@fastmail.fm> wrote:

> Hi, I have a program which needs to access a cdrom. What is the best way to
> access a cdrom via a vps?
>
> On another note, I noticed that from within a vps if I send the command
> "reboot", the vps goes down but does not come back up. I need to start it
> from the HN. It seems to me that this worked for me a few days ago. But I
> recently upgraded to the recently released stable kernel. Is this a possible
> cause?
>
> Also, is it recommended to shutdown all of the vps's before doing a reboot
> on the HN? I did a reboot today on the HN after installing the new kernel
> and got to thinking I probably should have stopped the vps's first. Is this
> true?
>
> Thanks for any insight in these matters.
>
> Romeo
>
>
Re: Access Cdrom, reboot and other questions [message #9103 is a reply to message #9083] Mon, 18 December 2006 09:17 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Romeo Theriault wrote:
> Hi, I have a program which needs to access a cdrom. What is the best way to
> access a cdrom via a vps?
# vzctl set --devices
or mount cdrom from host system and then bindmount to /vz/root/<VEID>/mnt/cdrom

> On another note, I noticed that from within a vps if I send the command
> "reboot", the vps goes down but does not come back up. I need to start it
> from the HN. It seems to me that this worked for me a few days ago. But I
> recently upgraded to the recently released stable kernel. Is this a possible
> cause?
check cron jobs on your host. cron job should check
rebooted VEs every minute and start them back.
Probably you have not waited for a minute :)

> Also, is it recommended to shutdown all of the vps's before doing a reboot
> on the HN? I did a reboot today on the HN after installing the new kernel
> and got to thinking I probably should have stopped the vps's first. Is this
> true?
`service vz stop` does stop VEs first. So if you did a gracefull node reboot
VEs should have stopped automatically (service vz is stopped on node shutdown).
Sure, apps should be stopped first for gracefull applications shutdown.
Otherwise some applications can be disappointed by broken/not-closed data files.

> Thanks for any insight in these matters.
You are welcome!

Thanks,
Kirill
Re: Access Cdrom, reboot and other questions [message #9111 is a reply to message #9103] Mon, 18 December 2006 17:21 Go to previous messageGo to next message
Romeo Theriault is currently offline  Romeo Theriault
Messages: 20
Registered: December 2006
Junior Member
Thank you for your response. It is true I was not waiting long enough for
the reboots to actually happen, though upon looking at the cron file, it is
set to check every 5 minutes. Not a big deal, I can change it if I need to.

Though with the cdrom part of the question, upon your suggestion I set my
vps to access the cdrom like this:

vzctl set 104 --devices b:3:0:r --save

I found the 3 and 0 from doing a ls -l /dev/hda

So then I ssh'ed into vps 104 and tried mounting the cd with this:
mount /dev/hda /mnt/cdrom/

but I tells me I must specify the fs type, so I do:
mount -t iso9660 /dev/hda /mnt/cdrom/

And it tells me that iso9660 is not supported by the kernel. But I can mount
the cd just fine on the HW node without specifying a fs type.

Also, when you say "bindmount" do you mean just mount the cd under the vps's
dir's, like this:

mount /dev/had /vz/root/104/mnt/cdrom

Or does bindmount mean something else?

Am I missing something with the vzctl command?

Thanks again

Romeo


On 12/18/06 4:24 AM, "Kirill Korotaev" <dev@sw.ru> wrote:

> Romeo Theriault wrote:
>> Hi, I have a program which needs to access a cdrom. What is the best way to
>> access a cdrom via a vps?
> # vzctl set --devices
> or mount cdrom from host system and then bindmount to
> /vz/root/<VEID>/mnt/cdrom
>
>> On another note, I noticed that from within a vps if I send the command
>> "reboot", the vps goes down but does not come back up. I need to start it
>> from the HN. It seems to me that this worked for me a few days ago. But I
>> recently upgraded to the recently released stable kernel. Is this a possible
>> cause?
> check cron jobs on your host. cron job should check
> rebooted VEs every minute and start them back.
> Probably you have not waited for a minute :)
>
>> Also, is it recommended to shutdown all of the vps's before doing a reboot
>> on the HN? I did a reboot today on the HN after installing the new kernel
>> and got to thinking I probably should have stopped the vps's first. Is this
>> true?
> `service vz stop` does stop VEs first. So if you did a gracefull node reboot
> VEs should have stopped automatically (service vz is stopped on node
> shutdown).
> Sure, apps should be stopped first for gracefull applications shutdown.
> Otherwise some applications can be disappointed by broken/not-closed data
> files.
>
>> Thanks for any insight in these matters.
> You are welcome!
>
> Thanks,
> Kirill
Re: Access Cdrom, reboot and other questions [message #9112 is a reply to message #9111] Mon, 18 December 2006 17:33 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Romeo Theriault,

> Thank you for your response. It is true I was not waiting long enough for
> the reboots to actually happen, though upon looking at the cron file, it is
> set to check every 5 minutes. Not a big deal, I can change it if I need to.
>
> Though with the cdrom part of the question, upon your suggestion I set my
> vps to access the cdrom like this:
>
> vzctl set 104 --devices b:3:0:r --save
>
> I found the 3 and 0 from doing a ls -l /dev/hda
>
> So then I ssh'ed into vps 104 and tried mounting the cd with this:
> mount /dev/hda /mnt/cdrom/
>
> but I tells me I must specify the fs type, so I do:
> mount -t iso9660 /dev/hda /mnt/cdrom/
>
> And it tells me that iso9660 is not supported by the kernel. But I can mount
> the cd just fine on the HW node without specifying a fs type.
Oh, you are right. isofs is disabled by default in VE, since
it is a potential security risk.
You can apply the following patch to enable it:
http://download.openvz.org/contrib/kernel-patches/isofs.patc h

> Also, when you say "bindmount" do you mean just mount the cd under the vps's
> dir's, like this:
>
> mount /dev/had /vz/root/104/mnt/cdrom

> Or does bindmount mean something else?
you can do the above, thougho I actually meant:
# mount /dev/hda /mnt/cdrom
# mount --bind /mnt/cdrom /vz/root/104/mnt/cdrom

> Am I missing something with the vzctl command?
No :)

Kirill
Re: Access Cdrom, reboot and other questions [message #9418 is a reply to message #9112] Tue, 02 January 2007 15:29 Go to previous messageGo to next message
Romeo Theriault is currently offline  Romeo Theriault
Messages: 20
Registered: December 2006
Junior Member
Hi, thanks for the isofs patch. I applied it to the srpm kernel and
recompiled the kernel. The compile went fine and the kernel installs fine
but I get the same error in a ve when I try to mount the cd.

I have attached the patch file that I used as well as the kernel-ovz.spec
file that I modified to recompile the kernel with the isofs.patch. The
isofs.patch file was placed directly in the SOURCES directory. Would someone
be able to look at what I did to see if I made a mistake or is there a
problem with the patch?

Thank you,

Romeo


On 12/18/06 12:40 PM, "Kirill Korotaev" <dev@sw.ru> wrote:

> Romeo Theriault,
>
>> Thank you for your response. It is true I was not waiting long enough for
>> the reboots to actually happen, though upon looking at the cron file, it is
>> set to check every 5 minutes. Not a big deal, I can change it if I need to.
>>
>> Though with the cdrom part of the question, upon your suggestion I set my
>> vps to access the cdrom like this:
>>
>> vzctl set 104 --devices b:3:0:r --save
>>
>> I found the 3 and 0 from doing a ls -l /dev/hda
>>
>> So then I ssh'ed into vps 104 and tried mounting the cd with this:
>> mount /dev/hda /mnt/cdrom/
>>
>> but I tells me I must specify the fs type, so I do:
>> mount -t iso9660 /dev/hda /mnt/cdrom/
>>
>> And it tells me that iso9660 is not supported by the kernel. But I can mount
>> the cd just fine on the HW node without specifying a fs type.
> Oh, you are right. isofs is disabled by default in VE, since
> it is a potential security risk.
> You can apply the following patch to enable it:
> http://download.openvz.org/contrib/kernel-patches/isofs.patc h
>
>> Also, when you say "bindmount" do you mean just mount the cd under the vps's
>> dir's, like this:
>>
>> mount /dev/had /vz/root/104/mnt/cdrom
>
>> Or does bindmount mean something else?
> you can do the above, thougho I actually meant:
> # mount /dev/hda /mnt/cdrom
> # mount --bind /mnt/cdrom /vz/root/104/mnt/cdrom
>
>> Am I missing something with the vzctl command?
> No :)
>
> Kirill
Re: Access Cdrom, reboot and other questions [message #9442 is a reply to message #9418] Wed, 03 January 2007 11:52 Go to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Romeo,

1. please always report the exact messages you face.
2. check that iso9660 is available both in VE and in the host
with the command:
# cat /proc/filesystems
most likely you didn't load the module isofs:
# modprobe isofs

Thanks,
Kirill


> Hi, thanks for the isofs patch. I applied it to the srpm kernel and
> recompiled the kernel. The compile went fine and the kernel installs fine
> but I get the same error in a ve when I try to mount the cd.
>
> I have attached the patch file that I used as well as the kernel-ovz.spec
> file that I modified to recompile the kernel with the isofs.patch. The
> isofs.patch file was placed directly in the SOURCES directory. Would someone
> be able to look at what I did to see if I made a mistake or is there a
> problem with the patch?
>
> Thank you,
>
> Romeo
>
>
> On 12/18/06 12:40 PM, "Kirill Korotaev" <dev@sw.ru> wrote:
>
>
>>Romeo Theriault,
>>
>>
>>>Thank you for your response. It is true I was not waiting long enough for
>>>the reboots to actually happen, though upon looking at the cron file, it is
>>>set to check every 5 minutes. Not a big deal, I can change it if I need to.
>>>
>>>Though with the cdrom part of the question, upon your suggestion I set my
>>>vps to access the cdrom like this:
>>>
>>>vzctl set 104 --devices b:3:0:r --save
>>>
>>>I found the 3 and 0 from doing a ls -l /dev/hda
>>>
>>>So then I ssh'ed into vps 104 and tried mounting the cd with this:
>>>mount /dev/hda /mnt/cdrom/
>>>
>>>but I tells me I must specify the fs type, so I do:
>>>mount -t iso9660 /dev/hda /mnt/cdrom/
>>>
>>>And it tells me that iso9660 is not supported by the kernel. But I can mount
>>>the cd just fine on the HW node without specifying a fs type.
>>
>>Oh, you are right. isofs is disabled by default in VE, since
>>it is a potential security risk.
>>You can apply the following patch to enable it:
>> http://download.openvz.org/contrib/kernel-patches/isofs.patc h
>>
>>
>>>Also, when you say "bindmount" do you mean just mount the cd under the vps's
>>>dir's, like this:
>>>
>>>mount /dev/had /vz/root/104/mnt/cdrom
>>
>>>Or does bindmount mean something else?
>>
>>you can do the above, thougho I actually meant:
>># mount /dev/hda /mnt/cdrom
>># mount --bind /mnt/cdrom /vz/root/104/mnt/cdrom
>>
>>
>>>Am I missing something with the vzctl command?
>>
>>No :)
>>
>>Kirill
> ------------------------------------------------------------ ------------
>
Previous Topic: OpenVZ vs. Virtuozzo...
Next Topic: Out-of-memory question
Goto Forum:
  


Current Time: Fri Nov 08 22:40:23 GMT 2024

Total time taken to generate the page: 0.05004 seconds