OpenVZ Forum


Home » General » Support » Suse VPS mount issues
Suse VPS mount issues [message #4367] Fri, 07 July 2006 15:44 Go to next message
rollinw is currently offline  rollinw
Messages: 25
Registered: June 2006
Location: Santa Barbara, California
Junior Member
After creating VPSs for 2 Suse templates (suse-9.3-x86_64 and opensuse-10-x86_64-default) I found that both showed incorrect mount information, both from the df -k command and the mount command. In both cases the /etc/fstab file had the wrong information.

I searched for evidence that others had found this problem, but didn't find any reports or posts. The answer to my problem was found in the document on Slackware Template Creation.

http://wiki.openvz.org/Slackware_template_creation

Before making the changes described below, one should stop
the VPS, if it is running:

/usr/sbin/vzctl stop nnn

Look in the document section,
Preparing the new VE
Getting the filesystem ready to run in a VE.
"Delete the file /etc/mtab and make it a symlink to
/proc/mounts"

This is the key to solving the problem, because the VPS needs to get its mount information from /proc/mounts

rm /vz/private/nnn/etc/mtab
ln -s /proc/mounts /vz/private/nnn/etc/mtab

Clean the /etc/fstab file

echo -n > /vz/private/nnn/etc/fstab

Slightly slower ways to accomplish the same goal are 1) edit the fstab file manually and delete all lines, or 2) with the
commands:

rm -f /vz/private/nnn/etc/fstab
touch /vz/private/nnn/etc/fstab
(make sure the permissions on the new empty fstab file are the
same as on the old one)

Edit /etc/rc.d/rc.S

It was necessary to modify the procedure slightly because of minor differences between Slackware and Suse. Suse does not have an rc.S file. Instead it uses script files whose names start with bootxxx. Suse has 2 files in /etc/rc.d/ that need to be edited; these are bootlocalfs and bootrootfsck. The edit action is almost the same: put a # character before any line that has

rm -f /etc/mtab(*)

In one of these files, the line containing the remove command had some other files as well. I deleted /etc/mtab from this list.

The Slackware document contains a number of other procedures too, but I was primarily interested in solving the mount problem.

After the changes are made, the VPS can be started:

/usr/sbin/vzctl start nnn

Log into the VPS with ssh.

Check the file /etc/fstab to make sure it is still empty:

cat /etc/fstab

Check that the link exists from /proc/mounts to /etc/mtab

ls -l /etc/mtab

Verify that mount and df -k correctly show that simfs is
mounted on / (the root filesystem) and has the correct
disk allocation.

Good luck
rollinw
Re: Suse VPS mount issues [message #4440 is a reply to message #4367] Mon, 10 July 2006 20:59 Go to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Can you post this please on http://wiki.openvz.org into troubleshooting as something like "Wrong mount information inside VE"?

thanks in advance!


http://static.openvz.org/userbars/openvz-developer.png

[Updated on: Mon, 10 July 2006 21:00]

Report message to a moderator

Previous Topic: problems with vzethdev module / vethX
Next Topic: Control Painel
Goto Forum:
  


Current Time: Thu Jul 18 20:16:11 GMT 2024

Total time taken to generate the page: 0.02888 seconds