SOLVED CLI Pool Creation w/ gpart labels (how?)

Status
Not open for further replies.

svtkobra7

Patron
Joined
Jan 12, 2017
Messages
202
I've been doing some SLOG testing recently (trying to find a configuration I can settle in with) and realized how much I like inclusion of a label, ex. -l Opt1log1 below (Optane #1, Log #1 in case you are wondering, multiple in system), when creating partitions. I've always disliked the long gptids because they are difficult to remember (kidding), but it would make commands like iostat easier to read (see example where the writes are "pushed" over). Other "benefits" too this one was just at hand ...

It is easy enough to create the pool I use via CLI, although in absence of thinking of this question would ultimately create via GUI, but is there a way to create a pool using labels instead? If so, how would one go about doing so, and which specific flags should be used? Any downside to do to this?

Also, when done testing I'll be creating an encrypted pool, so if you are kind enough to provide guidance on this, I would love it if you could inform me how to make adjustments for that.

Example of -l flag

gpart create -s gpt nvd0
gpart add -t freebsd-zfs -a 1m -l Opt1log1 -s 16G nvd0
gpart add -t freebsd-zfs -a 1m -l Opt1block1 nvd0


Command to creat pool I use, would need edit for encryption (how?)
zpool create Tank1 raidz2 /dev/da1 /dev/da2 /dev/da3 /dev/da4 /dev/da5 /dev/da6 raidz2 /dev/da7 /dev/da8 /dev/da9 /dev/da10 /dev/da11 /dev/da12

Annoying shift due to long gptid / example of gpt labels in use
ex.jpg
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Did you look at the resources we already have about SLOG devices? There has been a lot of testing already done:

The ZFS ZIL and SLOG Demystified
http://www.freenas.org/blog/zfs-zil-and-slog-demystified/

Testing the benefits of SLOG using a RAM disk!
https://forums.freenas.org/index.ph...s-of-slog-using-a-ram-disk.56561/#post-396630

Testing the benefits of SLOG
https://forums.freenas.org/index.php?threads/testing-the-benefits-of-slog-using-a-ram-disk.56561

SLOG benchmarking and finding the best SLOG
https://forums.freenas.org/index.ph...-and-finding-the-best-slog.63521/#post-454773
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Also, when done testing I'll be creating an encrypted pool, so if you are kind enough to provide guidance on this, I would love it if you could inform me how to make adjustments for that.
Why do you want it encrypted? Are you aware of the risks?
 

svtkobra7

Patron
Joined
Jan 12, 2017
Messages
202
Did you look at the resources we already have about SLOG devices? There has been a lot of testing already done:

