Solved Sorry,I need again some help with ZFS : cannot mount 'zroot': filesystem already mounted

Hello to everyone.

I've installed FreeBSD 13.1-RELEASE on a ZFS partition style on my ada0 disk. It is like this :

Code:
=>       40  976773088  ada0  GPT  (466G)
         40     532480     1  efi  (260M)
     532520       1024     2  freebsd-boot  (512K)
     533544        984        - free -  (492K)
     534528    4194304     3  freebsd-swap  (2.0G)
    4728832  972044288     4  freebsd-zfs  (464G)
  976773120          8        - free -  (4.0K)


Now,I would like to mount the partition /dev/ada0p4 from FreeBSD because I need to modify a wrong entry that I have added to the /etc/fstab file on the /dev/ada0p4 partition (while now I'm using the FreeBSD system that I have installed on a UFS2 disk located at /dev/ada2) . This is what I did but I'm not able to import the zroot pool even if it says that the filesystem is already mounted,but I don't know where it is :


Code:
mario@marietto:/home/marietto # zpool import -a
no pools available to import

mario@marietto:/home/marietto # zpool import
No pools available to import

mario@marietto:/home/marietto # zpool list
NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
zroot   460G   239G   221G        -         -    14%    51%  1.00x    ONLINE  -

mario@marietto:/home/marietto # zpool status

  pool: zroot
 state: ONLINE
config:
        NAME        STATE     READ WRITE CKSUM
        zroot       ONLINE       0     0     0
        ada0p4      ONLINE       0     0     0

errors: No known data errors

mario@marietto:/home/marietto # zpool import -D -f zroot
cannot import 'zroot': a pool with that name already exists
use the form 'zpool import <pool | id> <newpool>' to give it a new name

mario@marietto:/home/marietto # zfs set mountpoint=/mnt/freebsd-zfs zroot
cannot unmount '/zroot': pool or dataset is busy

mario@marietto:/home/marietto # zfs mount
zroot/var/tmp                   /var/tmp
zroot/tmp                       /tmp
zroot/var/crash                 /var/crash
zroot/var/audit                 /var/audit
zroot/var/mail                  /var/mail
zroot/var/log                   /var/log
zroot/usr/ports                 /usr/ports
zroot/usr/home                  /usr/home
zroot                           /zroot
zroot/usr/src                   /usr/src

mario@marietto:/home/marietto # zpool import -fR /mnt/freebsd-zfs zroot
cannot import 'zroot': a pool with that name already exists
use the form 'zpool import <pool | id> <newpool>' to give it a new name

mario@marietto:/home/marietto # zfs get canmount,mountpoint zroot

NAME   PROPERTY    VALUE       SOURCE
zroot  mountpoint  /zroot      local
zroot  canmount    on          default

mario@marietto:/home/marietto # zfs list

NAME                      USED  AVAIL     REFER  MOUNTPOINT
zroot                     239G   207G       96K  /zroot
zroot/ROOT                226G   207G       96K  none
zroot/ROOT/31-03-2022-a   512K   207G     43.4G  /
zroot/ROOT/31-03-2022-b   226G   207G      199G  /
zroot/tmp                70.4M   207G     70.4M  /tmp
zroot/usr                11.5G   207G       96K  /usr
zroot/usr/home            192K   207G      192K  /usr/home
zroot/usr/ports          8.18G   207G     8.18G  /usr/ports
zroot/usr/src            3.27G   207G     3.27G  /usr/src
zroot/var                1.14G   207G       96K  /var
zroot/var/audit            96K   207G       96K  /var/audit
zroot/var/crash          1.11G   207G     1.11G  /var/crash
zroot/var/log            2.74M   207G     2.74M  /var/log
zroot/var/mail           5.96M   207G     5.96M  /var/mail
zroot/var/tmp            18.1M   207G     18.1M  /var/tmp

mario@marietto:/home/marietto # zfs mount zroot
cannot mount 'zroot': filesystem already mounted

It says that it is already mounted,but I don't know where.
 
Last edited:
Solution :

Code:
mkdir -p /mnt/freebsd-zfs

zfs mount -a

mount -t zfs -fw zroot/ROOT/31-03-2022-b /mnt/freebsd-zfs
 
Back
Top