Growing existing vdev and no spare SATA ports - can I use external USB dock to resilver new disks?

Status
Not open for further replies.

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778

Martin Maisey

Dabbler
Joined
May 22, 2017
Messages
34
If not from the GUI, then certainly from the command-line. See https://www.freebsd.org/cgi/man.cgi?zpool(8)

Ah, would the relevant command be 'zpool clear'? In which case sorry, I should have RTFM'd...

Code:
zpool clear [-F [-n]] pool	[device]

	 Clears	device errors in a pool. If no arguments are specified,	all
	 device	errors within the pool are cleared. If one or more devices is
	 specified, only those errors associated with the specified device or
	 devices are cleared.

	 -F	 Initiates recovery mode for an	unopenable pool. Attempts to
		 discard the last few transactions in the pool to return it to
		 an openable state. Not	all damaged pools can be recovered by
		 using this option. If successful, the data from the discarded
		 transactions is irretrievably lost.

	 -n	 Used in combination with the -F flag. Check whether discard-
		 ing transactions would	make the pool openable,	but do not
		 actually discard any transactions.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
The -m I quoted is an option you can give to the zpool import command. Most likely you would have to import, because if the SLOG is missing the pool won't import automatically. Not sure what the exact scenario would be if an SLOG fails on a live pool.
 

Martin Maisey

Dabbler
Joined
May 22, 2017
Messages
34
The -m I quoted is an option you can give to the zpool import command. Most likely you would have to import, because if the SLOG is missing the pool won't import automatically. Not sure what the exact scenario would be if an SLOG fails on a live pool.

Sorry Robert, I somehow went straight to the zfs man page without seeing the quote below. Then read the wrong bit. D'oh. Thanks for setting me straight!
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
...
Not sure what the exact scenario would be if an SLOG fails on a live pool.
If I remember correctly, a failure of a single, un-mirrored SLOG device while a pool is live, (meaning no crashes), simply repoints the synchronous writes to the pool allocated ZIL. The SLOG, (or if used, pool allocated ZIL), always have the original write data in RAM, unless a crash occurs. Thus, ZFS Intent Log transactions are basically write only.

Actually, that senerio above would also apply if you lost a mirrored SLOG. (Like you loose one half of the mirror, but don't fix it. Later the other half also dies.)

Now if you have striped SLOG devices that are un-mirrored, (kinda silly unless you need more throughput), and you loose one, my prior reading indicates that the failed one drops from use, (becomes DEGRADED). But, the other one would still be available for use.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Once upon a time losing a SLOG on a live pool was bad news, hence why people mirror them. These days ZFS carries on without a SLOG.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
If used for production data, especially for VMs that use containers, Mirrored SLOGs still make a great deal of sense.

Basically if the server crashes, and on startup it finds one of the SLOG Mirror devices bad, all is still good.

But, if you have only a single SLOG device, then server crashes and on startup it finds the SLOG device bad, your VMs can be corrupt.
That's independant of the ZFS pool status which should always be good. This is one of the corner cases. Sometimes hard to understand.
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
But, if you have only a single SLOG device, then server crashes and on startup it finds the SLOG device bad, your VMs can be corrupt
Even if true, that sounds like a really slim case.
Next question on the slim case scenarios would be ( ;) ) "what if a meteor strikes our second data center backup"? Or If Linus from LTT suddenly makes an appearance near the gates to your area where off site shelf backups are kept?
Chances ARE data corruption is induced.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Thing is slogs are only used upon restart.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Even if true, that sounds like a really slim case.
Next question on the slim case scenarios would be ( ;) ) "what if a meteor strikes our second data center backup"? Or If Linus from LTT suddenly makes an appearance near the gates to your area where off site shelf backups are kept?
Chances ARE data corruption is induced.
Agreed, slim case. But, for a real, honest production server, I'd use Mirrored SLOG, (if I had any SLOG at all).
 
Status
Not open for further replies.
Top