Discussion:
new create policy
Brenden Carvalho
2016-11-28 06:38:26 UTC
Permalink
Hello,

I want to request a new create policy,

create=top
Select the highest writeable branch

Writes to the highest writable branch, irrespective if the parent directory exists or not (If the parent directory doesn’t exist it is created, Same as when there is only one RW branch).

But if a file is to be deleted which exists on a lower branch its deleted from the lower branch (as usual).

I would really appreciate it, if you could implement this feature.

--
Brenden
s***@users.sourceforge.net
2016-11-28 06:51:56 UTC
Permalink
Hello Brenden,

Brenden Carvalho:
> I want to request a new create policy,
>
> create=top
> Select the highest writeable branch

Hmm, let me make sure.
You have multiple writable branches, and what would you do when the
highest branch gets full and you cannot create a new file anymore? Which
branch do you want to choose by what policy?


J. R. Okajima

------------------------------------------------------------------------------
Brenden Carvalho
2016-11-28 08:21:44 UTC
Permalink
Hello,

The policy should be similar to create=mfs,
But instead of writing to the branch in order of free space,
It should write to the highest branch. If that highest branch gets full, it can write to the next highest branch

Is it possible to implement such a feature?

Thanks,
Brenden
s***@users.sourceforge.net
2016-11-28 21:58:26 UTC
Permalink
Brenden Carvalho:
> The policy should be similar to create=mfs,
> But instead of writing to the branch in order of free space,
> It should write to the highest branch. If that highest branch gets full, it can write to the next highest branch

Hmm, I remember that I have discussed such feature in 2010.
As you might know, the default policy is
.B create=tdp | top\-down\-parent
Select the highest branch where the parent dir exists. If this
branch is not writable, internal copyup will happen.
The policy for this copyup is always `bottom\-up.'
This is the default policy.

If I add a new policy "top-down" which is similar to "top-down-parent"
but doesn't care about the parent dir. Also another new policy
"top-down-free-space[:low]" may be good. The optional parameter is
similar to "create=mfsrr:low[:second]", but this new policy will try
next in the branch hierarchy.
.B create=mfsrr:low[:second]
Selects a writable branch in most\-free\-space mode first, and then
round\-robin mode. If the selected branch has less free space than the
specified value `low' in bytes, then aufs re-tries in round\-robin mode.
.\" `G', `M' and `K' (case insensitive) can be followed after `low.' Or
Try an arithmetic expansion of shell which is defined by POSIX.
For example, $((10 * 1024 * 1024)) for 10M.
You can also specify the duration (`second') which is equivalent to
the `mfs' mode.


> Is it possible to implement such a feature?

Possible.
But unfortunately I don't have enough time to do it. Can you wait for a
few months?


J. R. Okajima

------------------------------------------------------------------------------
Brenden Carvalho
2016-11-29 04:26:46 UTC
Permalink
Hello,

Yes that is exactly what I need, Glad to know its possible.

Although, I was hoping for a quick turnaround on this,
I thought most of the logic/code needed should already be present in the other create policies just implemented differently.

A couple of months is a long time, if possible could you do it a bit quicker? Atleast the "top-down" policy part, the free space policy could be done later, I would really appreciate it,
If not then no worries I totally understand.

Thanks,
Brenden

------------------------------------------------------------------------------
s***@users.sourceforge.net
2016-11-29 12:52:02 UTC
Permalink
Brenden Carvalho:
> Although, I was hoping for a quick turnaround on this,=20
> I thought most of the logic/code needed should already be present in the ot=
> her create policies just implemented differently.
>
> A couple of months is a long time, if possible could you do it a bit quicke=
> r? Atleast the "top-down" policy part, the free space policy could be done =
> later, I would really appreciate it,
> If not then no worries I totally understand.

Basically you are right.
Almost all necessary parts and schemes are already implemented, and the
rest of work is to combine them and build a new policy.
But unforunately, as you might know, I am suspending aufs work in these
days. And this situation will continue to the end of this year at least.


J. R. Okajima

------------------------------------------------------------------------------
s***@users.sourceforge.net
2016-12-13 12:09:38 UTC
Permalink
Hi Brenden,

Brenden Carvalho:
> Yes that is exactly what I need, Glad to know its possible.
>
> Although, I was hoping for a quick turnaround on this,=20
> I thought most of the logic/code needed should already be present in the ot=
> her create policies just implemented differently.

I've just started designing the new policy.
At the same time, I noticed I forgot one aufs feature, rather less
popular one. It is FHSM (File-based Hierarchy Storage Management) and
move-down (opposite of copy-up). I'd like to suggest you to try it.

- build aufs with CONFIG_AUFS_FHSM enabled
- build aufs-util with BuildFHSM=yes
- specify 'fhsm' attribute for your all writable branches
- customize the watermarks by a utility named "aufhsm" in aufs-tuil, if
you want.

then the userspace daemon "aufshsmd" will monitor the free space of
'fhsm' branches and move the files down from upper to lower branches if
necessary.


J. R. Okajima
Loading...