Subject: Re: [vserver] mounting partitions
From: Bruno <bonbons67@internet.lu>
Date: Sat, 20 Dec 2008 11:21:34 +0100

On Fri, 19 December 2008 Shams Fantar wrote:
> 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 ?

How do you determine that partition's available space?

df takes a look at /etc/mtab, if that one is not "correct" (e.g.
matching /proc/self/mounts) it may list wrong information because it
asks the wrong mountpoint for available space.

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.

Bruno