Jump to content

[Plugin] LXC Plugin


Recommended Posts

On 9/21/2024 at 12:45 AM, ich777 said:

This should not happen and I‘m not able to reproduce this on my test server.

 

I've duplicated the "Array" issue on another two machines. Seems like the magic recipe is that these servers have only pools, no array. The one pictured here has a pool consisting of a single NVME, and the other has a pool of 6 spinners in ZRAID2.

 

Screenshot2024-09-22at10_22_26AM.thumb.png.fdc6c7b2930edde008160e14c8e33bac.png

 

The issue is "repaired" by simply making an edit to the share, even something as simple as adding a comment and then applying.

 

Edited by Espressomatic
Link to comment
45 minutes ago, Espressomatic said:

Seems like the magic recipe is that these servers have only pools, no array.

That should also be no issue at all because the plugin creates the paths on it's own and is independent from the Array or a Cache pool as long as the directory is located directly on the pool.

 

Have you ever thought that this is a visual bug in the shares section?

Did you actually look in the terminal if the path was there and if you can create containers?

 

45 minutes ago, Espressomatic said:

The issue is "repaired" by simply making an edit to the share, even something as simple as adding a comment and then applying.

Then it's most likely an issue from the Shares section because the path was created not by Unraid itself and Unraid or better the Shares section has no idea where the path points to.

 

However it would be very interesting if you can create containers and see if the directory for LXC was properly created in the terminal, my assumption is that this is an issue with the Shares section and would maybe fix itself after a reboot.

 

45 minutes ago, Espressomatic said:

ZRAID2

I hope you are using ZFS as the Storage Backing Driver in the LXC plugin settings and not Directory...

Link to comment
11 minutes ago, ich777 said:

Have you ever thought that this is a visual bug in the shares section?

Did you actually look in the terminal if the path was there and if you can create containers?

 

It's not simply visual. Uncorrected, this issue prevents file copying in terminal, where it thinks the lxc destination is "full."

 

OK, I've definitively confirmed this isn't an issue with the plugin - it's an issue in Unraid 7beta itself.

 

$ mkdir /mnt/pool/testing

 

image.thumb.png.510f7326d972b4f99d8963ffaf2e2302.png

 

I'll post a bug report.

 

Edited by Espressomatic
Link to comment
6 minutes ago, Espressomatic said:

It's not simply visual. Uncorrected, this issue prevents file copying in terminal, where it thinks the lxc destination is "full."

Tanks for the explanation. :)

 

This is caused because you are using /mnt/user/... from the terminal, please always use the real file path not /mnt/user/... when specifying a path other then /mnt/user/... in a plugin <- that's actually your issue.

 

6 minutes ago, Espressomatic said:

From the plugin settings itself there's no issue, as I can create/install containers, I can open a terminal within the container and wget and apt install additional packages, etc.

Yup, that's actually why it's working, the plugin uses /mnt/nvme_pool/... not /mnt/user/...

 

There is nothing I can do about that.

If you want to copy files through /mnt/user/... you have to tell Unraid where the share is located and that it's main storage is the specified Pool, because Unraid has no idea what the main storage is.

 

I wouldn't recommend messing with the rootfs from a LXC container anyways because you can basically destroy the container if you do copy/change something.

 

 

I assume you didn't see that from my previous post:

12 minutes ago, ich777 said:

I hope you are using ZFS as the Storage Backing Driver in the LXC plugin settings and not Directory...

 

Link to comment
2 minutes ago, ich777 said:

Because you are using /mnt/user/... please always use the real file path not /mnt/user/... when specifying a path other then /mnt/user/... in a plugin <- that's actually your issue.

 

You misunderstood. I never use the FUSE "/mnt/user" path on my systems for anything (absolutely every share on every server I'm running uses pool storage directly). I was only showing what it looked like in there after using only the pool. I edited the previous post as I isolated this as an Unraid bug.

 

Any folder created inside the root of the pool causes this issue.

 

 

Edited by Espressomatic
Link to comment
1 minute ago, Espressomatic said:

I edited the previous post as I isolated this as an Unraid bug.

Already saw that but I don't think that this is a bug or at least not easy to solve because Unraid has no idea where the "source" share comes from and simply has no idea what's it's main storage is so it defaults to Array, which in your case is wrong.

Link to comment

I don't know how easy it'll be to fix, but the issue is caused by making a directory (on the ZFS pool), whereas using the Shares UI to create a new share creates a ZFS Dataset (which doesn't show the issue).

 

I'm going to try this on a server where I have some extra disks and where I can make an array device - interested to see what happens.

Edited by Espressomatic
Link to comment
2 minutes ago, Espressomatic said:

on the ZFS pool

I mean I know that this is also true if you do that on a BTRFS pool but this was never a bug to me because of the above explained reason (share was not created by Unraid and it default‘s to the Array).

 

3 minutes ago, Espressomatic said:

which doesn't show the issue

Because Unraid creates the config file for the share on it‘s own when you create a share through the GUI, which the LXC plugin can‘t do.

Link to comment
1 hour ago, ich777 said:

I hope you are using ZFS as the Storage Backing Driver in the LXC plugin settings and not Directory...

 

I am now. ;)  I took the opportunity to create the lxc share via the Unraid dashboard on the pool so it's created as a dataset. Everything running well as expected.

 

 

Link to comment
3 hours ago, Espressomatic said:

I am now. ;)  I took the opportunity to create the lxc share via the Unraid dashboard on the pool so it's created as a dataset. Everything running well as expected.

What? This is not what you should do, there is a simple setting for that in the plugin... ;)

grafik.thumb.png.60dab89f78ef2a06e182006fb3690e9f.png

 

The plugin will create it's own dataset (alongside with the LXC directory to edit the actual files), please read the help text, I've even implemented a feature to Unraid where you can convert existing containers to it's specific Backing Storage Type.

Link to comment

No worries. The result is the same. ZFS is listed as the backer in the plugin and the container storage is a dataset. The container is working correctly, auto-start, stop, etc. The plugin is working correctly, including the ability to make snapshots.

 

Kudos on the extensive help. I wasn't aware it existed as I didn't even think to check - so many ppl skip that so my first instinct is to assume it doesn't exist. :)

Edited by Espressomatic
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.

×
×
  • Create New...