[Users] Strange mount problem

Marc Peiser marc at itmatter.co.za
Mon Jun 27 10:44:57 EDT 2011


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 at 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 at 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 at va-webdav /]# rm -rf /etc/mtab
>> [root at va-webdav /]# ln -s /proc/mounts /etc/mtab
>> [root at va-webdav /]# ls -l /etc/mtab
>> lrwxrwxrwx 1 root root 12 Jun 27 12:37 /etc/mtab -> /proc/mounts
>> [root at va-webdav /]# init 6
>> [root at va-webdav /]# got signal 15
>>                                 exited from CT 233
>> [root at lnxsvr2 ~]# vzenter 233
>> entered into CT 233
>> [root at va-webdav /]# df -h
>> Filesystem            Size  Used Avail Use% Mounted on
>> [root at 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 at montanalinux.org> wrote:
>>> Marc,
>>>
>>> ----- Original Message -----
>>>> [root at va-box /]# df
>>>> Filesystem           1K-blocks      Used Available Use% Mounted on
>>>> [root at va-box /]# mount
>>>> none on /dev/pts type devpts (rw)
>>>> none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
>>>> [root at 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 at itmatter.co.za



More information about the Users mailing list