Does ZFS pick up where it left off on a drive if it was accidentally removed?

Status
Not open for further replies.

Kumba

Cadet
Joined
May 24, 2017
Messages
9
So I'm trying to familiarize myself with a few things on ZFS and how it operates. Suppose someone comes along and accidentally pops the latch on a drive tray and that drive disconnects from the backplane.

When the drive is re-inserted, will ZFS be able to pick the drive up and just start replicating from where it's last known good write was? Or does it just force a resilver everytime?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
"replicating". Are you saying the drive is in the middle of a zfs replication, and someone pops it?
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
IME, most of the time ZFS will quickly resilver just the missed transactions.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
See if you can put a front bezel on yoir server. Supermicro has them for some of their servers.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
IME, most of the time ZFS will quickly resilver just the missed transactions.
Yeah, the missing transactions will be added, as long as nothing weird is going on.
 

Kumba

Cadet
Joined
May 24, 2017
Messages
9
The scenario would be the array is humming along happily, midnight idiot IT warm-body keyboard and monitor swapper extraordinaire decides to go poking around in the server room and either bumps the latch or deliberately pulls it out cause he wants to see what's in it, a drive drops from the array.

I'm just wanting to make sure that once the drive is slid back in that ZFS finds it, picks it up automatically, and just rebuilds the parts of it that it lost since it's last good write/state.

And yes, I've already suggested they move this guy somewhere that he can't touch the servers, like another building, but they 'like him'... I never understood why people want to keep someone on for a job they are in no way shape or form qualified for.



But that does give me another idea. Say I wanted to swap a drive out due to age or smart errors or whatever. Can I take a drive and do a bit copy using dd from the old drive to the new drive in order to save I/O load and resilver time on the array?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I'm just wanting to make sure that once the drive is slid back in that ZFS finds it, picks it up automatically, and just rebuilds the parts of it that it lost since it's last good write/state.
"Automatically" might or might not happen--you might need to issue a zpool online command to make it happen.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
The scenario would be the array is humming along happily, midnight idiot IT warm-body keyboard and monitor swapper extraordinaire decides to go poking around in the server room and either bumps the latch or deliberately pulls it out cause he wants to see what's in it, a drive drops from the array.

I'm just wanting to make sure that once the drive is slid back in that ZFS finds it, picks it up automatically, and just rebuilds the parts of it that it lost since it's last good write/state.

In my experience, yes, except when it doesn't. Then you need to manually intervene.

And yes, I've already suggested they move this guy somewhere that he can't touch the servers, like another building, but they 'like him'... I never understood why people want to keep someone on for a job they are in no way shape or form qualified for.



But that does give me another idea. Say I wanted to swap a drive out due to age or smart errors or whatever. Can I take a drive and do a bit copy using dd from the old drive to the new drive in order to save I/O load and resilver time on the array?

I don't believe this ever works. If you have a spare bay the right way is to replace the drive without offlining it. This will silver the new drive and ONLY remove the old drive when finished, thus it's pretty safe.
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
I know dd has been suggested in the past when a failing drive is the only part that can get a pool back online. And people have suggested drive recovery services (of the one drive) in the same situation. I don't know any reason it wouldn't work. But somebody would have to test it.
 

tvsjr

Guru
Joined
Aug 29, 2015
Messages
959
The scenario would be the array is humming along happily, midnight idiot IT warm-body keyboard and monitor swapper extraordinaire decides to go poking around in the server room and either bumps the latch or deliberately pulls it out cause he wants to see what's in it, a drive drops from the array.
May I suggest the liberal application of a Taser to the aforementioned flunky?
 

Kumba

Cadet
Joined
May 24, 2017
Messages
9
The scenario would be the array is humming along happily, midnight idiot IT warm-body keyboard and monitor swapper extraordinaire decides to go poking around in the server room and either bumps the latch or deliberately pulls it out cause he wants to see what's in it, a drive drops from the array.

May I suggest the liberal application of a Taser to the aforementioned flunky?

I wish I was just exaggerating, but unfortunately I'm not. Whenever there is a problem and he's the only person there he immediately runs into the server room and starts randomly unplugging/plugging stuff in. He has rebooted the core network switches trying to get a network printer to work. He's also unplugged the PDU for the server rack more then once because he forgot what that plug went to. It's a LOCKING 208v/30a amp plug! You don't accidentally unplug those like you're going to plug in a phone charger. My personal favorite is where he doesn't understand the /22 netmask he has and repeatedly (ad nauseum) statically assigns things with a /24 netmask, or where he wants to know why the 192.168.2.X network won't talk to the 192.168.1.X network.....

But I digress. So, yeah, I've tried to get him relocated (or removed) multiple times but they like him. I guess competency is a secondary job characteristic. All a faceplate for the server would do is be taken off and laid in a corner. This guy would say he needs to 'see' the drives to know what's up. Yeah, cause logging into a web interface with actual details on what is going on is so cliche.
 

tvsjr

Guru
Joined
Aug 29, 2015
Messages
959
Faceplate... some copper tape... a neon transformer... some proper high-voltage wire... he'd only try to remove it once.
 
Status
Not open for further replies.
Top