OpenVZ Forum


Home » Mailing lists » Users » Strange mount problem
Re: Strange mount problem [message #42996 is a reply to message #42930] Mon, 27 June 2011 14:44 Go to previous message
Marc Peiser is currently offline  Marc Peiser
Messages: 4
Registered: June 2011
Junior Member
Anatoly,

I'm using one of the precreated centos 5 templates from about a year
ago, not 100% sure which one. Is there a easy way to tell?

The only bit I can see is this from /etc/init.d/network

rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab)

Not sure if that writes to mtab or not?



On Mon, Jun 27, 2011 at 1:44 PM, Anatoly Pugachev <matorola@gmail.com> wrote:
> Marc,
>
> what Linux/OS template was used to create this container?
> You can probably grep start scripts of this Linux, to see is there's
> anything which could change /etc/mtab file?
>
> On Mon, Jun 27, 2011 at 2:45 PM, Marc Peiser <marc@itmatter.co.za> wrote:
>> Hi Scott,
>>
>> You are correct, /etc/mtab was not a symlink. I deleted it and created
>> a symlink but when I restart the container it's back to a normal file
>> again:
>>
>> [root@va-webdav /]# rm -rf /etc/mtab
>> [root@va-webdav /]# ln -s /proc/mounts /etc/mtab
>> [root@va-webdav /]# ls -l /etc/mtab
>> lrwxrwxrwx 1 root root 12 Jun 27 12:37 /etc/mtab -> /proc/mounts
>> [root@va-webdav /]# init 6
>> [root@va-webdav /]# got signal 15
>>                                 exited from CT 233
>> [root@lnxsvr2 ~]# vzenter 233
>> entered into CT 233
>> [root@va-webdav /]# df -h
>> Filesystem            Size  Used Avail Use% Mounted on
>> [root@va-webdav /]# ls -l /etc/mtab
>> -rw-r--r-- 1 root root 77 Jun 27 12:38 /etc/mtab
>>
>> Thanks,
>> Marc
>>
>> On Wed, Jun 22, 2011 at 5:26 PM, Scott Dowdle <dowdle@montanalinux.org> wrote:
>>> Marc,
>>>
>>> ----- Original Message -----
>>>> [root@va-box /]# df
>>>> Filesystem           1K-blocks      Used Available Use% Mounted on
>>>> [root@va-box /]# mount
>>>> none on /dev/pts type devpts (rw)
>>>> none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
>>>> [root@va-box /]#
>>>
>>> As kir pointed out... if /etc/mtab is not a symlink to /proc/mounts, make it one and it'll probably work for you again.
>



--
Marc Peiser
IT Matter cc
Tel : 071 678 5368
Fax : 086 602 2880
Email : marc@itmatter.co.za
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: &quot;permission denied&quot; error on CT rc.local script to add custom commands by regular
Next Topic: centos5 repo mirrors
Goto Forum:
  


Current Time: Thu Aug 14 12:59:45 GMT 2025

Total time taken to generate the page: 0.24651 seconds