ZFS Can't mount a disk

Code:
$ freebsd-version
14.3-RELEASE-p6

Trying to mount a WD 1TB SATA HDD plugged into my laptop via a USB adapter:

Code:
$ doas geom disk list
Geom name: ada0
Providers:
1. Name: ada0
   Mediasize: 250059350016 (233G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r2w2e3
   descr: Samsung SSD 840 EVO 250GB
   lunid: 50025388a01f4ede
   ident: S1DBNSBF164628J
   rotationrate: 0
   fwsectors: 63
   fwheads: 16

Geom name: da0
Providers:
1. Name: da0
   Mediasize: 1000204886016 (932G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   descr: WDC WD10 EARX-00PASB0
   ident: FDC0FD10EA00000FD0FCAFAF284309
   rotationrate: unknown
   fwsectors: 63
   fwheads: 255

Code:
$ gpart show -p /dev/da0
=>        40  1953525088    da0  GPT  (932G)
          40        2008         - free -  (1.0M)
        2048  1953523080  da0p1  freebsd-zfs  (932G)

Code:
$ gpart status /dev/da0
 Name  Status  Components
da0p1      OK  da0

Code:
$ doas geom part status /dev/da0
Password:
 Name  Status  Components
da0p1      OK  da0

Code:
$ doas mount /dev/da0p1 /mnt
Password:
mount: /dev/da0p1: No such file or directory

Can someone tell me where I am going/gone wrong?
I am new to ZFS and afraid of losing all the stuff on this drive.
Thanks
JimT
 
Thanks SirDice,

Code:
$ doas zpool import
Password:
   pool: data5
     id: 2355051634979972753
  state: ONLINE
status: The pool was last accessed by another system.
 action: The pool can be imported using its name or numeric identifier and
        the '-f' flag.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-EY
 config:

        data5        ONLINE
          gpt/data5  ONLINE

$ doas zpool import -f data5

So now it is in the mount list:

Code:
$ mount
---- snip ----
data5 on /data5 (zfs, local, nfsv4acls)

Code:
$ zpool status data5
  pool: data5
 state: ONLINE
config:

        NAME         STATE     READ WRITE CKSUM
        data5        ONLINE       0     0     0
          gpt/data5  ONLINE       0     0     0

errors: No known data errors



But I see no files on HDD? Is it empty, or is there something else I need to do?
(It's quite possible that I am dopey and all I have done is make a dir and not put anything in it)

Code:
[$ doas ls -al /data5/ebooks/
Password:
total 1
drwxrwxrwx  2 root wheel 2 Nov  6 21:04 .
drwxrwxrwx  3 root wheel 3 Nov  6 21:04 ..

Thanks again for the help ;-)
 
But I see no files on HDD? Is it empty, or is there something else I need to do?
There could be unmounted datasets on there. Then it would look empty. So have a look at a zfs list -r data5 output. That will tell you which, if any, datasets exist. Depending on the dataset, zfs mount data5/nameofdataset. But you should be careful with that and look at its mountpoint first, it may 'overlay' on an existing directory on the machine.

I had to umount with -f
Don't do an forced unmount willy-nilly. There's typically a reason why a 'regular' unmount refuses. And to properly 'release' the pool from the system you do the counterpart of a zpool-import(8); a zpool-export(8).
 
Back
Top