ZFS zroot : UNAVAIL insufficient replicas...

Hello to everyone.

Unfortunately a pool cannot be imported due to damaged devices or data. I would like to have some help from you to fix it. Very very thanks.

Code:
[marietto@marietto ~]$ # zpool import -f -R /mnt/nomadbsd_zroot
 
   pool: zroot
id: 3547020836659149114
state: UNAVAIL
status: One or more devices contains corrupted data.
action: The pool cannot be imported due to damaged devices or data.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-5E
config:

zroot       UNAVAIL  insufficient replicas
da3       UNAVAIL  invalid label
 
As far as i know this means you lost all the data in non-recoverable way unless you have a mirror/raid/backup of all the data.
 
nope. The correct disk is da2 :

Code:
=>        40  1953525095  da2  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)
 
Code:
# zpool list -v

NAME        SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
zroot       460G   404G  56.4G        -         -    40%    87%  1.00x    ONLINE  -
ada0p4    460G   404G  56.4G        -         -    40%  87.7%      -    ONLINE
zroot2      928G   346G   582G        -         -     4%    37%  1.00x    ONLINE  -
da2p4     928G   346G   582G        -         -     4%  37.2%      -    ONLINE

# zpool status -v
  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

pool: zroot2
state: ONLINE
config:

NAME        STATE     READ WRITE CKSUM
zroot2      ONLINE       0     0     0
da2p4     ONLINE       0     0     0

errors: No known data errors

# zpool status -x
all pools are healthy
 
Note : the name of the zpool on the file /mnt/nomadbsd_zroot cannot be zroot or zroot2 because those are already imported.
If that is however the case you need to rename or export the conflicting zpool.
 
The disk ada0 is also formatted with ZFS and the pool inside it is called "zroot". On the disk da3 the pool is called "nomadbsd_zroot". The pool on the disk da2 is called "zroot2". There aren't duplicated names.
 
An idea
Something you can try is analyse more the /mnt/nomadbsd_zroot.
Something you can try is :
Code:
mdconfig -u md10 -a -t vnode -f /mnt/nomadbsd_zroot
This gives you a device /dev/md10

On this /dev/md10 you can try to run zpool/zfs commands to see more info.
Code:
zpool list -v /dev/md10
zpool status -v /dev/md10
zpool status -x /dev/md10
zfs list -v /dev/md10
zdb /dev/md10

To unmount the disk
Code:
mdconfig -du md10
 
Code:
# mdconfig -u md10 -a -t vnode -f /mnt/nomadbsd_zroot

mdconfig: /mnt/nomadbsd_zroot is not a regular file

 
# ls /mnt/nomadbsd_zroot/
home    usr     var
 
It says that "nomadbsd_zroot" pool is damaged,but it does not seem. Anyway,it is not well mounted. Inside the folder /mnt/nomadbsd_zroot I don't see all the files.
 
Code:
# zpool import -f -R /mnt/nomadbsd_zroot nomadbsd_zroot
# cd /mnt/nomadbsd_zroot

marietto@marietto:/mnt/nomadbsd_zroot # ls

home            nomadbsd_zroot  usr             var

not all files have been mounted here.


# cd /mnt/nomadbsd_zroot/nomadbsd_zroot/
# ls
nothing

I don't understand. it mounted the zpool "nomadbsd_zroot" inside the folder /mnt/nomadbsd_zroot/nomadbsd_zoot ; but I don't want that it do that. I want that it mounts all the files inside the folder /mnt/nomadbsd_zroot
 
can you explain to me how to rename the conflicting zpool ? I tried like below,but it didn't work :

Code:
# zpool import nomadbsd_zroot nomadbsd-zroot

# zpool list

NAME             SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT

nomadbsd-zroot   203G  4.45G   199G        -         -     0%     2%  1.00x    ONLINE  -
zroot            460G   404G  56.4G        -         -    41%    87%  1.00x    ONLINE  -
zroot2           928G   346G   582G

# zpool import -R /mnt/nomadbsd-zroot

   pool: zroot
     id: 3547020836659149114
  state: UNAVAIL
status: One or more devices are missing from the system.
 action: The pool cannot be imported. Attach the missing
        devices and try again.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-3C
 config:

        zroot       UNAVAIL  insufficient replicas
          da3       UNAVAIL  cannot open

# zfs list -d3 nomadbsd-zroot