Maybe the question wasn't clear ... I want to create a pool using gpt label, so they are presented instead of gptid ... is that in there? But yes, I've read much of that content (I just wouldn't have been looking previously for the answer to this question when consuming).
 

svtkobra7

Patron
Joined
Jan 12, 2017
Messages
202
Why do you want it encrypted?
  • Because I want it encrypted. And it has been since I originally deployed FreeNAS.
Are you aware of the risks?
  • If you are diligent about keeping your geli key, recovery key, and even backup up the geli metadata, how risky is it really?
  • More so than an unencrypted pool, sure.
  • But does the aforementioned diligence combined with daily replication = playing with fire? = not in my opinion.
  • In all honesty, the "non-destructive" act of adding/removing a SLOG has cost me a pool, but never the "risky" act of using encryption. Do we advertise SLOGs as risky? (not directed at you as a pointed remark, just suggesting I've not had issues)
 

svtkobra7

Patron
Joined
Jan 12, 2017
Messages
202

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Much appreciated, sir. Apologies if my original question was unclear - ready for bed. And let me know on the encryption ... maybe I'm missing something (if so I'd like to know*) ... but do feel with appropriate precautions taken, it isn't a risky proposition.

* this is a perfect example of what I mentioned via PM
We have seen people loose their pool because of not being able to recover from something like replacing a drive, where the pool encryption key needs to be reset, and the new key was not meticulously stored in a safe place. The safety of the encrypted pool is all about maintaining the keys, and if you can do that, and nothing goes wrong, it can be fine. It is still a risk because of the possibility that something could go wrong. That is why we usually recommend avoiding encryption unless there is a compelling reason to do it, like a regulatory requirement.
 

svtkobra7

Patron
Joined
Jan 12, 2017
Messages
202

svtkobra7

Patron
Joined
Jan 12, 2017
Messages
202
We have seen people loose their pool because of not being able to recover from something like replacing a drive, where the pool encryption key needs to be reset, and the new key was not meticulously stored in a safe place. The safety of the encrypted pool is all about maintaining the keys, and if you can do that, and nothing goes wrong, it can be fine.
  • All fair points, and simply in the interest of debate, was the drive replaced immediately, did they reboot 50 times before replacing, or accidentally "replace" with another vdev? A drive properly replaced should not cause any issue for a user with an encrypted pool. As you know, there is a whole section in the documentation related to encrypted pool drive replacement.
  • If you can manage to not lose your car keys, I feel as though you can manage to not lose your geli key, and more importantly, I feel as though the system / documentation does a good enough job at advertising the importance of not losing your keys.
  • Even if you lose your keys, and your pool, that shouldn't be the end of the world. Restore from backup. My point = the cost of that risk actualizing should not be that large and if you lost your keys, didn't have a backup, etc. you were more likely than not careless and I hear QNAP and Synology make great products.
It is still a risk because of the possibility that something could go wrong.
  • That certainly is a broad stroke ...
  • My perspective = the fact that it is advertised as a risk = should cause pause such that measures can be put in place to mitigate and it becomes nearly a moot point.
  • Sure, there is also some risk that I will be mugged after I walk the dog for the night after I press reply, but unlike the "risk" of an encrypted pool, that risk isn't one I would ever be looking for.
That is why we usually recommend avoiding encryption unless there is a compelling reason to do it, like a regulatory requirement.
  • You don't have thieves running around your neighborhood stealing HDDs from servers racked in people's homes??? Must be nice! <= joking I feel like my drives are safe, between the encryption and I racked the servers upside down just to keep the HDDs out of plain sight. Also joking, that was done for thermal reasons: (a) 5.2C HDD temp favorability upside down vs mounted drives up, (b) even at 100% duty system can't hold 40C, (c) ambient = 78-80F and fan is only exhausting 110 CFM, (d) no issue with thermals / noise in that orientation (even at such a high ambient) w/ HDD temps polled every 60 seconds and managed by script.
  • IMG_20180919_093754.jpg <= I suppose the HDDs falling to the floor is also a "risk"; however, I haven't had that happen once since mounted in that fashion (April 2017).
  • There are other compelling reasons outside of enterprise: (a) need to not wipe disks if you don't want when done with them (I still would), (b) where possible I feel like any security measure that can be implemented should (even if not a regulation and at home), (b) you feel like your system is too fast and want the encryption to slow it down, etc.
[You do give good advice and a lot of it (which I do greatly respect), and advice should always err on the conservative side, I'm just giving you crap since I didn't start using FreeNAS yesterday]
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
is it me or is search on this forum "wonky" ... seems like half the time I search and then click on a result, it won't resolve
I have been told that this is a more reliable search: https://forums.freenas.org/index.php?search/&type=post
It can be a challenge searching the forum. It is sometimes easier to do a Google search like this:

upload_2018-10-6_21-10-33.png


by telling google site:forums.freenas.org before the search term, it restricts the results to this one site.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
All fair points, and simply in the interest of debate, was the drive replaced immediately, did they reboot 50 times before replacing, or accidentally "replace" with another vdev? A drive properly replaced should not cause any issue for a user with an encrypted pool.
As I recall, the failed drive was replaced, which required a re-key, and the new key was not stored. An oversight. Then, at a later time, there was a power outage that caused an unplanned shutdown. The user, having not stored the new key, was not able to provide it when the server came back up, so they were not able to access their data. The pool was operating as intended.
If you can manage to not lose your car keys, I feel as though you can manage to not lose your geli key, and more importantly, I feel as though the system / documentation does a good enough job at advertising the importance of not losing your keys.
Yet, I have locked myself out of my car, probably a half dozen times in the 30 or so years since I started driving. (I even ran out of gas a couple times.) The difference is, I was able to call 'Pop-a-Lock' to get me back in my car or get a spare set of keys. I never had to totally scrap my car and everything in it because I misplaced the key.
Even if you lose your keys, and your pool, that shouldn't be the end of the world. Restore from backup.
I have a local backup to restore from, for me it would be an inconvenience, but there are many users that are not so prepared. All I wanted to do for you was ensure that you are fully aware of where you are going, and it sounds like you have done your research. Some jump in without proper preparation.
and I racked the servers upside down just to keep the HDDs out of plain sight
I was wondering what I was seeing. That's looking up from the floor at the roof.
that was done for thermal reasons: (a) 5.2C HDD temp favorability upside down vs mounted drives up, (b) even at 100% duty system can't hold 40C, (c) ambient = 78-80F and fan is only exhausting 110 CFM, (d) no issue with thermals / noise in that orientation (even at such a high ambient)
Interesting. Probably convection in addition to fan forced air causing cool air from the floor to be pulled up through the system. How does it do with dust accumulation in the system? I have my systems mounted horizontally, but I had considered something like this a couple times. I might just give it a try. How much space did you allow between the 'front' of the system and the floor for changing drives?
You do give good advice and a lot of it (which I do greatly respect), and advice should always err on the conservative side, I'm just giving you crap since I didn't start using FreeNAS yesterday
Many of my suggestions are geared to the new user because we get so many of them. I have no way to know what your level experience is until we start to have a dialog.
I am always open to learning something new.
 

svtkobra7

Patron
Joined
Jan 12, 2017
Messages
202
I have been told that this is a more reliable search: https://forums.freenas.org/index.php?search/&type=post
It can be a challenge searching the forum. It is sometimes easier to do a Google search like this:
  • I'm somewhat glad it isn't just me honestly.
  • I read that via email (attachment is a link) and was expecting you to send me one of these guys: http://bfy.tw/KEuv
  • Then I remembered everybody has a better sense of humor than myself.
by telling google site:forums.freenas.org before the search term, it restricts the results to this one site.
  • Righto ... I was aware of the ability to search in that manner, but was hoping that wasn't the solve here as I would hope that inbuilt search functionality is better optimized for the site's 486k posts than Google. But if it works it works.
Thanks for the follow up. So the Advanced Search / Threads & Posts or el Goog it is. I'll drop that Advanced Search on my Speed Dial for ease.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Thanks for the follow up. So the Advanced Search / Threads & Posts or el Goog it is. I'll drop that Advanced Search on my Speed Dial for ease.
I don't know why the search bar works some times and totally fails other times. It still finds the results, it just provides links that don't work.
I still use it first and go to the others as a backup plan.
 

svtkobra7

Patron
Joined
Jan 12, 2017
Messages
202
As I recall, the failed drive was replaced, which required a re-key, and the new key was not stored. An oversight. Then, at a later time, there was a power outage that caused an unplanned shutdown. The user, having not stored the new key, was not able to provide it when the server came back up, so they were not able to access their data. The pool was operating as intended.
  • Ouch ... did they have a back up they could restore from?
Yet, I have locked myself out of my car, probably a half dozen times in the 30 or so years since I started driving. (I even ran out of gas a couple times.) The difference is, I was able to call 'Pop-a-Lock' to get me back in my car or get a spare set of keys. I never had to totally scrap my car and everything in it because I misplaced the key.
  • That surprises me (the key loss), you don't strike me as an "aloof" person, but I'm there with you on the gas; however, that hasn't been carelessness, rather I tend to push things to far.
I have a local backup to restore from, for me it would be an inconvenience, but there are many users that are not so prepared. All I wanted to do for you was ensure that you are fully aware of where you are going, and it sounds like you have done your research. Some jump in without proper preparation.
  • What RAID is not a backup? Sorry, it felt appropriate at the time.
  • And I appreciate your concern, genuinely, and as noted previously, if you are being solicited directly or indirectly for advice (this is a forum after all), best to take a conservative approach as to not err and anger the interwebs.
I was wondering what I was seeing. That's looking up from the floor at the roof.
  • Why yes, you happen to be directionally correct. ;)
