Subject: Re: [vserver] mounting partitions
From: Shams Fantar <sethurf@free.fr>
Date: Sat, 20 Dec 2008 14:07:24 +0100

Shams Fantar wrote:
> Bruno Prémont wrote:
>   
>> On Fri, 19 December 2008 Shams Fantar wrote:
>>   
>>     
>>> Hello,
>>>
>>> I've one guest server (gserver1), and the root server.
>>>
>>> On the root server, there is a partition /backup (/dev/hda2) of 59
>>> Gb. I would like to mount /backup in the guest server gserver1, so, I
>>> do :
>>>
>>> vnamespace --enter gserver1 -- mount -t ext3 /dev/hda2
>>> /etc/vservers/gserver1/vdir/backup
>>>
>>> I get no error and the partition is mounted. But the problem is that
>>> the partition does the same size that the / partition. (14 Gb in my
>>> case). /backup is not mounted with its 59 Gb, why ? are there any
>>> solution so that /backup does 59 Gb insteaf of 14Gb ?
>>>
>>> Regards,
>>>
>>>     
>>>       
>> How do you determine that partition's available space?
>>   
>>     
>
> By doing a df -h :
>
> /dev/hda2              14G  1.3G   12G  10%
> /var/lib/vservers/gserver1/backup
>
>   
>> df takes a look at /etc/mtab, if that one is not "correct" (e.g.
>> matching /proc/self/mounts) 
>>     
>
> /etc/mtab gives me :
>
> /dev/hda2 /home ext3 rw 0 0
> /dev/hda2 /var/lib/vservers/gserver1/backup ext3 rw 0 0
>
>
>
>   
>> it may list wrong information because it
>> asks the wrong mountpoint for available space.
>>   
>>     
>
> Oh. :/
>
>   
>> Mounting that partition via vnamespace will most probably not update
>> the guest's mtab file... So you may consider symlinking /etc/mtab
>> to /proc/self/mounts, especially for guest which are pretty restricted
>> in their (u)mount abilities.
>>   
>>     
>
> But, how to do so that the guest server sees the hda2 partition ? Do I
> have to put the good line in /etc/mtab ?
>
>   
>> Bruno
>>   
>>     
> Regards,
>   

Problem solved, I've re-made the guest server, it's directly running on
/dev/hda2.

Regards,