[PLUGIN] ZFS Master


Iker

Recommended Posts

Hi @dopeytree I think this article will help you to understand how snapshots work on ZFS (https://arstechnica.com/information-technology/2020/05/zfs-101-understanding-zfs-storage-and-performance/) and better plan your policy. You can always check how much space a snapshot is using with the "Snapshots Admin" dialog on the plugin.

 

@couzin2000 I have seen that error multiple times with different plugins, it's not directly related to this plugin, so you should post it to General support thread.

  • Thanks 1
Link to comment
On 4/4/2024 at 5:13 AM, dopeytree said:

I thought snapshots didn't use much space?

 

Reading the help file that Iker linked you will be a good move. But, in a nutshell, snaps use ~0 space to create, and only increase in size when you edit or delete data that is snapshotted. If you use it on a dataset that contains constantly changing contents (like an NVR) it will very quickly balloon out of control. 

 

If you want to keep more NVR footage, you should tell frigate and let it handle that its own way. Reserve snapshots for data that doesn't change a lot and/or that would be extremely important to roll back with one click. 

 

For example, I snapshot most of my appdata so that if I or an update borks everything, I can downgrade the container and roll its appdata folder back to how it was before and get everything back the way it was in a few minutes. 

 

My appdata has snaps every hour for 3 days and every 4 hours for 7 days after that, uses 13.5G for current data and 40G for snaps. 

  • Thanks 1
Link to comment
55 minutes ago, Renegade605 said:

@Iker FYI, I'm on the latest version but nothing changed about the zvol properties in the GUI. 

 

The update fixed an issue with the mountpoint being displayed as "undefined" for zvols, it was reported by an user via dm; the full support for zvol is coming, but is going to take me a while.

Link to comment
18 hours ago, Iker said:

 

The update fixed an issue with the mountpoint being displayed as "undefined" for zvols, it was reported by an user via dm; the full support for zvol is coming, but is going to take me a while.

I misunderstood somewhat. Regardless, mine still show undefined for mountpoint, not just the other issues with properties. 

Link to comment
  • 2 weeks later...

Probably I should start putting together a FAQ on the first thread page:

 

On 9/6/2023 at 7:33 PM, Iker said:
  1. The only way i was able to delete anything was to completely stop the docker daemon: I haven't been able to reliable delete datasets used at some point by unraid without rebooting or stoping docker daemon; a procedure that sometimes works, is the following:
    1. Stop the docker using the directory
    2. Delete all snapshots, clones, holds, etc
    3. Delete the directory (rm -r <dataset-path>)
    4. Delete the dataset using ZFS Master or CLI.

 

Link to comment

Hi, new user here, just noticed all these supposed snapshots appear.  After googling I think I understand this is the plugin finding 'other' data and mislabeling as a snapshot.  Have I got this correct and if so how do I go about remedying it?

 

 

image.thumb.png.37cb6e45a3578af7d1a0bf66e3ae3fba.png

Link to comment
7 minutes ago, KillerK said:

Hi, new user here, just noticed all these supposed snapshots appear.  After googling I think I understand this is the plugin finding 'other' data and mislabeling as a snapshot.  Have I got this correct and if so how do I go about remedying it?

 

 

image.thumb.png.37cb6e45a3578af7d1a0bf66e3ae3fba.png

 

You have (or have had) docker storage set to directory. Docker is using its zfs storage engine if the dir is on zfs and that's what you see. It has been brought up several times in this thread before so try to look for it (I'm on my phone now).  You can exclude them from being shown but it depends on how the dir was/is setup. 

Edited by Niklas
  • Thanks 1
Link to comment
2 hours ago, KillerK said:

Hi, new user here, just noticed all these supposed snapshots appear.  After googling I think I understand this is the plugin finding 'other' data and mislabeling as a snapshot.  Have I got this correct and if so how do I go about remedying it?

 

 

image.thumb.png.37cb6e45a3578af7d1a0bf66e3ae3fba.png

This come when the Docker Directory are not correct created/with the new Default. The Path ... changed with 6.12/ZFS.

By correct/new Default you can see this under the Docker Path Folder and not under the system folder directly.

 

You can find a How Two here:

https://forums.unraid.net/topic/141919-umstieg-oder-migration-auf-zfs

 

And a sameles Problem:

https://forums.unraid.net/topic/141435-zfs-datasetssnapshots-löschen/?do=findComment&comment=1279149

 

But true you can exclude from showing.

I have excluded after Migration to the new Default.

  • Thanks 1
Link to comment

Thanks @Niklas and @Revan335.  I've added the string "/system/.*" under the 'Datasets Exclusion Patterns' option in the ZFS Master settings which has limited the output the plugin displays.  I'm a new user to unraid and started with 6.12 so I'm not familiar with the pre 6.12 operating expereince.  I can confirm however I've very recently altered the docker settings in my unraid from using a docker image file to a docker directory, and yes my array is ZFS which is where the location is defaulted to.

 

Appreciate the quick help 🙂