Interesting. Probably convection in addition to fan forced air causing cool air from the floor to be pulled up through the system. How does it do with dust accumulation in the system? I have my systems mounted horizontally, but I had considered something like this a couple times. I might just give it a try. How much space did you allow between the 'front' of the system and the floor for changing drives
  • I think we would both agree that rackmount chassis weren't intended to live in homes, and especially condos where space is at even more of a premium than a detached home. Ideally, I would have loved to mount in the ordinary horizontal orientation, but that former coat closet, now server closet adjoining the living area was really all I had. As luck would have it, it was half an inch too deep to fit.
  • As I see it I had 4 options (and I was escaping from 3 QNAP boxes, so I couldn't go back there): (1) Purchase a 12U or so rack and leave it in my office, enjoying the wonderful thermals and acoustics, (2) rack it against the wall horizontally in that closet, (3) rack it against the wall vertically in that closet, chassis facing the ceiling, or (4) the option I chose, rack it against the wall vertically in that closet, chassis facing the ground.
  • In my opinion, and I'm no expert, but what I ended up with is two independent systems moving air, which happen to be working in the same direction, and not against one another fortunately. The closet viewed independently as a system, thanks to the ceiling fan, creates a negative pressure environment, emptying that room of air entirely at a theoretical maximum cyclical rate of once every 30 seconds. Given that the room is so air tight (I tore it down to the studs to insert Rockwool sound abatement + add vertical wood 2 x 4s and horizontal wood 2 x 6 blocking as that would be a lot of weight for wimpy metal studs to bear alone + there is a built in closet directly being already "tugging" at the studs) and ensure it was "air tight" on the rebuilt, if you were to stand inside with your toes facing the door, you can feel the air moving under the door over them, and is ultimately exhausted from the room by the exhaust fan at the ceiling.
  • The second system would be the server and we all know how air flows through those, so I would saw it is nearly optimally oriented (short of genuine alignment with a hot and cold aisle and the like). Think about how adverse of an environment I've provided: (a) 78-80F ambient, (b) a 30" strip below the door to pull in air no more than 3/8" tall, and (c) a relatively weak means to exhaust (I would be surprised if that fan was rated at the necessary static pressure to actually pull the 110 CFM claimed out of there), and (d) to top it off 7200 RPM hard drives, yet the servers have no issue staying below 40C. Prior to building my two 826s I had an 836 and I thought that due to losing the extra volume and the two rear exhaust fans, I would be worse off, but this pair whines far less than the 836 ever did.
  • To your points / questions, I think you nailed the major contributors to proper air flow, with orientation being the only other I can think of. But what I've always found interesting is that it is a "balanced" system for lack of a better way to phrase it, as I don't think there is one reason to which 95% of the effectiveness can be attributed to and everything works together towards the meritorious goal of proper air flow into and out of that 59^3 ft enclosure.
  • Dust accumulation is negligible, probably worse in the workstation in my office for some reason.
  • The lowest point on the drive caddies are 17" off the floor, which means you do have to get on the floor to insert drives, but that doesn't bother me. Since you said you are thinking about it, let me call out the downsides of such an approach: (a) I've been warned many a time by others about falling HDDs, but I've never had it occur. Without cheating and looking at your sig, I think you run a Norco chassis and I can't imagine their locking mechanism is any less secure than SMCI's (these may exist for your chassis too, but if you went this route, owned a SMCI chassis and the thought of HDDs falling out of the chassis was keeping you up at night, I say buy a front bezel and problem solved), (b) it is indeed a PITA to "rack" without another hand, but I've managed each time, (c) if you mount more than one server, you have to pull the one at the front to access the one at the wall, (d) you either have to be handy and fabricate something yourself, or buy 2 vertical racks to emulate a four post, whereas you could get away with a single one if you went the more "common" approach of HDDs facing the ceiling.
  • If you inferred that I love DIY projects and got a tad too much into this one, you would be correct. If you ever feel inclined to pursue the option in the future, please don't hesitate to reach out, I'm at your convenience with any questions and happy to provide any data I can. I don't imagine there are too many high rise condos out in your area, so you probably have plenty of space and noise is of less concern, but that Rockwool is really amazing stuff. I added built in closets directly behind that closet and it deadens the sound so much that the only trace I can hear is actually coming from under the door, not through the wall. Obviously, that would be a tough one to solve as I wouldn't have nice cool, dense air to feed them any longer.
  • Here is the best part about that set up, and given the numerous constraints in place, I don't thinks its too bad ...

(a) come time to sell, and if you or I were strong enough (we aren't), we could simply lift the plywood panel the racks are attached to (with servers in place) up and off the wall and out the door,
IMG_20180911_173744.jpg
(b) leaving just 6 small screw holes to be patched (piece of cake),this single piece of wood (but a special one), having been removed,
20170906_091250.jpg
(c) and most people wander about their lives so obliviously I don't know that they would ever notice that fan as a fan, but even if so would they want it removed? A home inspector would likely catch it, but everything is to code.
20170906_091314.jpg

In case you are unaware of the construction technique which is brilliantly simple (and if so, I don't mean to speak down to you), it is called a French cleat and they rock.
Many of my suggestions are geared to the new user because we get so many of them. I have no way to know what your level experience is until we start to have a dialog.
I am always open to learning something new.
  • I can be a tad sarcastic, but to be sure I'm not with this comment, I think you are an immense asset to the community and provide great counsel to individuals getting into FreeNAS for the first time.
  • I remember spending weeks researching my "perfect build" only to ultimate be overwhelmed by all the moving parts so eventually I just pressed buy for a pre-built chassis on ebay. With you offering guidance with inclusive of a full BOM to those in need of knowledge, I imagine it is quite a welcome experience.
  • Trust me, I don't have anything I can teach you, I have no IT background or IT education, and I'm not so lucky as to work for an employer with essentially limitless resources that could build petabyte flash arrays on a whim if they wanted (that would be silly, but point illustrated).
  • Tip of the hat to you sir!
Hope you had a good weekend and thanks for the kind assist yesterday. Take care.
 

pro lamer

Guru
Joined
Feb 16, 2018
Messages
626
hope that inbuilt search functionality is better optimized for the site's 486k posts than Google.
I find the inbuilt "faster" sometimes. I mean: indexes sooner than google sometimes.

Thus the inbuilt advanced search may be for me ;)

it just provides links that don't work
When I am desperate I fix them manually infixing index.php? for example forums.freenas.org/posts/123456 becomes forums.freenas.org/index.php?/posts/123456 (or sth very similar) forums.freenas.org/index.php?posts/123456 (no slash after question mark needed).

I used to think it changed during one of the xenforo updates but I am new here and I may not have paid enough attention before...


Ps. I have just realized that I can see signatures while mobile - I needed to rotate to landscape orientation... :)

Sent from my mobile phone
 
Last edited:
Status
Not open for further replies.
Top