Date: Sat, 5 Nov 2022 10:39:53 -0700 From: David Christensen <dpchrist@holgerdanske.com> To: questions@freebsd.org Subject: Re: Setting up ZFS L2ARC on a zvol Message-ID: <c5c4a09f-c2f4-a76f-dd1d-e34b4fd8a63f@holgerdanske.com> In-Reply-To: <PH0PR20MB370438AB8180CE27187E3BD2C0309@PH0PR20MB3704.namprd20.prod.outlook.com> References: <PH0PR20MB370438AB8180CE27187E3BD2C0309@PH0PR20MB3704.namprd20.prod.outlook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/26/22 06:32, julio@meroh.net wrote: > Hello, > > I'm setting up a new machine in which I have an NVMe drive and a bunch of hard disks. The hard disks are going to be a ZFS pool and the NVMe drive is going to be the root file system + the L2ARC for the pool. > > Now... I'm considering using ZFS as well for the root file system (as a separate single-drive pool) in order to simplify admin operations: I want to host some VMs on the NVMe for speed, and using zvols will be very helpful as I don't have to come up with the partition sizes upfront. > > And here comes the question: can the L2ARC of the hard disk pool be backed by a zvol on the NVMe pool (again, so that I don't have to use fixed-size partitions)? > > I gave a simple try to this setup and it's not working, so I'm wondering if this is just not a good idea and thus is unsupported, or if there is a bug: > > root@think:~ # zfs create -V 16G -o primarycache=none zroot/l2arg > root@think:~ # zpool add scratch cache zvol/zroot/l2arc > cannot add to 'scratch': no such pool or dataset > root@think:~ # Oct 26 05:45:28 think ZFS[3677]: vdev problem, zpool=scratch path=/dev/zvol/zroot/l2arc type=ereport.fs.zfs.vdev.open_failed > root@think:~ # ls /dev/zvol/zroot/l2arc > /dev/zvol/zroot/l2arc > > Thanks! ZPOOLCONCEPTS(7) for both 12.3-R [1] and 13.1-R [2]: "Virtual devices cannot be nested, so a mirror or raidz virtual device can only contain files or disks. Mirrors of mirrors (or other combinations) are not allowed. David [1] https://www.freebsd.org/cgi/man.cgi?query=zpoolconcepts&apropos=0&sektion=0&manpath=FreeBSD+12.3-RELEASE+and+Ports&arch=default&format=html [2] https://www.freebsd.org/cgi/man.cgi?query=zpoolconcepts&apropos=0&sektion=0&manpath=FreeBSD+13.1-RELEASE+and+Ports&arch=default&format=html
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c5c4a09f-c2f4-a76f-dd1d-e34b4fd8a63f>