Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve ZFS related data #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Retrieve ZFS related data #14

wants to merge 3 commits into from

Conversation

crpb
Copy link

@crpb crpb commented Aug 5, 2024

Get a bunch of zfs infos.
The -list's are kinda unreadable with the option '-o all' in a terminal but i guess it's better to have everything than selecting only bits and pieces.

Don't know about the filenames but that way it is at least clear what's inside. ¯_(ツ)_/¯

@akorn Maybe you have some notes on what should be thrown out or maybe added aswell.

@akorn
Copy link

akorn commented Aug 5, 2024

I'm not sure how much sense running the zdb bit unconditionally makes; even on a small, flash-backed pool it will take several minutes to run. On a bigger one it may take hours or days.

In any case, it probably makes sense to run all these commands in parallel, like this:

  zfs_command_1 >out 2>err_out &
  zfs_command_2 >out 2>err_out &
...
  wait

Because they'll largely read the same stuff from the disk and I imagine this may help improve cache efficiency.

@mika
Copy link
Member

mika commented Aug 5, 2024

Yeah I agree, the zdb command isn't an option for grml-hwinfo as-is.

I'm wondering whether we should also collect the ZFS information within a zfs sub directory? Opinions?

@akorn
Copy link

akorn commented Aug 5, 2024

I'm wondering whether we should also collect the ZFS information within a zfs sub directory? Opinions?

I have no opinion (I don't think I've ever used grml-hwinfo).

@crpb
Copy link
Author

crpb commented Aug 5, 2024

Tried it on my local (True)NAS (FreeBSD) which isn't the fastest but w/o the zdb call it's fast enough as we don't look for snapshots which can take quite some time especially on slow backup targets.

root@nas ..l-hwinfo-2024-08-05--17-17-36-CEST/zfs (git)-[master] # ls -T -l
total 89
-rw-r--r--  1 root  wheel   16943 Aug  5 17:17:38 2024 arc_summary
-rw-r--r--  1 root  wheel       0 Aug  5 17:17:38 2024 arc_summary.error
-rw-r--r--  1 root  wheel   15491 Aug  5 17:17:38 2024 zfs-list.boot-pool
-rw-r--r--  1 root  wheel       0 Aug  5 17:17:38 2024 zfs-list.boot-pool.error
-rw-r--r--  1 root  wheel  227060 Aug  5 17:17:41 2024 zfs-list.p0
-rw-r--r--  1 root  wheel       0 Aug  5 17:17:38 2024 zfs-list.p0.error
-rw-r--r--  1 root  wheel    1901 Aug  5 17:17:38 2024 zpool-iostat.boot-pool
-rw-r--r--  1 root  wheel       0 Aug  5 17:17:38 2024 zpool-iostat.boot-pool.error
-rw-r--r--  1 root  wheel    1901 Aug  5 17:17:38 2024 zpool-iostat.p0
-rw-r--r--  1 root  wheel       0 Aug  5 17:17:38 2024 zpool-iostat.p0.error
-rw-r--r--  1 root  wheel    2304 Aug  5 17:17:38 2024 zpool-list.boot-pool
-rw-r--r--  1 root  wheel       0 Aug  5 17:17:38 2024 zpool-list.boot-pool.error
-rw-r--r--  1 root  wheel    3211 Aug  5 17:17:38 2024 zpool-list.p0
-rw-r--r--  1 root  wheel       0 Aug  5 17:17:38 2024 zpool-list.p0.error
-rw-r--r--  1 root  wheel     353 Aug  5 17:17:38 2024 zpool-status.boot-pool
-rw-r--r--  1 root  wheel       0 Aug  5 17:17:38 2024 zpool-status.boot-pool.error
-rw-r--r--  1 root  wheel     978 Aug  5 17:17:38 2024 zpool-status.p0
-rw-r--r--  1 root  wheel       0 Aug  5 17:17:38 2024 zpool-status.p0.error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants