Testing openzfs-2.1.x - No /var/run/zfs/zvol links

All your general support questions for OpenZFS on OS X.

Testing openzfs-2.1.x - No /var/run/zfs/zvol links

Postby Eladio » Thu Feb 17, 2022 11:39 am

Hi all,
Just upgrade to 2.1.x on Monterey, an encrypted volume from pool did not get created a device link at /var/run/zfs/zvol/dsk.
The device at /dev is created and is usable.
I use those links for vmware vmdk 's, so I don't have to rename devices in those files each host reboot.
Eladio
 
Posts: 17
Joined: Fri Feb 05, 2021 11:52 pm

Re: Testing openzfs-2.1.x - No /var/run/zfs/zvol links

Postby lundman » Sun Feb 20, 2022 8:34 pm

That would suggest InvariantDisks is not running. You might need to check why, there was a situation where it would not start InvariantDisks from the installer (but it would start next reboot\).
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Testing openzfs-2.1.x - No /var/run/zfs/zvol links

Postby Eladio » Mon Feb 21, 2022 8:43 am

lundman wrote:That would suggest InvariantDisks is not running. You might need to check why, there was a situation where it would not start InvariantDisks from the installer (but it would start next reboot\).

Hi lundman, thanks for your work!
- A reboot or two did not solve the problem, /var/run/zfs/zvol/{dsk,rdsk} were not populated with links, they are empty.
- InvariantDisks *did* populate /var/run/disk/by-id/ with links to volumes inside a disk, but not the whole disk. I mean, a zvol /dev/disk3 with 2 partitions get links for disk3s1 and disk3s2; but disk3 is not linked.
Thanks!
Eladio
 
Posts: 17
Joined: Fri Feb 05, 2021 11:52 pm

Re: Testing openzfs-2.1.x - No /var/run/zfs/zvol links

Postby lundman » Mon Feb 21, 2022 8:30 pm

Why would you want a link for disk3?
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Testing openzfs-2.1.x - No /var/run/zfs/zvol links

Postby Eladio » Wed Feb 23, 2022 7:37 am

Well, If you want to provide hundreds of VMs cloning a base zvol, the hypervisor needs the whole disk to start and boot OSes. Version 2.1.0 create links whit whole path name of each zvol clon (e.g. /var/run/zfs/zvol/dsk/hv1/ubuntu/20.4/dsk001). This is very convenient for managing disks. Disk-by-id is a problem for me, because I can not distinguish one clon from other, or even if they had differents UUIDs i can not get a relation betwwen a zvol clon and a /dev/diskXXX easily.
Eladio
 
Posts: 17
Joined: Fri Feb 05, 2021 11:52 pm

Re: Testing openzfs-2.1.x - No /var/run/zfs/zvol links

Postby cbreak » Mon Feb 28, 2022 12:08 am

I don't think InvariantDisks is involved in this, the tool doesn't know about zfs specifically, and just creates symlinks inside `/var/run/disks/by-xxx` based on what DiskArbitration tells it about.

Did you unlock the encryption root for the volumes? Did you mount all the parents of the volumes?
cbreak
 
Posts: 13
Joined: Mon Sep 19, 2016 9:12 am

Re: Testing openzfs-2.1.x - No /var/run/zfs/zvol links

Postby Eladio » Tue Mar 01, 2022 5:02 am

cbreak wrote:I don't think InvariantDisks is involved in this, the tool doesn't know about zfs specifically, and just creates symlinks inside `/var/run/disks/by-xxx` based on what DiskArbitration tells it about.

Did you unlock the encryption root for the volumes? Did you mount all the parents of the volumes?

Yes to all... All devices are created, but no links on /var/run/zfs/zvol. Note that this dir is different from /var/run/disks/by-xxx.
Old version did create /var/run/zfs/zvol/dsk/<pool_name>/<zvol_name> links.
Eladio
 
Posts: 17
Joined: Fri Feb 05, 2021 11:52 pm

Re: Testing openzfs-2.1.x - No /var/run/zfs/zvol links

Postby lundman » Sun Mar 20, 2022 5:18 pm

Ooh riight, yes, "zed" used to create symlinks for zvols! Hmm wonder if that was missed somehow. Can you see if the zvol create-link-event is sent by the kernel? You can run "zpool events -f" and see if those events are reported.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Testing openzfs-2.1.x - No /var/run/zfs/zvol links

Postby Eladio » Wed Mar 23, 2022 9:23 am

lundman wrote:Ooh riight, yes, "zed" used to create symlinks for zvols! Hmm wonder if that was missed somehow. Can you see if the zvol create-link-event is sent by the kernel? You can run "zpool events -f" and see if those events are reported.


Nope, that event is not triggered: Import a pool with not encrypted zvol in it:
Code: Select all
Mar 23 2022 18:19:59.687064112 sysevent.fs.zfs.history_event
Mar 23 2022 18:19:59.739508050 sysevent.fs.zfs.config_sync
Mar 23 2022 18:19:59.739530860 sysevent.fs.zfs.pool_import
Mar 23 2022 18:19:59.740899877 sysevent.fs.zfs.history_event
Mar 23 2022 18:19:59.767504691 sysevent.fs.zfs.config_sync
Mar 23 2022 18:19:59.811686606 resource.fs.zfs.zvol_create


And exported:
Code: Select all
Mar 23 2022 18:20:15.936935897 resource.fs.zfs.zvol_remove
Mar 23 2022 18:20:15.951036001 sysevent.fs.zfs.pool_export
Mar 23 2022 18:20:16.021543642 sysevent.fs.zfs.config_sync
Eladio
 
Posts: 17
Joined: Fri Feb 05, 2021 11:52 pm


Return to General Help

Who is online

Users browsing this forum: Google [Bot] and 36 guests