Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2007 16:37:19 +0200
From:      Nikos Vassiliadis <nvass@teledomenet.gr>
To:        "Marc G. Fournier" <freebsd@hub.org>
Cc:        freebsd-questions@freebsd.org, Norberto Meijome <freebsd@meijome.net>
Subject:   Re: OSS Virtualization options ...
Message-ID:  <200712201637.20690.nvass@teledomenet.gr>
In-Reply-To: <09EB40C88507ABCB81E6AFA0@ganymede.hub.org>
References:  <74F0F91EA046A1B9EAB79AF7@ganymede.hub.org> <200712201457.42052.nvass@teledomenet.gr> <09EB40C88507ABCB81E6AFA0@ganymede.hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 20 December 2007 15:57:05 Marc G. Fournier wrote:
> > I think the question about virtualization is far too broad.
> > For example, you mentioned quotas. I think you can bypass storage
> > control problems, using seperate devices for each client filesystem.
> > Just create n vnode md(4) devices for your n jails. This has another
> > advantage besides partitioning storage. Since UFS supports sparse
> > files, only used blocks will occupy storage space, thus you don't
> > have to preallocate all storage.
>
> Again, as mentioned in the original, the problem isn't quotaing the
> whole VPS, the problem is software (in this case, plesk) that seems to
> have a requirement to set a hard quota *within* the VPS itself, which
> isn't supported, currently, by jails ...
>
> In the past, for quotaing 'the whole VPS', I had tried the whole md(4)
> device idea, but found that insufficent inodes were being created for to
> do much, and no matter what I tried with newfs, couldn't seem to get
> more to be created, as if, due to the small size of the device, a 'max
> ratio' was being hit ... but, this was way back on 4.x when I tried that
> ...

UFS2 does not initialize inodes at newfs time as UFS did. So, things
are much better now!

root:0:~# truncate -s 10G jail.00
root:0:~# mdconfig -at vnode -f jail.00 
md0
root:0:~# newfs md0
/dev/md0: 10240.0MB (20971520 sectors) block size 16384, fragment size 2048
        using 56 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
 160, 376512, 752864, 1129216, 1505568, ...
root:0:~# ls -ls jail.00 
4592 -rw-r--r--  1 root  wheel  10737418240 Dec 20 16:21 jail.00

4.5MB for a 10GB filesystems is fine, isn't it?

Nikos



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712201637.20690.nvass>