Synchronize UI with command line actions (glabel, zpool)

Status
Not open for further replies.

jingle

Cadet
Joined
Feb 9, 2016
Messages
9
Hey there,

I prefere the command line for setting up my partition schemas, and pools in order to have fine grained control on sector alignment, labels, swap and freebsd-zfs partition size, zfs pool layout and so on.

Problem: I don't see the created and mounted pool (created with zpool(8)) in the WebUI, neither do I see my assigned labels (glabel(8)) in the "View Disks" Description section.

What I did is something like:
Code:
gpart create -s gpt ada1
gpart create -s gpt ada2
gpart add -t freebsd-zfs -a 1m -s 500m -l zfs1 ada1
gpart add -t freebsd-zfs -a 1m -s 500m -l zfs2 ada2
zpool create mypool mirror gpt/zfs1 gpt/zfs2
zpool status
reboot now


The pool is ONLINE and mounted (as is the freenas-boot pool). The pool is just not showing up in the UI (View Volumes), FreeNAS reports all disks as available to create a new volume (which is wrong), and neither do the labels get shown in "View Disks".

Question:
  1. What action is necessary to have my glabel changes being reflected in View Disks/Description?
  2. Why do I need to "zpool export" my manually created pool from the cmd and import it again in the WebUI? Can't the UI query via zpool(8) and zfs(8) to show whats currently mounted?
Applies to FreeNAS-9.3-STABLE-201601181840
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hey there,

I prefere the command line for setting up my partition schemas, and pools in order to have fine grained control on sector alignment, labels, swap and freebsd-zfs partition size, zfs pool layout and so on.

Problem: I don't see the created and mounted pool (created with zpool(8)) in the WebUI, neither do I see my assigned labels (glabel(8)) in the "View Disks" Description section.

What I did is something like:
Code:
gpart create -s gpt ada1
gpart create -s gpt ada2
gpart add -t freebsd-zfs -a 1m -s 500m -l zfs1 ada1
gpart add -t freebsd-zfs -a 1m -s 500m -l zfs2 ada2
zpool create mypool mirror gpt/zfs1 gpt/zfs2
zpool status
reboot now


The pool is ONLINE and mounted (as is the freenas-boot pool). The pool is just not showing up in the UI (View Volumes), FreeNAS reports all disks as available to create a new volume (which is wrong), and neither do the labels get shown in "View Disks".

Question:
  1. What action is necessary to have my glabel changes being reflected in View Disks/Description?
  2. Why do I need to "zpool export" my manually created pool from the cmd and import it again in the WebUI? Can't the UI query via zpool(8) and zfs(8) to show whats currently mounted?
Applies to FreeNAS-9.3-STABLE-201601181840

See JKH's explanation of the FreeNAS middleware and architectural differences between FreeNAS 9.3 and FreeNAS 10. https://web.archive.org/web/2015090...5/06/freenas-10-a-developers-perspective.html

TL;DR - try to avoid doing things from the CLI in FreeNAS 9.3.

The link is through the way-back machine because it appears iX marketing may have noticed JKH's blog post and nuked it.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
You could try to talk to freenas and explain to it that you made some changes behind the scenes, or if you freenas voice recognition is on the fritz, you can detach the pool and then import the pool using the GUI.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
You could try to talk to freenas and explain to it that you made some changes behind the scenes, or if you freenas voice recognition is on the fritz, you can detach the pool and then import the pool using the GUI.
To initiate freenas voice recognition you should pick up the mouse and speaking into it say "Hello, computer" with your best Scottish accent.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
  • What action is necessary to have my glabel changes being reflected in View Disks/Description?
I think you have to check out the code, write something new and then check it in and hope the developers accept it.

  1. Why do I need to "zpool export" my manually created pool from the cmd and import it again in the WebUI? Can't the UI query via zpool(8) and zfs(8) to show whats currently mounted?
Because that's the way the product was coded. If it were developed differently, then yes, I imagine it could likely do that. But since the guidance is that all actions are done via the freenas system and not via command line, it's probably not a problem they want to invest resources into solving.
 

jingle

Cadet
Joined
Feb 9, 2016
Messages
9
Alright - screw the labels. But shouldn't setting up the pool on cli and then zpool export + import into UI be ok? Any experiences or downsides?
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
I'm no expert, but I think there is a reason that freenas includes swap space on the drives. There's probably a couple other little issues that will pop up. I honestly don't know though.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
One of the primary reasons for swap space is to facilitate disk replacements when the sizes don't match up 100%.

The webgui uses gptid's when creating the pool.

FreeNAS expects to run as an appliance and includes a number of safety features to keep users from making dumb mistakes. A number of forum users have gotten themselves in trouble, due to configuring their pools from the command line. I've seen some threads where users have had to backup 50TB + of data and start over, due to command line mistakes while configuring their pool from the CLI.

I'm no expert, but I think there is a reason that freenas includes swap space on the drives.
 

jingle

Cadet
Joined
Feb 9, 2016
Messages
9
Fully agree with the swap.

But please provide prove when making such claims...
I've seen some threads where users have had to backup 50TB + of data and start over, due to command line mistakes while configuring their pool from the CLI.

Using CLI is no magic at all (provided, one knows what one's doing of cause). For most of us, it's the default case.
One of the advantages of ZFS is its interchangeability. But if importing pools created on e.g. FreeBSD with <= zfs feature flag was problematic to FreeNAS, then FreeNAS would not be an option.
Not to mention, importing pools into FreeNAS that were created and exported from the very same machine.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
It took me a few minutes to find an example -

See - https://forums.freenas.org/index.php?threads/freenas-web-acces-error.39932/#post-250546 Start on message #7.

So, I'm a little off on this particular example, since the pool was only 30TB in size. I can't easily dig through 4 years of my participation here to prove to you, that other users have made mistakes, by using the CLI to create their pools.

But please provide prove when making such claims...

I wouldn't go so far as saying most. Spend more time in the forum. See the recent "How to fail" thread - https://forums.freenas.org/index.php?threads/how-to-fail-a-guide-to-things-not-to-do.40924/

For most of us, it's the default case.
 
Status
Not open for further replies.
Top