Rollback Extend Disk

SuperSavio

Dabbler
Joined
Jan 12, 2013
Messages
18
i everyone,
I have a problem with a Pool after extending with another HardDrive.

Nas Mini Server HP with 4 Slot for HDD, i mounted only 3HD.

one of this, Pool Media_4TB = HD WD RED 4TB, I have extended this with another same disk ( to have an 8TB pool ) and the operation finished successfully.

Today the Pool is in an UNKNOWN state and I only see the first disk . The new disk doesn't work, it's dead.

On the new disk I have not loaded anything, no files for this I do not worries, but i can't mount the old Disk and continue work with this.

I have try with ZFS MOUNT but i have this error "dataset does not exist"

How i can fix?
 

Attachments

  • Schermata 2022-02-07 alle 00.57.06.png
    Schermata 2022-02-07 alle 00.57.06.png
    80.1 KB · Views: 166
  • Schermata 2022-02-07 alle 00.56.22.png
    Schermata 2022-02-07 alle 00.56.22.png
    16.7 KB · Views: 174
  • Schermata 2022-02-07 alle 00.56.12.png
    Schermata 2022-02-07 alle 00.56.12.png
    42.6 KB · Views: 162

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
First of all...

dev/ada1 is not the same as /dev/ada1 (unless you first cd to /)

Second...

zfs mount has little to do with what you seem to need right now.

What would be helpful to see is the output from zpool status -v Media_4TB
 

SuperSavio

Dabbler
Joined
Jan 12, 2013
Messages
18
Hi sretalla,
if i use zsh mount / dev / ada1 i will received this output

cannot open '/ dev / ada1': leading slash in name

after searching on google, haved found a suggestion of a user that tell removed the first slash. i tried without / before folder dev with the result of the previous post.

This is output of zpool status -v Media_4TB and zpool status -v

Code:
root@freenas[~]# zpool status -v Media_4TB
cannot open 'Media_4TB': no such pool



root@freenas[~]# zpool status -v
  pool: Data
 state: ONLINE
  scan: scrub repaired 0 in 0 days 01:43:19 with 0 errors on Sun Feb  6 01:43:20 2022
config:

        NAME                                          STATE     READ WRITE CKSUM
        Data                                          ONLINE       0     0     0
          gptid/a7bd1b72-aa86-11eb-bdcc-a0b3cce3fb7a  ONLINE       0     0     0

errors: No known data errors

  pool: HD2
 state: ONLINE
  scan: scrub repaired 0 in 0 days 00:43:27 with 0 errors on Sun Jan  9 00:43:29 2022
config:

        NAME                                          STATE     READ WRITE CKSUM
        HD2                                           ONLINE       0     0     0
          gptid/61c91a70-6d40-11ea-b346-a0b3cce3fb7a  ONLINE       0     0     0

errors: No known data errors

  pool: freenas-boot
 state: ONLINE
  scan: scrub repaired 0 in 0 days 00:04:06 with 0 errors on Wed Feb  2 03:49:06 2022
config:
        NAME        STATE     READ WRITE CKSUM
        freenas-boot  ONLINE       0     0     0
          da0p2     ONLINE       0     0     0

errors: No known data errors