NAME                                                    USED  AVAIL     REFER  MOUNTPOINT
nomadbsd-zroot                                         4.45G   192G       96K  /nomadbsd-zroot
nomadbsd-zroot/ROOT                                    3.67G   192G       96K  none
nomadbsd-zroot/ROOT/13.1-RELEASE-p4_2022-11-26_234225     8K   192G     2.41G  /
nomadbsd-zroot/ROOT/default                            3.67G   192G     3.62G  /
nomadbsd-zroot/home                                    29.0M   192G     29.0M  /home
nomadbsd-zroot/usr                                      768M   192G       96K  /usr
nomadbsd-zroot/usr/obj                                   96K   192G       96K  /usr/obj
nomadbsd-zroot/usr/ports                                768M   192G      767M  /usr/ports
nomadbsd-zroot/usr/ports/distfiles                       96K   192G       96K  /usr/ports/distfiles
nomadbsd-zroot/usr/ports/packages                        96K   192G       96K  /usr/ports/packages
nomadbsd-zroot/usr/src                                   96K   192G       96K  /usr/src
nomadbsd-zroot/var                                      408K   192G       96K  /var
nomadbsd-zroot/var/audit                                 96K   192G       96K  /var/audit
nomadbsd-zroot/var/crash                                 96K   192G       96K  /var/crash
nomadbsd-zroot/var/mail                                 120K   192G      120K  /var/mail
 
maybe something like this ?

Code:
zfs rename nomadbsd-zroot/zroot nomadbsd-zroot/zroot-nomadbsd
cannot open 'nomadbsd-zroot/zroot': dataset does not exist
 
can someone help me here ? I think that I should rename the dataset called zroot because it is a duplicated name,but I can't do it because I can't import the zpool called nomadbsd-zroot since it has a dataname with a name that already exists. What's the solution here ?
 
zpool-import(8):
Code:
     zpool import [-Dflmt] [-F [-nTX]] [-c cachefile|-d	dir|device] [-o
	     mntopts] [-o property=value]a| [-R	root] [-s] pool|id [newpool]
	     Imports a specific	pool.  A pool can be identified	by its name or
	     the numeric identifier.  If newpool is specified, the pool	is im-
	     ported using the name newpool.  Otherwise,	it is imported with
	     the same name as its exported name.
 
Code:
# zpool import -f -R /mnt/nomadbsd-zroot nomadbsd-zroot
no errors
# ls /mnt/nomadbsd-zroot/nomadbsd-zroot/
empty
 
You've already imported it? Under the original name? You will have to export it again. And judging by the errors you were having that pool looks like a goner.
 
Code:
# zpool import -f -R /mnt/nomadbsd-zroot nomadbsd-zroot

# zfs list -r nomadbsd-zroot


NAME                                                    USED  AVAIL     REFER  MOUNTPOINT
nomadbsd-zroot                                         4.45G   192G       96K  /mnt/nomadbsd-zroot/nomadbsd-zroot
nomadbsd-zroot/ROOT                                    3.67G   192G       96K  none
nomadbsd-zroot/ROOT/13.1-RELEASE-p4_2022-11-26_234225     8K   192G     2.41G  /mnt/nomadbsd-zroot
nomadbsd-zroot/ROOT/default                            3.67G   192G     3.62G  /mnt/nomadbsd-zroot
nomadbsd-zroot/home                                    29.0M   192G     29.0M  /mnt/nomadbsd-zroot/home
nomadbsd-zroot/usr                                      768M   192G       96K  /mnt/nomadbsd-zroot/usr
nomadbsd-zroot/usr/obj                                   96K   192G       96K  /mnt/nomadbsd-zroot/usr/obj
nomadbsd-zroot/usr/ports                                768M   192G      767M  /mnt/nomadbsd-zroot/usr/ports
nomadbsd-zroot/usr/ports/distfiles                       96K   192G       96K  /mnt/nomadbsd-zroot/usr/ports/distfiles
nomadbsd-zroot/usr/ports/packages                        96K   192G       96K  /mnt/nomadbsd-zroot/usr/ports/packages
nomadbsd-zroot/usr/src                                   96K   192G       96K  /mnt/nomadbsd-zroot/usr/src
nomadbsd-zroot/var                                      408K   192G       96K  /mnt/nomadbsd-zroot/var
nomadbsd-zroot/var/audit                                 96K   192G       96K  /mnt/nomadbsd-zroot/var/audit
nomadbsd-zroot/var/crash                                 96K   192G       96K  /mnt/nomadbsd-zroot/var/crash
nomadbsd-zroot/var/mail                                 120K   192G      120K  /mnt/nomadbsd-zroot/var/mail
 
where the files have been mounted ?

# ls /mnt/nomadbsd-zroot/nomadbsd-zroot/
Empty.

# ls /mnt/nomadbsd-zroot/

I can see only some folders of nomadbsd,but most of them are empty.
 
Back
Top