Cant offline a drive ine EEL. It errors out when I try

When I try and offline a drive EEL is throwing an error:
[EZFS_NOREPLICAS] cannot offline /dev/sde2: no valid replicas

There was a huge debut spit out.
Since it was all just noise, I edited out the noise for content.

That’s concerning.

You don’t need to provide any more information. It would be nice if you did, though.

Here is the drive info

name serial size pool model
sde bigstring 931 GiB Drive4 PERC_6_i

drive shows to be perfectly healthy

Maybe provide the pool information and the vdev layout?

Possibly other hardware info, such as if you’re using an HBA?

I’m just shooting in the wind here.

Thanks. Here is the info…

vdev
sde ONLINE 931 GiB No errors

pool
Pool Status: Online
Total ZFS Errors: 0
Scheduled Scrub Task: Set
Auto TRIM: Off

Last Scan:
Finished Scrub on 2024-11-17 00:09:09
Last Scan Errors: 0
Last Scan Duration: 9 minutes 7 seconds

Drive is attached to a Dell PERC 6/i controller in non raid mode

You’re trying to offline a drive… from a vdev that only has a single drive?

Why?

Good catch, @davistw - since it is a single disk, ZFS is freaking out that you want to offline it since there is no redundancy for that Pool if you that specific disk offline. Are you sure you don’t want to ‘Export’ the pool that contains the single disk instead?

1 Like

The drive has data on it that I want to remove and store in a safe. I want to be able to reinstall at a later date to get to the data without any access issues. I thought about export but the gui talks about delete data and delete configuration and that made me a little skittish. This is important data. All I want to do is remove the drive where I can at a later date stick it back in. I thought taking it offline then putting it online but I may be wrong.

Then you should use the Export option.
Just DON’T check the box that destroys the contents of the drive.

If the data is actually important, you should have at least one, ideally more, backups. A drive can fail at any time for a multitude of reasons, even disconnected on a shelf.

2 Likes

It is odd that TrueNAS would combine “destroy” with their “export” option. I think they should be on different menus.

4 Likes

I do create backups online but wanted a offline copy in a different local in case of something like fire etc. (Better safe than sorry).

So if I export the single drive pool that is all that exists on the drive in question does this allow me to remove the drive physically and lock it away for safe keeping? Then at a later date if need be can I reconnect the drive and simply import the pool with no change in data or data access? Sorry to be so concerned but…

1 Like

Yes.

Sure, if the drive survived you handling it and whatever cold storage you put it in.

1 Like

If it helps, think of “exporting” a ZFS pool in the same way you would “safely remove” or “safely eject” an external USB drive from Windows.

While you may physically remove the drives of a ZFS pool before cleanly exporting the pool, it’s still recommended to always export before doing so.

2 Likes

Thanks. I ran a test and exported the drive unplugged it then plugged it back in.

It showed up as a “Disk with exported pool”. I clicked the “Add to pool” and it gives me an option of New Pool or Existing Pool. If I click Existing Pool it wants me to add it to an already existing pool. If I click New Pool it wants me to name it and has a warning The following disks have exported pools on them. “Using those disks will make existing pools on them unable to be imported. You will lose any and all data in selected disks.” How do I get the drive reinserted in exactly the same mode as it was before I exported, removed and re-inserted it?

Thanks for all the support and sorry to be a worrier, wigging, and confused but don’t want to loose this data…

Don’t add to a pool or create a new pool. Import an existing pool.

1 Like

Gotcha I missed that option… Worked like a champ.

Thanks for helping me. This group is a wealth of knowledge.
The problem was I was trying to use the Offline drive. This option is designed to remove a drive from a Raid pool it seems. When I tried it blew up and I thought it was a bug in Truenas. It would have been helpful if Truenas would have simply say that but I digress.

With all the help of the group (especilly winnielinnie) what I ended up doing was

  1. Export the pool that was the only thing on the drive
  2. Remove the drive
  3. Reinsert the drive
  4. Import the pool
    Simple huh… I was wrapping my head up with all the other options when the real solution was staring me in the face. My fear of clicking the wrong button was making me wigg out… Thanks to the people that supported me in this task.
1 Like

“Offline” is ZFS terminology to disconnect a drive from its vdev. The purpose is to replace it.

“Export” and “import” are also standard ZFS terminology. And the pair matches up quite well, don’t you think?

Just do NOT tick the “delete” checkbox when exporting.

2 Likes

Thanks. i understand this now and the solution was to simply export the single pool on the drive then import the pool. One thing that this exercise did was give me an understanding on offline vs export.

Actually, that’s detach. But I guess it can depend on terminology and perspective.

Offline, prevents reads/writes to the disk, but it’s still attached to the VDev and can be onlined again.

This is a good thing to do before physically hot swapping a disk, and is not necessarily necessary before replacing

1 Like