I have a CentOS server that is using zfs to manage a big, slow, network attached volume.
We read quite a lot from this volume, hence I would like to optimize the read performances.
The idea is clearly a L2ARC cache.
Unfortunately I only have a single SSD disk attached to this machine already formated with xfs hosting the / and I cannot attach more (managed machine by somebody else).
I was wondering if it was possible to create a file in the SSD disk and somehow put the L2ARC in that file.
I was thinking about mounting in loop the disk, however it seems like the loop mounting support only read-only devices.
Is there an alternative?
$ dd if=/dev/zero of=/root/cache size... $ mount -o rw,loop /root/cache /mnt/cache-file mount: /dev/loop0 is write-protected, mounting read-only mount: unknown filesystem type '(null)'