Monter un fichier en ext4 (no_journal) sans loop device

Bonjour à tous.
Sur un “invité” openVZ (type VPS OVH), debian7-64, j’ai besoin de fixer la taille maximum d’un répertoire. Il est le point de montage d’un filesystem basé sur un fichier.
J’utilise cette technique pour fixer la taille maximum d’un répertoire et contrôler l’espace disponible en ajoutant des zéros sur mon fichier.

Je ne dispose pas de loop device pour faire l’opération de montage.
Une idée ? FUSE ?

mount filesystem.dat /var/www/files

mount: Could not find any loop device. Maybe this kernel does not know
about the loop device? (If so, recompile or `modprobe loop’.)

Le message d’erreur contient la réponse :

[quote=“matvgr”]
mount: Could not find any loop device. Maybe this kernel does not know
about the loop device? ( If so , recompile or `modprobe loop’.)[/quote]

if so recompile : si tel est le cas, recompiler le noyau.

Tout d’abord, est-ce que tu as essayé de charger le module du noyau (#modprobe loop) après la première tentative ?

L’option loop de mount se nomme … loop.

mount -o loop

Le module du noyau se nomme aussi loop
$ grep LOOP /boot/config-uname -r
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_LOOP_MIN_COUNT=8

CONFIG_BLK_DEV_CRYPTOLOOP is not set

CONFIG_LOOPBACK_TARGET=m
CONFIG_RC_LOOPBACK=m
CONFIG_SND_ALOOP=m
CONFIG_LUSTRE_LLITE_LLOOP=m
CONFIG_AUFS_BDEV_LOOP=y

config BLK_DEV_LOOP
	tristate "Loopback device support"
	---help---
	  Saying Y here will allow you to use a regular file as a block
	  device; you can then create a file system on that block device and
	  mount it just as you would mount other block devices such as hard
	  drive partitions, CD-ROM drives or floppy drives. The loop devices
	  are block special device files with major number 7 and typically
	  called /dev/loop0, /dev/loop1 etc.

	  This is useful if you want to check an ISO 9660 file system before
	  burning the CD, or if you want to use floppy images without first
	  writing them to floppy. Furthermore, some Linux distributions avoid
	  the need for a dedicated Linux partition by keeping their complete
	  root file system inside a DOS FAT file using this loop device
	  driver.

	  To use the loop device, you need the losetup utility, found in the
	  util-linux package, see
	  <ftp://ftp.kernel.org/pub/linux/utils/util-linux/>.

	  The loop device driver can also be used to "hide" a file system in
	  a disk partition, floppy, or regular file, either using encryption
	  (scrambling the data) or steganography (hiding the data in the low
	  bits of, say, a sound file). This is also safe if the file resides
	  on a remote file server.

	  There are several ways of encrypting disks. Some of these require
	  kernel patches. The vanilla kernel offers the cryptoloop option
	  and a Device Mapper target (which is superior, as it supports all
	  file systems). If you want to use the cryptoloop, say Y to both
	  LOOP and CRYPTOLOOP, and make sure you have a recent (version 2.12
	  or later) version of util-linux. Additionally, be aware that
	  the cryptoloop is not safe for storing journaled filesystems.

	  Note that this loop device has nothing to do with the loopback
	  device used for network connections from the machine to itself.

	  To compile this driver as a module, choose M here: the
	  module will be called loop.

Retenons , [mono]The loop devices are block special device files with major number 7 and typically called /dev/loop0, /dev/loop1[/mono]
et
[mono]To use the loop device, you need the losetup utility, found in the util-linux package[/mono]
Vérifier deux points sur le système : présence en /dev de loop* et s’assurer d’avoir installé losetup.

Merci pour ta réponse.
Je précise que je n’ai pas accès au host …

Sur cette machine, je ne suis que client … Soit je n’ai pas tout compris, soit les containers openVZ ne peuvent pas “recompiler” leur noyau sans accès au host …

Regarde du côté de ploop.

wiki.openvz.org/Ploop

Trouvé traces en debian jessie et sid.

packages.debian.org/jessie/ploop

oui vu aussi :slightly_smiling:

Je ne me place pas sur cette interface guest/host !
Je suis locké dans le container …

Excellente approche :slightly_smiling: