{"action":"closed","issue":{"url":"https://api.github.com/repos/openzfsonosx/zfs/issues/575","repository_url":"https://api.github.com/repos/openzfsonosx/zfs","labels_url":"https://api.github.com/repos/openzfsonosx/zfs/issues/575/labels{/name}","comments_url":"https://api.github.com/repos/openzfsonosx/zfs/issues/575/comments","events_url":"https://api.github.com/repos/openzfsonosx/zfs/issues/575/events","html_url":"https://github.com/openzfsonosx/zfs/issues/575","id":230496783,"number":575,"title":"unablet to import veraencrypted vdev after varying /dev/diskXsY entrie","user":{"login":"tristan-k","id":732025,"avatar_url":"https://avatars2.githubusercontent.com/u/732025?v=3","gravatar_id":"","url":"https://api.github.com/users/tristan-k","html_url":"https://github.com/tristan-k","followers_url":"https://api.github.com/users/tristan-k/followers","following_url":"https://api.github.com/users/tristan-k/following{/other_user}","gists_url":"https://api.github.com/users/tristan-k/gists{/gist_id}","starred_url":"https://api.github.com/users/tristan-k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tristan-k/subscriptions","organizations_url":"https://api.github.com/users/tristan-k/orgs","repos_url":"https://api.github.com/users/tristan-k/repos","events_url":"https://api.github.com/users/tristan-k/events{/privacy}","received_events_url":"https://api.github.com/users/tristan-k/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-05-22T19:37:16Z","updated_at":"2017-05-23T07:52:44Z","closed_at":"2017-05-23T07:52:44Z","body":"I'm unable to import a veracrypt encrypted vdev after the /dev/diskXsY entrie changed. Probaly related to the way [veracrypt](https://github.com/veracrypt/VeraCrypt) or [InvariantDisks](https://github.com/cbreak-black/InvariantDisks) handles disk images.\r\n\r\n```\r\n$ diskutil list | grep disk1\r\n/dev/disk1 (external, physical):\r\n   #:                       TYPE NAME                    SIZE       IDENTIFIER\r\n   0:      GUID_partition_scheme                        *4.0 TB     disk1\r\n   1:                        EFI EFI                     209.7 MB   disk1s1\r\n   2:       Microsoft Basic Data                         4.0 TB     disk1s2\r\n\r\n$ ls -la /private/var/run/disk/by-id/ | grep disk1\r\nlrwxr-xr-x   1 root  daemon    11 22 Mai 10:22 media-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX -> /dev/disk10\r\nlrwxr-xr-x   1 root  daemon    12 22 Mai 10:22 media-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX -> /dev/disk1s2\r\nlrwxr-xr-x   1 root  daemon    12 22 Mai 10:22 media-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX -> /dev/disk1s1\r\n\r\n$ veracrypt -t --filesystem=none -k \"\" --protect-hidden=no /private/var/run/disk/by-id/media-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\r\n\r\n$ $ diskutil list | grep disk11\r\n/dev/disk11 (disk image):\r\n   #:                       TYPE NAME                    SIZE       IDENTIFIER\r\n   0:                            ZFS_DISK        +4.0 TB     disk11\r\n\r\n$ ls -la /private/var/run/disk/by-image-path\r\nlrwxr-xr-x  1 root  daemon   11 22 Mai 17:06 -tmp-.veracrypt_aux_mnt1-volume.dmg -> /dev/disk11\r\n\r\n$ zpool status ZFS_DISK\r\n  pool: ZFS_DISK\r\n state: DEGRADED\r\nstatus: One or more devices could not be used because the label is missing or\r\n\tinvalid.  Sufficient replicas exist for the pool to continue\r\n\tfunctioning in a degraded state.\r\naction: Replace the device using 'zpool replace'.\r\n   see: http://zfsonlinux.org/msg/ZFS-8000-4J\r\n  scan: resilvered 3,05T in 22h28m with 0 errors on Sat May 20 14:22:49 2017\r\nconfig:\r\n\r\n\tNAME                                            STATE     READ WRITE CKSUM\r\n\tZFS_DISK                                 DEGRADED     0     0     0\r\n\t  mirror-0                                      DEGRADED     0     0     0\r\n\t    media-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX  ONLINE       0     0     0\r\n\t    media-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX  ONLINE       0     0     0\r\n\t    12345678901011121415                        FAULTED      0     0     0  was /dev/disk10\r\n\tcache\r\n\t  media-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX    ONLINE       0     0     0\r\n\r\nerrors: No known data errors\r\n\r\n$ sudo zpool export ZFS_DISK\r\n\r\n$ sudo zpool import -d /private/var/run/disk/by-image-path/-tmp-.veracrypt_aux_mnt1-volume.dmg ZFS_DISK\r\ncannot open '/dev/disk11/': Not a directory\r\ncannot import 'ZFS_ST4000DM000': no such pool available\"\r\n\r\n$ sudo zdb -h ZFS_DISK\r\n\r\nHistory:\r\n2017-05-07.19:20:28 zpool create -f -o ashift=12 -O compression=lz4 -O casesensitivity=insensitive -O atime=off -O normalization=formD ZFS_DISK disk4\r\n2017-05-07.19:21:34 zpool export ZFS_DISK\r\n2017-05-07.20:42:41 zpool import ZFS_DISK\r\n2017-05-08.11:09:58 zfs receive -u -v -F -d ZFS_DISK\r\n2017-05-08.12:38:46 zfs rollback -r -R -f ZFS_DISK@BACKUP\r\n2017-05-08.12:41:25 zfs set mountpoint=/Volumes/ZFS_DISK ZFS_DISK\r\n2017-05-08.13:03:17 zpool export ZFS_DISK\r\n2017-05-08.13:06:22 zpool import ZFS_DISK\r\n2017-05-08.15:55:27 zpool import -a -d /var/run/disk/by-id\r\n2017-05-08.17:28:20 zpool import -a -d /var/run/disk/by-id\r\n2017-05-08.18:21:30 zpool attach -f ZFS_DISK media-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX disk5\r\n2017-05-08.18:25:53 zpool import -a -d /var/run/disk/by-id\r\n2017-05-08.18:28:24 zpool detach ZFS_DISK 15796782700546261274\r\n2017-05-08.18:31:38 zpool attach -f ZFS_DISK media-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX disk4\r\n2017-05-08.18:33:49 zpool import -a -d /var/run/disk/by-id\r\n2017-05-08.18:56:16 zpool detach ZFS_DISK 16171819202122232425\r\n2017-05-08.19:11:09 zpool attach ZFS_DISK media-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX /private/var/run/disk/by-id/volume-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\r\n2017-05-12.12:10:14 zpool scrub ZFS_DISK\r\n2017-05-15.19:02:54 zpool add ZFS_DISK cache /private/var/run/disk/by-id/media-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\r\n2017-05-19.15:54:44 zpool attach ZFS_DISK media-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX disk10\r\n2017-05-22.10:22:36 zpool import -a -d /var/run/disk/by-id\r\n``` "}}
{"actor":{"display_login":"tristan-k"}}