# How to avoid loop limitation in a openvz container?

On a openVZ containing Deb7 I need to lock the maximum size of a folder, which is used to upload on a php based web server. The directory is synced, so I have to lock the maxsize. MAXSIZE should be upgradable by adding some physical disk later ...

I want to use a file as a block device for a file system. So I have done :

dd if=/dev/zero of=/disk2/filesystem.dat bs=1M count=100


Then, I made the filesystem on it

mkfs.ext4 filesystem.dat


Then I tried to mount it :

mkdir /opt/filesystem ; mount /disk2/filesystem.dat /opt/filesystem


My OpenVZ (it is on a VPS) has no loop module in the kernerl. So I got

Could not find any loop device as usual under OpenVz

So i think I have to use FUSE, but I really do not know HOW ....

Any idea on locking the size of directory under OpenVZ ?

## 2 Answers

If you have access to OpenVZ physical node you can create loop device and mount it to VPS. But you can't use loop from OpenVZ VPS because technology restrictions.

As another solution you may call your administartor/hosting provider do something like this: http://www.stableit.ru/2013/11/how-to-mount-multiple-disks-to-openvz.html

As I supposed, this is a limitation of OPENVZ. A jail is NOT a virtualization.