OpenVZ Forum


Home » General » Support » *SOLVED* /dev destroyed upon gnome install
*SOLVED* /dev destroyed upon gnome install [message #10703] Mon, 26 February 2007 18:12 Go to next message
tibia is currently offline  tibia
Messages: 9
Registered: February 2007
Junior Member
Hello,

I am opening as requested a different topic for my problem also if to me it appears to be the same as in:

http://forum.openvz.org/index.php?t=tree&goto=4955&# msg_4955

I am running HW node with Debian-31r4-i386. My VPS are Debian based too. I create without trouble VPS both using the supplied Debian template cache and with custom template build upon guide in the wiki.

I discovered that attempting to install gnome on my VPS completly breaks down VPS /dev, after the installation process what's left of the previous 1548 items is:

vz202:/# ls -l /dev
total 4
lrwxrwxrwx  1 root root     13 Feb 25 13:08 MAKEDEV -> /sbin/MAKEDEV
lrwxrwxrwx  1 root root     11 Feb 25 13:08 core -> /proc/kcore
lrwxrwxrwx  1 root root     13 Feb 25 13:08 fd -> /proc/self/fd
lrwxrwxrwx  1 root root     24 Feb 25 13:08 initctl -> /dev/.static/dev/initctl
lrwxrwxrwx  1 root root     20 Feb 25 13:08 log -> /dev/.static/dev/log
drwxr-xr-x  2 root root     60 Feb 25 13:08 loop
drwxr-xr-x  2 root root     60 Feb 25 13:08 net
-rw-r--r--  1 root root     90 Feb 25 13:10 null
crw-------  1 root root 108, 0 Feb 25 13:08 ppp
drwxr-xr-x  2 root root      0 Feb 25 12:50 pts
drwxrwxrwt  2 root root     40 Feb 25 12:50 shm
lrwxrwxrwx  1 root root     24 Feb 25 13:08 sndstat -> /proc/asound/oss/sndstat
lrwxrwxrwx  1 root root     15 Feb 25 13:08 stderr -> /proc/self/fd/2
lrwxrwxrwx  1 root root     15 Feb 25 13:08 stdin -> /proc/self/fd/0
lrwxrwxrwx  1 root root     15 Feb 25 13:08 stdout -> /proc/self/fd/1
lrwxrwxrwx  1 root root     25 Feb 25 13:08 xconsole -> /dev/.static/dev/xconsol


Obviously anything goes and the VPS get completly useless: only vzctl destroy VPSID left...

Problem rises both with custom and supplied template cache.
It appears the problem is quite the same as in the above topic, I guess vzdev/udev is the problem.

I can't apply the same suggested solution as I can't locate the vzdev package (if any for Debian...).
Nor expert enough to turn the suggested RH based process to Debian.

Last note: indeed to run gnome session inside a VPS is not a necessity for me, just curiosity. But the discovered behavior made me fear there could be some more wired dependencies somewhere else, thus making the update of a system a very risky task.

Regards

tb

[Updated on: Fri, 09 March 2007 09:29] by Moderator

Report message to a moderator

Re: /dev destroyed upon gnome install [message #10722 is a reply to message #10703] Tue, 27 February 2007 08:28 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

I've just set up debian-based (debian-3.1-i386-minimal) VE and installed there gnome via aptitude. After that I have the following in /dev in VE:

# vzctl exec 7000 ls -l /dev
total 4
lrwxrwxrwx  1 root root     13 Feb 27 08:18 MAKEDEV -> /sbin/MAKEDEV
lrwxrwxrwx  1 root root     11 Feb 27 08:18 core -> /proc/kcore
lrwxrwxrwx  1 root root     13 Feb 27 08:18 fd -> /proc/self/fd
prw-------  1 root root      0 Feb 27 08:18 initctl
srw-rw-rw-  1 root root      0 Feb 27 08:18 log
drwxr-xr-x  2 root root     60 Feb 27 08:18 loop
drwxr-xr-x  2 root root     60 Feb 27 08:18 net
-rw-r--r--  1 root root    735 Feb 27 08:19 null
crw-------  1 root root 108, 0 Feb 27 08:18 ppp
crw-rw-rw-  1 root root   5, 2 Feb 27 08:19 ptmx
drwxr-xr-x  2 root root      0 Feb 27 08:18 pts
drwxrwxrwt  2 root root     40 Feb 27 08:18 shm
lrwxrwxrwx  1 root root     24 Feb 27 08:18 sndstat -> /proc/asound/oss/sndstat
lrwxrwxrwx  1 root root     15 Feb 27 08:18 stderr -> /proc/self/fd/2
lrwxrwxrwx  1 root root     15 Feb 27 08:18 stdin -> /proc/self/fd/0
lrwxrwxrwx  1 root root     15 Feb 27 08:18 stdout -> /proc/self/fd/1
prw-r-----  1 root adm       0 Feb 27 08:18 xconsole


And VE works perfectly! Smile

So, the questions are:
1) "... and the VPS get completly useless: only vzctl destroy VPSID left..." you said. What are exact symptoms?
2) What OpenVZ kernel version do you use?

