# Trouble with mounting zfs-vol: No such file or directory



## PMc (Apr 24, 2021)

```
# zfs clone build/base.pole@Cur build/tmp.0.1720
# mount -t ufs /dev/zvol/build/tmp.0.1720p3 /build/test/mnt/tmp.1.1720
mount: /dev/zvol/build/tmp.0.1720p3: No such file or directory
#
#
# gpart show /dev/zvol/build/base.pole@Cur
=>      40  41942960  zvol/build/base.pole@Cur  GPT  (20G)
        40       472                         1  freebsd-boot  (236K)
       512   6291456                         2  freebsd-swap  (3.0G)
   6291968  35651032                         3  freebsd-ufs  (17G)
# fsck /dev/zvol/build/base.pole@Curp3
** /dev/zvol/build/base.pole@Curp3 (NO WRITE)
** Last Mounted on /build/test/mnt/tmp.5.92532
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
30075 files, 258516 used, 4056942 free (294 frags, 507081 blocks, 0.0% fragmentation)
#
```

Eh, what??
This doesn't happen always, only about every third invocation.
I'm clueless...

FreeBSD  12.2-RELEASE-p6 FreeBSD 12.2-RELEASE-p6 c6ec66c1c25(HEAD)[c6ec66c1c25(81526c74d9c+16)] D6R12V1  amd64


----------



## PMc (Apr 24, 2021)

It gets more clear:

```
# zfs clone build/base.pole@Cur build/tmp.0.3790
# mount -t ufs /dev/zvol/build/tmp.0.3790p3 /build/test/mnt/tmp.1.3790
mount: /dev/zvol/build/tmp.0.3790p3: No such file or directory
# zfs destroy build/tmp.0.3790
cannot destroy 'build/tmp.0.3790': dataset is busy
# 
# # doing it manually works:
# zfs destroy build/tmp.0.3790
#
```

It seems that geom populates the device nodes asyncronously, after zfs has already returned.


----------