Link to comment

The old Default but not changed at the Moment in New Configs is system/docker.

I hope this come with 6.13.

 

The new Default from Documentation/Release Notes from 6.12 is /docker.

 

For example /mnt/user/system/docker or /mnt/cache/system/docker and /mnt/user/docker or /mnt/cache/docker

 

user should have exclusive Shares enabled for prevent Performance and other Issues.

 

All Requirements ... for this, Migration ... is explained in the Documentation and the linked Threads from me.

 

I recommended to change/migrated why you are on the Start and not many Docker Containers at the Moment.

 

The User Data from the Docker Container are on appdata. The Docker Directory Folder/Image only have the Docker Images and no User Data. Only Custom Config like Autostart, Delay you are created new after removed the old Folder or changed/created to the new Location.

 

With the overview in ZFS Master Plugin you are seen that creation correctly. You see the Docker Folder and the Legacy .... Snapshots under this and not under the actually from your Screenshot.

 

After the Migration completed and worked, you can excluded from showing and have a clean List.

 

You can converted the Folders/Shares on the ZFS Device to Datasets when he was not created automatically. This was explained to in the linked Thread.

 

Don't touch the Docker Directory/Folder in this Steps. He not neaded a convertation to Dataset and managed by the ZFS Docker Service. As far as I know.

 

If you have any further questions, just ask, and we are helped.

  • Thanks 1
Link to comment
3 hours ago, Revan335 said:

For example /mnt/user/system/docker or /mnt/cache/system/docker and /mnt/user/docker or /mnt/cache/docker

Thank you I think I understand better now.  My docker appdata is located at /mnt/user/docker which is a share I created on my Array. 

 

Quote

user should have exclusive Shares enabled for prevent Performance and other Issues.

When you say "exclusive" here are you refering to a share dedicated to holding docker appdata only, or are you refering to file/folder permissions, sorry I do not understand?

 

Quote

All Requirements ... for this, Migration ... is explained in the Documentation and the linked Threads from me.

 

I recommended to change/migrated why you are on the Start and not many Docker Containers at the Moment.

I watched SpaceInvaderOne's video detailing the difference between folders and ZFS datasets and how to convert them to make use of snapshots but I can see little use in that process for me and would prefer off-site backups over snapshots (I will consider this more though).  I've a large number of containers, all managed via docker-compose (with the plugin).

 

Quote

If you have any further questions, just ask, and we are helped.

Really appreicate your time and support, thank you.

Link to comment

 

2 hours ago, KillerK said:

Thank you I think I understand better now.  My docker appdata is located at /mnt/user/docker which is a share I created on my Array. 

When your Folders are Docker Directory mnt/user/docker, the Appdata mnt/user/appdata and you used exclusive Shares than its the new Default. When you don't used exclusive Shares or mnt/cache and so the Docker Files are only on the Cache Drive you have a big increase issue of Speed, Power Cost, ... and never ending Drives.

 

When you used the linked Documentations/Guides than he was under the Docker Directory mnt/user/docker. The order of the steps and starting the individual components/services is important so that they also end up/display in the Docker Directory.

 

But when you have the Legacy Snapshots under system is something wrong.

 

Maybe the Docker Compose is the issue. I don't using this. Why you are using not the inbuild Docker Functionality?

Edited by Revan335
Link to comment
1 hour ago, Revan335 said:

 

When your Folders are Docker Directory mnt/user/docker, the Appdata mnt/user/appdata and you used exclusive Shares than its the new Default. When you don't used exclusive Shares or mnt/cache and so the Docker Files are only on the Cache Drive you have a big increase issue of Speed, Power Cost, ... and never ending Drives.

Thanks for the reference, every day is a school day!  So I've enabled Exclusive shares now and can see all my shares which are built atop native ZFS Pools are now showing as exclusive.  However the share holding my Docker appdata isn't accepting Exclusive Access, maybe this where I'm still learing the correct language as whilst ZFS Master reports I have 3 pools (blacknet, cache and disk1) only the first 2 are true/native ZFS Pools with disk1 being an unRaid Array formatted as ZFS which is not the same?

 

image.png.253da9a962fd3db24e7e77f9796f31d2.png

 

1 hour ago, Revan335 said:

When you used the linked Documentations/Guides than he was under the Docker Directory mnt/user/docker. The order of the steps and starting the individual components/services is important so that they also end up/display in the Docker Directory.

 

But when you have the Legacy Snapshots under system is something wrong.

 

Maybe the Docker Compose is the issue. I don't using this. Why you are using not the inbuild Docker Functionality?

Which Guide are you meaning sorry, maybe I've misunderstood and not read/watched the correct one?

 

Why Compose, well previously I used a Synology NAS and the docker UI in their OS is pretty useless so I ended up using native Docker CLI for a while.  But as my collection of containers grew this became quite cumbersome to administer.  Also I wanted to control startup dependencies between groups of containers e.g. to ensure networks and databases have started before apps etc, so I moved to Compose.

 