the system seems not to see :(
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
if i use zsh mount / dev / ada1 i will received this output
Maybe you meant zfs mount... in any case, I already said that command has little to do with solving your problem, so I won't address its correct use here.

the system seems not to see :(
If the pool is now missing, we should look at zpool import to se what might still be there...
 

SuperSavio

Dabbler
Joined
Jan 12, 2013
Messages
18
Maybe you meant zfs mount... in any case, I already said that command has little to do with solving your problem, so I won't address its correct use here.
yes, I was referring to zfs.

this is output of zpool import


Code:
root@freenas[~]# zpool import
   pool: Media_4TB
     id: 537171516661595357
  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: http://illumos.org/msg/ZFS-8000-3C
 config:

        Media_4TB                                     UNAVAIL  insufficient replicas
          gptid/3525b579-3c08-11eb-95a5-a0b3cce3fb7a  ONLINE
          13924785740365534829                        UNAVAIL  cannot open
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
if i use zsh mount / dev / ada1
@sretalla's already mentioned that neither this, nor anything like this, is a reasonable command to be using, but also be aware that the spaces you're adding are going to break things. / dev / ada1 is not the same thing at all as /dev/ada1.

But your more fundamental problem appears to be that you've put a server into production with no understanding of how ZFS works. As a result, you've made some decisions that are quite probably going to be fatal to your data. The first problem was setting up single-disk pools, which means that the failure of any one of those disks means the data on that disk will be lost. The second problem was extending one of those pools by adding another disk to it--now you've created a striped pool, meaning that failure of either one of those disks will result in loss of all data on the pool. The third problem is that (it appears, based on your statement that there are no files on the new disk, from which I infer that you just added it) you put a disk into production without doing any kind of burn-in testing on it.

Your bottom line is that if you can't get the newly-added disk online, your data on that pool (all of it, not just whatever would have been on the new disk) is gone.
 

SuperSavio

Dabbler
Joined
Jan 12, 2013
Messages
18
@sretalla's already mentioned that neither this, nor anything like this, is a reasonable command to be using, but also be aware that the spaces you're adding are going to break things. / dev / ada1 is not the same thing at all as /dev/ada1.
spaces have been added by copy and paste of the web console. As you can see in the screens of the first post, the command is without spaces. The first attempt was zsf mount /dev/ada1 getting the slash error, searching the web a user said to remove it. The second attempt was with zsf mount dev/ada1 getting the other error. But let's not talk about this anymore because we have ascertained that it is not useful for resolution.


Now i have connect the HD "died" from USB and the system see it. I read somewhere, I can't find the thread, a command to scan for devices and associate them with its pool.Can this help me get the pool online and try to recover the data?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
spaces have been added by copy and paste of the web console.
Yet another reason not to use the web console. Seriously, don't. Use SSH instead. With Windows 10, you don't even need to install anything, just run ssh user@host from PowerShell.

Can this help me get the pool online and try to recover the data?
If the disk is online, the pool should import. What's the output of zpool import?
 

SuperSavio

Dabbler
Joined
Jan 12, 2013
Messages
18
If the disk is online, the pool should import. What's the output of zpool import?
this

Code:
root@freenas[~]# zpool import
   pool: Media_4TB
     id: 537171516661595357
  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: http://illumos.org/msg/ZFS-8000-3C
 config:

    Media_4TB                                     UNAVAIL  insufficient replicas
      gptid/3525b579-3c08-11eb-95a5-a0b3cce3fb7a  ONLINE
      13924785740365534829                        UNAVAIL  cannot open



UPDATE:
From alert:

CRITICAL​

Device: /dev/da1 [SAT], 40 Currently unreadable (pending) sectors.​

Mon, 7 Feb 2022 03:02:36 PM (Europe/Rome)
 
Last edited:

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
If the disk is online, the pool should import.

As described in first post, the second disk doesn't appear to be online.

The new disk doesn't work, it's dead.

On the new disk I have not loaded anything, no files for this I do not worries, but i can't mount the old Disk and continue work with this.

ZFS does not allocate files to "disks". You added the disk to the pool. ZFS now expects to be able to find this vdev, and it isn't there. This is going to be a problem. You are not going to be able to import the pool as-is.

If you have truly not written anything since adding the new disk, it is possible that there may be a way to unwind a few transactions or "zpool remove", but my suspicion is that the pool is nicely burnt toast.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
There may be a possibility to import the pool with the -F switch (so zpool import -F Media_4TB) which may be able to discard the last few transactions (including the one which added the now-missing VDEV).
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
And ada1 was the original disk in that pool? That's bad news, but not the immediate issue. Edit: never mind; I was confusing ada1 with da1. So the question is, what is da1? If it's the new disk, that's at least part of your problem. Does the new disk show up in Storage -> Disks? If so, which pool does it say it belongs to?
1644244623188.png
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
As described in first post, the second disk doesn't appear to be online.
...but as described in the seventh post, "Now i have connect the HD "died" from USB and the system see it." But however the system sees it, it doesn't seem to see it as a member disk of the pool in question.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
My guess... da1 is likely the USB attached disk. ada1 is likely the SATA attached disk still in the pool.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
My guess... da1 is likely the USB attached disk.
That's my current guess too, but the show disks screen would tend to confirm--and would also indicate if the USB adapter was messing with it in some way (e.g., by masking a serial number).
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
You can see the show disk details for ada1 in the first post already. I guess the outstanding io is preventing da1 from showing up...
 

SuperSavio

Dabbler
Joined
Jan 12, 2013
Messages
18
Yes ada1 is the HDD that work.

HD that does not work I connected it via usb and now he sees it under da1 but only 1.64TB of 4TB
Schermata 2022-02-07 alle 16.48.59.png
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
HD that does not work I connected it via usb and now he sees it under da1 but only 1.64TB of 4TB
Yes, as expected, the USB bridge is messing with it--you can see it's also reporting an incorrect serial number. That kind of foolishness will mean that you won't be able to bring the pool online with the disk attached that way (or at least using that adapter). If you plug it back into a SATA port, will it show up now?
 
Top