Add SLOG by GPTID/Label

Status
Not open for further replies.

sfcredfox

Patron
Joined
Aug 26, 2014
Messages
340
Greetings,

I'd like help adding a SLOG by using a glabel or GPTID instead of a GEOM. I need help ensuring I'm not doing something stupid. I wanted to add the SLOG with commands so I can over/under-provision following some advise from posts. Basically create a small partition and better let the device do wear leveling.

I used the following procedure to create a partition for SLOG (da26 is currently the SSD):
Code:
Create drive/partition
gpart create -s gpt da26


I then used:
Code:
zpool add Tier2-Group1 log /dev/da26p1
to add the device to the pool.

I realized that might be a stupid way of doing it since GEOMs can change at reboot or hardware move.
Can somone confirm my suspicion of this?

Device listed by it's GEOM:
Code:
zpool iostat -v

pool alloc free read write read write
-------------------------------------- ----- ----- ----- ----- ----- -----
Tier1-Group1 1.67T 982G 2 26 16.0K 284K
raidz1 405G 267G 0 0 0 0
gptid/31dbce50-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/327ae548-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/3319098c-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/33b02f32-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/344814a5-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
raidz1 504G 168G 0 0 0 0
gptid/760bf849-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/76a3b45e-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/777c9f5a-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/783edb9e-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/79194027-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
raidz1 514G 158G 1 0 7.99K 0
gptid/9101fc9b-5ee1-11e4-970c-001b7857b9ca - - 0 0 4.00K 0
gptid/91d8de61-5ee1-11e4-970c-001b7857b9ca - - 0 0 0 0
gptid/92affbe0-5ee1-11e4-970c-001b7857b9ca - - 0 0 0 0
gptid/12f80e9b-603c-11e4-a1e7-001b7857b9ca - - 0 0 4.00K 0
gptid/942e953c-5ee1-11e4-970c-001b7857b9ca - - 0 0 0 0
raidz1 283G 389G 0 0 7.99K 0
gptid/16087150-fe94-11e4-817e-001b7857b9ca - - 0 0 4.00K 0
gptid/16c84790-fe94-11e4-817e-001b7857b9ca - - 0 0 0 0
gptid/178989bc-fe94-11e4-817e-001b7857b9ca - - 0 0 4.00K 0
gptid/183ff24c-fe94-11e4-817e-001b7857b9ca - - 0 0 0 0
gptid/190044c7-fe94-11e4-817e-001b7857b9ca - - 0 0 0 0
logs - - - - - -
da26 18.5M 19.9G 0 26 0 284K
-------------------------------------- ----- ----- ----- ----- ----- -----


I want to add the device by using it's GPTID or something that doesn't change with reboot/hardware change.

I properly removed the device with GUI.

I used same commands to create the partition:
Code:
Create drive/partition
gpart create -s gpt da26


glabel shows me it's name as:
[root@Carmel-SANG2] /dev/gptid# glabel list da26p1
Geom name: da26p1
Providers:
1. Name: gpt/SLOG
Mediasize: 21474836480 (20G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1048576
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 41943040
length: 21474836480
index: 0
Consumers:
1. Name: da26p1
Mediasize: 21474836480 (20G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1048576
Mode: r0w0e0

This time I used:
Code:
zpool add Tier1-Group1 log gpt/SLOG


Code:
zpool iostat -v

pool alloc free read write read write
-------------------------------------- ----- ----- ----- ----- ----- -----
Tier1-Group1 1.67T 982G 2 26 16.0K 284K
raidz1 405G 267G 0 0 0 0
gptid/31dbce50-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/327ae548-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/3319098c-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/33b02f32-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/344814a5-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
raidz1 504G 168G 0 0 0 0
gptid/760bf849-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/76a3b45e-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/777c9f5a-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/783edb9e-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
gptid/79194027-3af4-11e4-a5b2-001cc467f92a - - 0 0 0 0
raidz1 514G 158G 1 0 7.99K 0
gptid/9101fc9b-5ee1-11e4-970c-001b7857b9ca - - 0 0 4.00K 0
gptid/91d8de61-5ee1-11e4-970c-001b7857b9ca - - 0 0 0 0
gptid/92affbe0-5ee1-11e4-970c-001b7857b9ca - - 0 0 0 0
gptid/12f80e9b-603c-11e4-a1e7-001b7857b9ca - - 0 0 4.00K 0
gptid/942e953c-5ee1-11e4-970c-001b7857b9ca - - 0 0 0 0
raidz1 283G 389G 0 0 7.99K 0
gptid/16087150-fe94-11e4-817e-001b7857b9ca - - 0 0 4.00K 0
gptid/16c84790-fe94-11e4-817e-001b7857b9ca - - 0 0 0 0
gptid/178989bc-fe94-11e4-817e-001b7857b9ca - - 0 0 4.00K 0
gptid/183ff24c-fe94-11e4-817e-001b7857b9ca - - 0 0 0 0
gptid/190044c7-fe94-11e4-817e-001b7857b9ca - - 0 0 0 0
logs - - - - - -
gpt/SLOG 18.5M 19.9G 0 26 0 284K
-------------------------------------- ----- ----- ----- ----- ----- -----

Will this remain as stable as a gptid? Could I safely leave this or does it need to change to a gptid?

I guess I can't figure out how to properly use gpart and glabel to create the partition and add the device by gptid and figure out with Google what the real differences are.

Could anyone provide exact commands and syntax for creating a 20GB (probably bigger than it needs to be, but whatever) partition using a gptid? and explanation of the difference between gptid and a glabel?



Refereces for manually creating SLOG :
https://forums.freenas.org/index.php?threads/how-to-add-an-slog.16766/
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You use the GUI to add it. Should be pretty simple. I think you are trying to do something else though that you are leaving out.
 

sfcredfox

Patron
Joined
Aug 26, 2014
Messages
340
You use the GUI to add it. Should be pretty simple. I think you are trying to do something else though that you are leaving out.
If I use the GUI, it will create a partition the size of the entire drive. I know even 20gb is more than needed. I guess I don't know if its worse doing it that way or the right way of using these partitioning commands.
 
Status
Not open for further replies.
Top