offsite backup USB-drive: zpool export or zpool offline?

Status
Not open for further replies.

guermantes

Patron
Joined
Sep 27, 2017
Messages
213
Hi,
I have been following @Arwen's resource page on backing up to offsite USB-drives. Whenever I am finished and do zpool export thedrive the critical alert lights up red saying that the volume state is unknown. I have seen discussion on this and apparently it is alright to just click it away in this circumstance.
But would ZFS be more happy if I used zpool offline thedrive instead?
Code:
       zpool offline [-t] pool device ...

           Takes the specified physical device offline. While  the  device  is
           offline, no attempt is made to read or write to the device.

           This command is not applicable to spares.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Offline takes a single disk in a pool offline, but keeps the pool online--this will only work if the pool has sufficient redundancy to function with one disk missing. You'd use export--though better yet would be to detach the pool through the GUI.
 

guermantes

Patron
Joined
Sep 27, 2017
Messages
213
...though better yet would be to detach the pool through the GUI.
Oh?! That is was I was doing in the beginning, but since that also triggered the 'red alarm' I somehow came to think it was only appropriate for a disk that would be taken out and replaced with a new disk. And then I saw Arwen using export. I'll switch back to the button in the GUI, then.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Note, that's detach the pool, not the disk. Detaching the pool through the GUI exports the pool and should remove it from the configuration--so you shouldn't get an alert after you do that. Offlining a disk degrades the pool; you'll definitely get an alert that way.
 

guermantes

Patron
Joined
Sep 27, 2017
Messages
213
I could have sworn I was getting red alerts. The disk is currently scrubbing; I'll detach the volume in the morning and report back.
 

guermantes

Patron
Joined
Sep 27, 2017
Messages
213
I detached the volume (which is on da1) this morning using the "Detach Volume" button in the GUI (FN 11.0 U4). For about two hours the light remained green, but then suddenly I noticed a few minutes ago:
CRITICAL: Dec. 10, 2018, 10:32 a.m. - Device: /dev/da1 [SAT], unable to open device

This also happaned 30 minutes ago:
Code:
ugen0.5: <ASMedia USB3.0 External HDD> at usbus0 (disconnected)
umass1: at uhub0, port 18, addr 4 (disconnected)
da1 at umass-sim1 bus 1 scbus10 target 0 lun 0
da1: <WDC WD10 1KRYZ-01JPDB1 0> s/n 20170100001F detached
(da1:umass-sim1:1:0:0): Periph destroyed
umass1: detached


After detaching, the USB-enclosure remained connected and powered on. I powered it off long after detaching the volume, I would guess 30-40 minutes ago (though I was not checking the time). So maybe powering off is what throws this message?
 
Last edited:

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Do you have scheduled SMART tests on that disk?

My backup disks are not scheduled for SMART tests or scrubs. (The scrubs are part of the backup script as I use it.)

As for the messages about "Periph destroyed" and "umass1: detached", they are normal, if you only get them once at removal.
(I had a USB bug with Linux 10 years back that was SPAMing my "/var/log/messages" file about USB things. Computer worked
fine and eventually a kernel upgrade got rid of them.)
 

guermantes

Patron
Joined
Sep 27, 2017
Messages
213
Do you have scheduled SMART tests on that disk?

No, nothing scheduled. (Three times I did try a long smart test from the command line but it "aborted by host" all three times, and I presume this is due to the enclosure going to sleep or something. A short test finished fine.)
 
Joined
Jan 18, 2017
Messages
525
I detached the volume (which is on da1) this morning using the "Detach Volume" button in the GUI (FN 11.0 U4). For about two hours the light remained green, but then suddenly I noticed a few minutes ago:
CRITICAL: Dec. 10, 2018, 10:32 a.m. - Device: /dev/da1 [SAT], unable to open device

This also happaned 30 minutes ago:
Code:
ugen0.5: <ASMedia USB3.0 External HDD> at usbus0 (disconnected)
umass1: at uhub0, port 18, addr 4 (disconnected)
da1 at umass-sim1 bus 1 scbus10 target 0 lun 0
da1: <WDC WD10 1KRYZ-01JPDB1 0> s/n 20170100001F detached
(da1:umass-sim1:1:0:0): Periph destroyed
umass1: detached


After detaching, the USB-enclosure remained connected and powered on. I powered it off long after detaching the volume, I would guess 30-40 minutes ago (though I was not checking the time). So maybe powering off is what throws this message?

I use my spare hotswap bays to take a backup offsite and every time I disconnect the drives after detaching the pool one of the drive will through the critical alert. It is certainly the powering off that is causing it and has not been an issue for me. All scrubs, smart tests have been passing on my drives and data restored from them has been sound.
 
Status
Not open for further replies.
Top