Hello. I have recently created ZFS filesystem on the external USB drive and it works nice, but ...
I have always to become root and mount and unmount it manually, that's certainly inconvenient.
If I just plug the drive, the GNOME GUI notifies me: "Cannot mount volume".
A short investigation leaded me to the following sequence in the `/usr/lib/hal/hald' debug log:
hald_dbus.c:4171: OK for method 'Mount' with signature 'ssas' on interface 'org.freedesktop.Hal.Device.Volume' for UDI '/org/freedesktop/Hal/devices/pci_0_0/pci1458_5007_14/storage_14_if0_14/scsi_host0/disk16/sd16/s2' and execpath 'hal-storage-mount'
/usr/sbin/mount error 256, stdout='', stderr='cannot open '/dev/dsk/c17t0d0s2': invalid dataset name'
c17t0d0s2 here is just hot-plugged USB disk with zfs. The last error message is what happens if mount is invoked as [mount -F zfs /dev/dsk/c17t0d0s2 MNTPOINT]. And certainly, mounting zfs from disk slice can not succeed.
I can't go further because hald algorithm for zfs is not documented, and it's not clear why hald decides to mount zfs volume from disk slice instead of by dataset name.
Any thoughts?
Below are some gory details about my setup.
# cat /etc/release
Oracle Solaris 11.3 X86 ... Assembled 06 October 2015
The disk has 0xe8df8800 (3906963456) 512-byte sectors ~ 2Tb. Partitioned as:
# fdisk -W- c17t0d0p0 | tail -5
* Id Act Bhead Bsect Bcyl Ehead Esect Ecyl Rsect Numsect
191 0 0 9 0 254 63 1023 8 2604642296
11 0 254 63 1023 254 63 1023 2604642304 1302321152
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
zpool resides on the 1st ms-dos partition, w/o slicing:
# zpool history zbak
History for 'zbak':
2017-10-31.12:33:51 zpool create zbak c17t0d0p1
...
# zpool status -v zbak
pool: zbak
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
zbak ONLINE 0 0 0
c17t0d0p1 ONLINE 0 0 0
# zfs get mountpoint,canmount zbak
NAME PROPERTY VALUE SOURCE
zbak mountpoint legacy local
zbak canmount noauto local
/var/adm/message concerning the disk hot-plug:
Nov 1 22:25:24 jabba usba: [ID 912658 kern.notice] USB 3.0 device (usb1058,25e7) operating at super speed (USB 3.x) on USB 3.0 root hub: storage@14, scsa2usb14 at bus address 10
Nov 1 22:25:24 jabba usba: [ID 349649 kern.notice] Western Digital My Passport 25E7 5758393141423637564B5250
Nov 1 22:25:24 jabba genunix: [ID 936769 kern.notice] scsa2usb14 is /pci@0,0/pci1458,5007@14/storage@14
Nov 1 22:25:24 jabba genunix: [ID 408114 kern.notice] /pci@0,0/pci1458,5007@14/storage@14 (scsa2usb14) online
Nov 1 22:25:31 jabba scsi: [ID 583861 kern.notice] sd16 at scsa2usb14: target 0 lun 0
Nov 1 22:25:31 jabba genunix: [ID 936769 kern.notice] sd16 is /pci@0,0/pci1458,5007@14/storage@14/disk@0,0
Nov 1 22:25:31 jabba genunix: [ID 408114 kern.notice] /pci@0,0/pci1458,5007@14/storage@14/disk@0,0 (sd16) online
Best regards,
KA