Trying to mount the correct pool located on the external disk "formatted" with ZFS... reddit / freebsd ---------------------------------------------------------------------- loziomario · 2022-11-19 22:39 Hello to everyone. I would like to get some help to mount the zfs pool located on the zvol located on the disk **/dev/da1p4** : ​ => 40 1953525095 da1 GPT (932G) 40 532480 1 efi (260M) 532520 1024 2 freebsd-boot (512K) 533544 984 - free - (492K) 534528 4194304 3 freebsd-swap (2.0G) 4728832 1948794880 4 freebsd-zfs (929G) 1953523712 1423 - free - (712K) # zfs get mountpoint,canmount zroot2 NAME    PROPERTY    VALUE       SOURCE zroot2  mountpoint /zroot2     local zroot2  canmount    on          default # zfs list NAME USED AVAIL REFER MOUNTPOINT zroot2                                         588G   311G      588G  /zroot2 zroot2/ROOT                                    296K   311G       96K  none zroot2/ROOT/default                            200K   311G      200K  / zroot2/tmp                                      96K   311G       96K  /tmp zroot2/usr                                     384K   311G       96K  /usr zroot2/usr/home                                 96K   311G       96K  /usr/home zroot2/usr/ports                                96K   311G       96K  /usr/ports zroot2/usr/src                                  96K   311G       96K  /usr/src zroot2/var                                     684K   311G       96K  /var zroot2/var/audit                                96K   311G       96K  /var/audit zroot2/var/crash                                96K   311G       96K  /var/crash zroot2/var/log                                 188K   311G      188K  /var/log zroot2/var/mail                                 96K   311G       96K  /var/mail zroot2/var/tmp # zpool import -fR /mnt/freebsd-zfs zroot2 cannot import 'zroot2': a pool with that name already exists use the form 'zpool import ' to give it a new name # zpool import -fR /mnt/freebsd-zfs zroot2/zroot2 cannot import 'zroot2/zroot2': no such pool available cd /mnt/freebsd-zfs empty. what's the correct pool ? ---------------------------------------------------------------------- timvandijknl · 2022-11-19 23:57 you already have a `/zroot2`, so you cannot import the zfs pool under that name. you can fix it by renaming your current pool, so that there is no duplicate. Disconnect the HDD you want to import... then zpool export zroot2 zpool import zroot2 zrootcurrent verify with `zpool status -v` that the current pool has been renamed to zrootcurrent then attach the HDD again and you can zpool import zroot2 ---------------------------------------------------------------------- loziomario · 2022-11-21 22:29 > zpool export zroot2 I have disconnected the HDD that I wanted to import (the one with the zroot2 pool inside) and then I did : zpool export zroot2 cannot open 'zroot2': no such pool zfs list NAME USED AVAIL REFER MOUNTPOINT zroot 402G 43.7G 96K /zroot zroot/ROOT 389G 43.7G 96K none zroot/ROOT/13.1-RELEASE-p2_2022-11-11_174736 8K 43.7G 321G / zroot/ROOT/13.1-RELEASE-p3_2022-11-17_193042 8K 43.7G 343G / zroot/ROOT/13.1-RELEASE_2022-09-01_041825 8K 43.7G 308G / zroot/ROOT/31-03-2022-a 512K 43.7G 43.4G / zroot/ROOT/31-03-2022-b 389G 43.7G 344G / zroot/tmp 15.1M 43.7G 15.1M /tmp zroot/usr 11.2G 43.7G 96K /usr zroot/usr/home 192K 43.7G 192K /usr/home zroot/usr/ports 11.2G 43.7G 11.2G /usr/ports zroot/usr/src- 96K 43.7G 96K /usr/src- zroot/var 1.26G 43.7G 96K /var zroot/var/audit 96K 43.7G 96K /var/audit zroot/var/crash 1.11G 43.7G 1.11G /var/crash zroot/var/log 3.78M 43.7G 3.78M /var/log zroot/var/mail 130M 43.7G 130M /var/mail zroot/var/tmp 18.1M 43.7G 18.1M /var/tmp as you can see the zroot2 disk is not there anymore and the zroot disk is the disk that I'm using on the host os,so its not the disk I need. ---------------------------------------------------------------------- timvandijknl · 2022-11-21 22:49 Interesting... then why did it say zroot2 was a duplicate ? What if you connect the HDD and simple try to import it with `zpool import zroot2` ? ---------------------------------------------------------------------- loziomario · 2022-11-21 23:28 > zpool import zroot2 reattached the disk with the zroot2 inside : zpool import zroot2 cannot import 'zroot2': a pool with that name already exists ---------------------------------------------------------------------- timvandijknl · 2022-11-21 23:48 and if you try... uh... `zpool import zroot2 zroot3` ? Try to import it under a new name ? Also, what does `zpool status` say ? ---------------------------------------------------------------------- loziomario · 2022-11-21 23:54 zpool import zroot2 zroot3 cannot import 'zroot2': no such pool available ---------------------------------------------------------------------- loziomario · 2022-11-21 23:55 https://paste.ubuntu.com/p/d4kwgKgJpM/ ---------------------------------------------------------------------- timvandijknl · 2022-11-21 23:59 You already imported zroot2 pool: zroot2 state: ONLINE config: NAME STATE READ WRITE CKSUM zroot2 ONLINE 0 0 0 da1p4 ONLINE 0 0 0 `zfs list zroot2` should show where it's mounted, if it is. ---------------------------------------------------------------------- loziomario · 2022-11-22 00:25 zfs list zroot2 NAME USED AVAIL REFER MOUNTPOINT zroot2 343G 557G 343G /zroot2 ---------------------------------------------------------------------- loziomario · 2022-11-22 00:30 I found the files. They are on /zroot2...this is not the folder where I would find them....usually the mount point where I expect them is on /mnt/freebsd-zfs. Why this time the mount point is different ? How can I change the mount point from /zroot2 to /mnt/freebsd-zfs ? ---------------------------------------------------------------------- grahamperrin · 2022-11-22 08:25 > … usually the mount point where I expect them is on `/mnt/freebsd- zfs`. … Why was that path expected, in your case? > … How can I change the mount point zfs-set(8) * * ---------------------------------------------------------------------- grahamperrin · 2022-11-22 08:53 Please note, from [hier\(7\)](https://www.freebsd.org/cgi/man.cgi?quer y=hier&sektion=7&manpath=FreeBSD): /media/ contains subdirectories to be used as mount points for removable media such as CDs, USB drives, and floppy disks