OpenVZ Forum


Home » General » Support » vzdev will be removed by udev?!
Re: vzdev will be removed by udev?! [message #35589 is a reply to message #30337] Tue, 07 April 2009 11:46 Go to previous messageGo to previous message
Kako is currently offline  Kako
Messages: 1
Registered: April 2009
Junior Member
Another option would be the following script, which should create all missing devices on boot. It should be simply registered in /etc/rc.d/rc.local for work.

#!/bin/bash
#
# This script creates all missing devices on the VPS (openVZ),
# that are removed do updates on udev
# @author       Claudio Thomas, 2009
# @filename     /etc/rc.d/make_vzdev
#
# At first check if recreation is needed
if [ -c /dev/ptyp0 ]; then
        # All seems to be ok, so we are already finished
        exit 0;
fi
# VPS seems to forgot all vzdevices
# force recreation

# ptmx and pty's are needed to enter the VPS with vzctl enter <VPS> and other, so this are the first we will need!
MAKEDEV /dev/ptmx
MAKEDEV /dev/pty
# .../dev/pzyzf

# weitere
MAKEDEV /dev/core
# MAKEDEV /dev/fd would create a lot more than we need, so only make a symlink
ln -sf /proc/self/fd /dev/fd
MAKEDEV /dev/full
MAKEDEV /dev/kmem
MAKEDEV /dev/mem
MAKEDEV /dev/port
MAKEDEV /dev/ptmx
MAKEDEV /dev/ram
#... and also many other /dev/ram...
MAKEDEV /dev/random
MAKEDEV /dev/shm
# is needed for example ssh-connections!
MAKEDEV /dev/urandom
MAKEDEV /dev/zero

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Strange problems on New Node (1month)
Next Topic: Question on speed HDD on servers under VPS
Goto Forum:
  


Current Time: Wed Sep 10 16:31:48 GMT 2025

Total time taken to generate the page: 0.08299 seconds