Thank you,
Vasily
Re: /dev destroyed upon gnome install [message #10725 is a reply to message #10722] Tue, 27 February 2007 09:00 Go to previous messageGo to next message
tibia is currently offline  tibia
Messages: 9
Registered: February 2007
Junior Member
Can you still ssh to the VPS?
Can you open an X session to the VPS?
Can you still vzctl enter the VPS (vzctl exec works fine here too)?

Some of the services still work fine (http).

Did you compare the state of /dev before and after the gnome install? Were all of >1500 missing entries useless?
No tty, no pty left.

It appears to me the correct problem had been expressed in the forum topic I reported: vzdev had been removed.

Regards

tb
Re: /dev destroyed upon gnome install [message #10727 is a reply to message #10725] Tue, 27 February 2007 09:19 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

I will answer your questions, but, please, you should also answer my questions! Smile So I repeat the main questions: what kernel do you use? Have you compiled it yourself?

Answers on your questions:
  1. Can you still ssh to the VPS?
    No, because sshd doesn't work, because /dev/random is missing, because udev is working and it deletes this device node by default Smile
  2. Can you open an X session to the VPS?
    I haven't tried Smile
  3. Can you still vzctl enter the VPS (vzctl exec works fine here too)
    Definitely, I can it!
  4. Were all of >1500 missing entries useless? No tty, no pty left.
    Most of them were useless. Instead pty ptmx/pts bunch is used. But I see that on your node there is no ptmx, so udev didn't create it. why? I suspect the kernel with a bit unappropriate configuration. Because of it I'm asking you about your kernel!

I know, that the problem is in missing devnodes. But for different distributions it should be solved differently. There is no vzdev for debian, so lets investigate it and find a workaround. I have ideas, but, please, answer my questions.

Thanks,
Vasily
Re: /dev destroyed upon gnome install [message #10730 is a reply to message #10703] Tue, 27 February 2007 11:24 Go to previous messageGo to next message
sspt is currently offline  sspt
Messages: 100
Registered: August 2006
Location: Portugal
Senior Member
I've also tested with FC 5 & Debian Sarge and both works. With CentOS templates /dev/ is destroyed Neutral

http://static.openvz.org/userbars/openvz-user.png
Re: /dev destroyed upon gnome install [message #10748 is a reply to message #10703] Tue, 27 February 2007 17:46 Go to previous messageGo to next message
tibia is currently offline  tibia
Messages: 9
Registered: February 2007
Junior Member
Hello,

the kernel is 2.6.9-023stab040.1-ovz and no I didn't compile it myself. Do you think I should recompile it with a different configuration? Suggestions?

So you believe is a kernel matter not weired dependencies?

Regards
tb
Re: /dev destroyed upon gnome install [message #10761 is a reply to message #10748] Wed, 28 February 2007 11:53 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

The next question is what OS Template you're using for your VE? I remember, that it is Debian, but did you get it from openvz.org? Or did you use debootstrap? Is it Debian Etch or not?

Also, please, tell me the version of udev, that is installed in VE, and attach here the configuration file of VE in question.

The main strangness of your VEs for me (and for Silvio aka sspt) is that udev in ours VEs creates /dev/ptmx, but udev in your VE doesn't do it! The questions above are directed to find out, why it happens.

Thank you,
Vasily.
Re: /dev destroyed upon gnome install [message #10779 is a reply to message #10761] Wed, 28 February 2007 19:27 Go to previous messageGo to next message
tibia is currently offline  tibia
Messages: 9
Registered: February 2007
Junior Member
Hello,

about templates: as reported in the first msg, I have the same exactly behavior both with the downloaded template and with a custom built following the wiki with debootstrap.
Both present the same 'survivors' in /dev after the gnome install.

The downloaded one is
http://download.openvz.org/template/precreated/debian-3.1-i3 86-minimal.tar.gz
The custom is built exactly as in the tutorial wiki.

Debian: Sarge
I read sspt reported Sarge test as working and CentOS failing.

Udev version: 0.056-3

Is it normal to have an apparently well formed private/<brokenvpsid>/dev content while the running instance shows the broken content?
When I say well formed I mean identical to one of the 'sane' vps.
And ptmx is there too.

The configuration file is :

#  Copyright (C) 2000-2007 SWsoft. All rights reserved.
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#

ONBOOT="no"

# UBC parameters (in form of barrier:limit)
# Primary parameters
AVNUMPROC="40:40"
NUMPROC="65:65"
NUMTCPSOCK="80:80"
NUMOTHERSOCK="80:80"
VMGUARPAGES="6144:2147483647"
# Secondary parameters
KMEMSIZE="2752512:2936012"
TCPSNDBUF="319488:524288"
TCPRCVBUF="319488:524288"
OTHERSOCKBUF="132096:336896"
DGRAMRCVBUF="132096:132096"
OOMGUARPAGES="6144:2147483647"
# Auxiliary parameters
LOCKEDPAGES="32:32"
SHMPAGES="8192:8192"
PRIVVMPAGES="49152:53575"
NUMFILE="2048:2048"
NUMFLOCK="100:110"
NUMPTY="16:16"
NUMSIGINFO="256:256"
DCACHESIZE="1048576:1097728"

PHYSPAGES="0:2147483647"
NUMIPTENT="128:128"

# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="1048576:1153434"
DISKINODES="200000:220000"
QUOTATIME="0"

# CPU fair sheduler parameter
CPUUNITS="1000"
IP_ADDRESS="192.168.1.202"
HOSTNAME="vz202"
VE_ROOT="/var/lib/vz/root/$VEID"
VE_PRIVATE="/var/lib/vz/private/$VEID"
OSTEMPLATE="debian-3.1-i386-minimal2"
ORIGIN_SAMPLE="vps.basic"
NAMESERVER="151.99.125.2"
SEARCHDOMAIN="nope"


If I can help better diagnose the problem let me know any test I can do as help.
BTW why you think is a different problem of the one faced on CentOS in http://forum.openvz.org/index.php?t=tree&goto=4955&# msg_4955

Bye.

tb
Re: /dev destroyed upon gnome install [message #10786 is a reply to message #10779] Thu, 01 March 2007 07:40 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Thanks for the answers!

Quote:


Is it normal to have an apparently well formed private/<brokenvpsid>/dev content while the running instance shows the broken content?
When I say well formed I mean identical to one of the 'sane' vps.
And ptmx is there too.



You mistakenly consider /dev content after udev installation broken. Look at usual hardware node: after installation of udev a lot of device nodes are removed from /dev, but it isn't broken. It just works in other way: only existent devices are observed in /dev. The same situation is in VE.

Quote:


BTW why you think is a different problem of the one faced on CentOS in http://forum.openvz.org/index.php?t=tree&goto=4955&# msg_4955


It is the same problem: some device nodes are missing (the most important for us at the moment (it is necessary to enter VE) is /dev/ptmx). For rpm-based distributions we have a vzdev rpm as a good workaround. But you have Debian in VE, so there is no vzdev for you, and we need to find another solution. I repeat, that the strange thing is is that for my VE and sspt's VE /dev/ptmx is in place even with installed udev! So we need to find out why there is no ptmx in your VE. Various factors can affect:

1) kernel configuration (we've already checked that)
2) VE template/configuration (we've already checked that)
3) udev version (we've already checked that)
4) udev configuration (not checked now)
5) some other things (not checked now Smile)

The next questions are:

Can you provide me an access to your node?
Can you gzip problematic VE and put it on ftp/http, so I'll be able to download VE and test it locally?

Also, please, try to do the following before VE start:
# vzctl set <veid> --features sysfs:on --save

Then start VE and enter it. Does it work now?

Thanks,
Vasily.
Re: /dev destroyed upon gnome install [message #10797 is a reply to message #10786] Fri, 02 March 2007 17:27 Go to previous messageGo to next message
tibia is currently offline  tibia
Messages: 9
Registered: February 2007
Junior Member
Hello,

agree about udev. But is it correct to have private/ID/dev normally poulated?

I am afraid but I can not quickly give access to the HW node.
You mean by ssh?

I packed the vps but my public space it's not wide enough can I ftp somewhere?

About the:

# vzctl set <veid> --features sysfs:on --save


what you mean by "does it work now?". I still can't ssh to it.
I can vzctl enter it. But it was my fault previously reporting this as not working, I forget to report this in previous post, apologies.

tb
Re: /dev destroyed upon gnome install [message #10832 is a reply to message #10797] Mon, 05 March 2007 14:34 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

Quote:

But is it correct to have private/ID/dev normally poulated?

Sorry, I do not clearly understand your question. Rolling Eyes There are several possibilities to populate /dev:
1) static content
2) udev
3) devfs, but it is obsolete, so we don't take this possibility into account

All these ways are "normal", and you'll get "normal" content. In some situations one way is preferable, but in other - other one. In OpenVZ, static content is a simple and logical choice, because sysfs is not completely virtualized, and therefore udev can't be used simply. But as you can see, many packets need udev by dependency. In RPM-based distribution such dependency lack can be stoppled with vzdev package. But in Debian we can't do so... (or can we? Actually I'm not very familiar with Debian, but AFAIK it isn't possible to do it easy.) So the simple way in Debian is to install udev to satisfy all dependencies, and after that work around /dev content to get VE work in the way we wish! Smile


Quote:

I am afraid but I can not quickly give access to the HW node.
You mean by ssh?

I packed the vps but my public space it's not wide enough can I ftp somewhere?

About the:

# vzctl set <veid> --features sysfs:on --save

what you mean by "does it work now?". I still can't ssh to it.
I can vzctl enter it. But it was my fault previously reporting this as not working, I forget to report this in previous post, apologies.



Ooops! Smile So you can enter it?! It changes the situation dramatically!.. So you have the same situation as I have! And I was digging into the direction why I can enter VE and you can't do it! Smile Next time, please, be a bit more precise...

Ok then, what problems do you have with Debian VE now? You can't ssh in it? If so, then I don't need an access to your node and I don't need your gziped VE, because I know the reason.

After installing gnome in Debian VE and restarting this VE, I enter it via `vzctl enter` command and do the following:

debian-ve# ps aux | grep sshd
debian-ve# /etc/init.d/ssh start
Starting OpenBSD Secure Shell server: sshdPRNG is not seeded


It makes me think, that the problem is in /dev/random or in /dev/urandom. Checking this guess:
debian-ve# mknod /dev/random c 1 8
debian-ve# /etc/init.d/ssh start
Starting OpenBSD Secure Shell server: sshd.
debian-ve# echo $?
0
debian-ve# ps aux | grep sshd


So sshd still can't start (but because of some other problem). In logs I find:
sshd[1688]: fatal: daemon() failed: Success

So, I look at man page on daemon():
The glibc implementation can also return -1 when /dev/null exists but is not a character device with the expected major and minor numbers. In this case errno need not be set.

This is it! Let's create /dev/null:
debian-ve# mknod /dev/null c 1 3
debian-ve# /etc/init.d/ssh start
Starting OpenBSD Secure Shell server: sshd.
debian-ve# ps aux | grep ssh
root      1819  0.0  0.0  3468  920 ?        Ss   14:16   0:00 /usr/sbin/sshd

Now I can ssh in VE!

The next problem is that after restarting VE /dev/random and /dev/null dissappear (thank to udev). How to fight against it in my next post. This one is too big. Smile

[Updated on: Mon, 05 March 2007 14:36]

Report message to a moderator

Re: /dev destroyed upon gnome install [message #10834 is a reply to message #10797] Mon, 05 March 2007 15:24 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
So, as I promised, here is the way I fought against deleting /dev/null and /dev/random by udev. I just created in /etc/udev/links.conf file the following two lines:
M null          c 1 3
M random        c 1 8

HTH,
Vasily
Re: /dev destroyed upon gnome install [message #10861 is a reply to message #10832] Tue, 06 March 2007 07:10 Go to previous messageGo to next message
tibia is currently offline  tibia
Messages: 9
Registered: February 2007
Junior Member
Hello Vasily,

your solution works flawless.
Now I can ssh to the VPS.
But not ssh -X Sad

The origin of the trouble was the attempt to install gnome on a vps.
As you understand I am not such of an expert, but I guess configuration about this is correct about X and ssh x forwarding, as I use it on other servers, virtual and hardware..
There could be something more about devices or should I dig somewhere else? Hint?

BTW I think the solution about udev messing up /dev on Debian could be a FAQ or be placed in Wiki.

More about udev. By "normal" I was meaning I was surprised about seeing all devices in private vps area while seeing the reported situation in its running environment. But I guess it's my misunderstanding of udev behavior.
Is it correct to have different output of:
ls -l /vz/private/ID/dev
vzctl exec ID ls -l /dev

Last as I told before while ssh is mandatory I don't really need to have gnome on the vps. But the episode raised my fear about upgrade policies for vps. This time I had problem installing gnome but there could be some more dependencies problem hiding somewhere?

Regards and thank you for help.
Tb

[Updated on: Tue, 06 March 2007 07:10]

Report message to a moderator

Re: /dev destroyed upon gnome install [message #10867 is a reply to message #10861] Tue, 06 March 2007 08:39 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

Quote:


Now I can ssh to the VPS. Smile
But not ssh -X Sad



Hmm... What exact problem do you have? I can do ssh -X:

[HN]# ssh -X 172.0.0.2
Password:
Last login: Tue Mar  6 08:10:40 2007 from 192.168.X.Y
[VE]# exit
logout
Connection to 172.0.0.2 closed.


Quote:


BTW I think the solution about udev messing up /dev on Debian could be a FAQ or be placed in Wiki.


It'll be greatly appreciated!


Quote:


Is it correct to have different output of:
ls -l /vz/private/ID/dev
vzctl exec ID ls -l /dev



Yes it is absolutely ok. In few words the process of VE start is the following. First, /vz/private/ID/ is mirror-likely mounted on /vz/root/ID/ (using simfs filesystem). After that chroot to /vz/root/ID/ occurs and VE's init process is started. VE's udev init-script mounts tmpfs on /dev (/dev in VE, but /vz/root/dev on HN) and populates this newly mounted filesystem. So, when VE is started the output of
ls -l /vz/root/ID/dev
vzctl exec ID ls -l /dev
is the same.


Quote:

Last as I told before while ssh is mandatory I don't really need to have gnome on the vps.

However, let's check, does it work, because for somebody else it can be mandatory to run gnome in VE.


Quote:

But the episode raised my fear about upgrade policies for vps. This time I had problem installing gnome but there could be some more dependencies problem hiding somewhere?

I undestand your fear. The only thing I can assure you is that the problems with udev are the only ones related to dependencies, I've encountered here at forum. So, from my expirience I can say that no problem should arise. However, there is no 100% guarantee as usual! Very Happy
Re: /dev destroyed upon gnome install [message #10886 is a reply to message #10867] Tue, 06 March 2007 14:11 Go to previous messageGo to next message
tibia is currently offline  tibia
Messages: 9
Registered: February 2007
Junior Member
Me too I can do:

kiki@kali:~$ ssh -q -X -l root vz202
Password:
Last login: Mon Mar  5 09:38:22 2007 from 192.168.1.200
vz202:~#


What I can't do is:

vz202:~# gnome-session

(gnome-session:7800): Gtk-WARNING **: cannot open display:
vz202:~#


I double checked all the X/ssh configurations and it appears to be everything fine (sshd_config, $DISPLAY )

Re: /dev destroyed upon gnome install [message #10899 is a reply to message #10886] Tue, 06 March 2007 17:01 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
And for me it works... Smile

Do you realize, that window manager on the server (this is the node, where you access the VE by ssh from) should be killed and X server still running? So: X server running but without any(!) WM. (without WM only if you want to run remote window manager actually)

After that, please, do the following:
# ssh -vvv -X -Y -l root vz202
Password:
Last login: Mon Mar  5 09:38:22 2007 from 192.168.1.200
# echo $DISPLAY
# gnome-calculator
Then, please, post output of these commands and what you see on the screen.
Re: /dev destroyed upon gnome install [message #10900 is a reply to message #10899] Tue, 06 March 2007 17:02 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
BTW, maybe start a new thread, concerning X Window System in VE?

Thanks,
Vasily.
Re: /dev destroyed upon gnome install [message #10944 is a reply to message #10899] Thu, 08 March 2007 15:51 Go to previous message
tibia is currently offline  tibia
Messages: 9
Registered: February 2007
Junior Member
Hello,
sorry for delay in answer, I was testing the reason for the problem.

Now it's solved and it was not related to the original topic.
Xauth was missing.
BTW your solution for the original problem is working perfectly.
Guess the subject should be turned to solved

Thanks for help
tb
Previous Topic: Difference between --devnodes and --devices?
Next Topic: File Permission
Goto Forum:
  


Current Time: Tue Sep 17 04:16:58 GMT 2024

Total time taken to generate the page: 0.04974 seconds