Jump to content

Use Cache disk for Disk shares?


Recommended Posts

Posted

Hi,

 

I'm using cache for user shares, but is it possible to use cache disk for disk shares (ie. disk1, disk2, etc.)? Some of my disks are excluded from user shares as I don't want to "cross-pollination" the different files for disk management purposes. I like the write performance brought by using an SSD cache disk. I can't seem to find the cache disk setting for disk shares. Is it possible? 

 

Thanks,

 

Jason

Posted
1 hour ago, liujason said:

Hi,

 

I'm using cache for user shares, but is it possible to use cache disk for disk shares (ie. disk1, disk2, etc.)? Some of my disks are excluded from user shares as I don't want to "cross-pollination" the different files for disk management purposes. I like the write performance brought by using an SSD cache disk. I can't seem to find the cache disk setting for disk shares. Is it possible? 

 

Thanks,

 

Jason

Not possible as disk shares relate to physical devices.   The cache itself is one of the disk shares.

Posted
17 hours ago, itimpi said:

Not possible as disk shares relate to physical devices.   The cache itself is one of the disk shares.

The cache disk cannot cache the cache disk itself? 😉

 

Is there anyway to create share groups with different policies? Since I want to keep the disk1 & disk2 not be mixed with the other drives/shares, is it still possible to use cache for those two disks? (Is the solution to create share only spans disk1 and disk2, and the rest shares cross the other disks?)

Posted

I recommend not using disk shares at all. Disk shares have several ways to give you problems, including data loss. Just turn off disk shares completely.

 

You can restrict specific user shares to specific disks just as you want to do. Just use the "Include" setting for each user share. And you also get to use cache however you want for each share.

Posted (edited)
2 minutes ago, trurl said:

Disk shares have several ways to give you problems, including data loss.

Can you please elaborate? Also, should I also avoid assigning "/mnt/disk#" for Docker configs? (I've been doing this for many years, and never realize this is wrong). 

Edited by liujason
Posted

Mixing disk shares and user shares when moving or copying files can lead to data loss because linux doesn't understand that the source and destination could refer to the same file and so will try to overwrite what it needs to read, resulting in empty files.

 

Mostly I recommend not sharing disks on the network. In fact, if you don't share a disk, it isn't really a disk share, it is just a disk. If you need to work directly with a disk, do it on the server with mc (Midnight Commander) or krusader. And don't work with disks and user shares at the same time.

 

For some things like docker appdata, it can make sense to refer directly to a disk, usually cache.

 

And there are other ways you can get in trouble when specifying disk paths. For example, accidentally creating a user share named the same as a disk, such as /mnt/disk2/disk1. This is a user share named disk1, not even on disk1, since user shares are simply the top level folders on cache and array. But over the network SMB will not show both disk1 and a user share named disk1, so better to not even have disk1 on the network to avoid this confusion.

Posted (edited)

I recently upgraded to 6.9.0-beta25 on my test server and "cache" now appears under disk shares. Is this normal? I am pretty certain I never added any disk shares. Can I safely remove it? Also how do I permanently disable disk shares? I never intend to share the entire disk on my server whatsoever.

EDIT: Found the option to disable in "global share settings" ... but my question still remains for "cache".

Edited by nimaim
Posted
6 minutes ago, itimpi said:

Disk shares refer to physical devices (as opposed to User shares)- and cache is one of them.

Yes I understand the difference between disk and user shares, but should the "cache" disk itself be shared? Prior to 6.9.0, it was not so I'm just wondering if this is a "feature", bug, or something else.

Posted
1 hour ago, nimaim said:

Yes I understand the difference between disk and user shares, but should the "cache" disk itself be shared? Prior to 6.9.0, it was not so I'm just wondering if this is a "feature", bug, or something else.

I do not have an earlier release available at the moment to check but I am reasonably certain that the cache disk has always showed up as a share if you had disk shares enabled.   

  • Thanks 1
Posted
1 hour ago, itimpi said:

I do not have an earlier release available at the moment to check but I am reasonably certain that the cache disk has always showed up as a share if you had disk shares enabled.   

Ok I wasn't sure ... if this is the default, is it safe to disable disk shares then?

Posted
1 hour ago, nimaim said:

Ok I wasn't sure ... if this is the default, is it safe to disable disk shares then?

Disk shares ARE disabled by default.   They only get enabled if the user changes the setting to allow this.

Posted

And I recommend not sharing cache on the network, because as noted, cache is a disk included in user shares and so subject to all the problems already mentioned.

 

Only User Shares and Unassigned Devices should be accessible over the network.

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...