If others in this thread have previously raised the concern about the snapshots being reported and the resolution was to use the 'Dataset Exclusion Pattern' why do you believe something is still wrong in my case?

 

In case this helps...

image.thumb.png.e0f3d27118935f59334e61c563f9879a.png

Edited by KillerK
content corrections
Link to comment
On 4/14/2024 at 6:39 PM, andyd said:

Hi,

 

I am trying to delete datasets for Apps that no longer exist. I get the following error...

 

"cache/appdata/mariadb-official: Operation not permitted"

 

Is there a way to get around this error?

 

On 4/15/2024 at 12:52 PM, Iker said:

Probably I should start putting together a FAQ on the first thread page:

 

Typically, it works fine to delete datasets if you unmount them first (mountpoint=none).

 

 

5 hours ago, KillerK said:

I watched SpaceInvaderOne's video detailing the difference between folders and ZFS datasets and how to convert them to make use of snapshots but I can see little use in that process for me and would prefer off-site backups over snapshots (I will consider this more though).

 

You can still back up off-site if you're using snapshots. If your off-site server is also running zfs, you can also back up with snapshots included. Unless you're so low on space that you can't, snapshots are too good of a tool not to use them for all important data. Using datasets for almost everything is also good zfs practice, especially if you want to play with tunables later.

 

 

3 hours ago, Revan335 said:

But when you have the Legacy Snapshots under system is something wrong.

 

When the docker storage method is directory and the volume is zfs, this is expected behaviour and nothing is wrong. Just hide them from the plugin to avoid clutter.

  • Thanks 1
Link to comment
18 hours ago, Revan335 said:

 

4 hours ago, Revan335 said:

Exclusive Shares: https://docs.unraid.net/de/unraid-os/release-notes/6.12.0/#exclusive-shares

 

A New Feature for/from 6.12.

 

3 hours ago, KillerK said:

Which Guide are you meaning sorry, maybe I've misunderstood and not read/watched the correct one?

This one.

I must show I which but I think the ordering is on the Main Thread and the Release Documentation that are also linked on that thread.

Link to comment
46 minutes ago, Renegade605 said:

You can still back up off-site if you're using snapshots. If your off-site server is also running zfs, you can also back up with snapshots included. Unless you're so low on space that you can't, snapshots are too good of a tool not to use them for all important data. Using datasets for almost everything is also good zfs practice, especially if you want to play with tunables later.

Thanks, space isn't an issue so I'll take your feedback onboard, I'm now looking to move my docker appdata anyway to get the data on an exclusive share so I can migrate to datasets as part of this process. Unfortunately my remote storage isn't ZFS, at least not to me...Google Drive is the best I can do.

 

49 minutes ago, Renegade605 said:

When the docker storage method is directory and the volume is zfs, this is expected behaviour and nothing is wrong. Just hide them from the plugin to avoid clutter.

Appreicate this confirmation also.

Link to comment

This on is the right Entry:

On 12/17/2023 at 3:08 PM, Revan335 said:

Es ist daher wichtig die Anleitung von Unraid für den neuen Default Pfad zu befolgen, damit der Ordner vor Dienst Start schon existiert und nicht automatisch erstellt wird.

 

Diese Legacy Snapshots sind nämlich wie auch schon im Thread vermutet Automatische Snapshots vom Docker Dienst der die ZFS Funktionalitäten dafür nutzt. Für die jeweiligen Docker Container und dessen Layer und andere Bestandteile die man installiert hat. Wenn man bspw. einen seiner Docker Container löschen würde, dann würden die zugehörigen Legacy Snapshots auch wieder verschwinden.

 

Sollte es immer noch nicht klappen, wäre eine Formatierung des Cache noch ne Idee, damit man einmal Clean starten kann.

Link to comment
7 hours ago, Renegade605 said:

 

 

Typically, it works fine to delete datasets if you unmount them first (mountpoint=none).

 

 

I ended up disabling Docker to delete the datasets - not an obvious thing to know but I'll know going forward

Link to comment

Hi all,

recently the plugin isnt showing anything on the main page.

It worked fine in the beginning.

I have rebooted and reinstalled the plugin nothing helps to get my zfs informations back.

Any idea what i can do or what happened here?
Im on Version 6.12.10 2024-04-03


image.png.4d1e395b06a15f565a768f453e9ccbb6.png

Edited by Tullaris
Link to comment

I havent change anything since i first installed the plugin successfull months ago.

It was always running with this exact same settings.
Even if i write a dataset into the box it doesnt show anything.

 

image.png.77aa36b948eb3fbce4b66d8281fab0ee.png

 

Also its still creating snapshots like intended in the backround for example:

cache/vm/Windows 10@simplesnap_2024-04-25-22:47:01              5.80M      -     30.1G  -

It just doenst show anything in the main tab from one day to another and i dont get it back to work.


image.png.dabc144ed544a13c09a21aac23047d02.png

image.thumb.png.17856d43e3e5410c60de67d2971c920c.png

Edited by Tullaris
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.