OSS Virtualization options ...

Nikos Vassiliadis nvass at teledomenet.gr
Thu Dec 20 06:33:41 PST 2007


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


More information about the freebsd-questions mailing list