* ubi resize shrink volume
@ 2017-09-15 6:34 Jaap de Jong
2017-09-15 18:30 ` Richard Weinberger
0 siblings, 1 reply; 6+ messages in thread
From: Jaap de Jong @ 2017-09-15 6:34 UTC (permalink / raw)
To: linux-mtd@lists.infradead.org
Hi All!
I've seen a several (old) posts regarding this subject and I was
wondering what the status at this moment is.
Is there any implementation available that is able to shrink a ubi
volume, so that it will move used blocks at the end to the front?
Thanks in advance!
Jaap de Jong
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ubi resize shrink volume
2017-09-15 6:34 ubi resize shrink volume Jaap de Jong
@ 2017-09-15 18:30 ` Richard Weinberger
2017-09-18 6:34 ` Jaap de Jong
0 siblings, 1 reply; 6+ messages in thread
From: Richard Weinberger @ 2017-09-15 18:30 UTC (permalink / raw)
To: Jaap de Jong; +Cc: linux-mtd@lists.infradead.org
On Fri, Sep 15, 2017 at 8:34 AM, Jaap de Jong <jaap.dejong@nedap.com> wrote:
> Hi All!
>
> I've seen a several (old) posts regarding this subject and I was wondering
> what the status at this moment is.
>
> Is there any implementation available that is able to shrink a ubi volume,
> so that it will move used blocks at the end to the front?
Not sure if I got your use case, but you can do this in userspace.
If you're asking whether it is possible to shrink UBIFS, no, this is
not possible.
--
Thanks,
//richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ubi resize shrink volume
2017-09-15 18:30 ` Richard Weinberger
@ 2017-09-18 6:34 ` Jaap de Jong
2017-09-18 7:06 ` Richard Weinberger
0 siblings, 1 reply; 6+ messages in thread
From: Jaap de Jong @ 2017-09-18 6:34 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-mtd@lists.infradead.org
On 15-09-17 20:30, Richard Weinberger wrote:
> On Fri, Sep 15, 2017 at 8:34 AM, Jaap de Jong <jaap.dejong@nedap.com> wrote:
>> Hi All!
>>
>> I've seen a several (old) posts regarding this subject and I was wondering
>> what the status at this moment is.
>>
>> Is there any implementation available that is able to shrink a ubi volume,
>> so that it will move used blocks at the end to the front?
> Not sure if I got your use case, but you can do this in userspace.
>
> If you're asking whether it is possible to shrink UBIFS, no, this is
> not possible.
>
Sorry for the confusion.
Yes, I want to shrink of a not-mounted UBIFS preferably in u-boot.
In the posts I read it should not be that hard to do, so I was wondering
if anyone had taken the effort to implement this...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ubi resize shrink volume
2017-09-18 6:34 ` Jaap de Jong
@ 2017-09-18 7:06 ` Richard Weinberger
2017-09-18 12:32 ` Jaap de Jong
0 siblings, 1 reply; 6+ messages in thread
From: Richard Weinberger @ 2017-09-18 7:06 UTC (permalink / raw)
To: Jaap de Jong, linux-mtd@lists.infradead.org
Am Montag, 18. September 2017, 08:34:34 CEST schrieb Jaap de Jong:
> On 15-09-17 20:30, Richard Weinberger wrote:
> > On Fri, Sep 15, 2017 at 8:34 AM, Jaap de Jong <jaap.dejong@nedap.com>
wrote:
> >> Hi All!
> >>
> >> I've seen a several (old) posts regarding this subject and I was
> >> wondering
> >> what the status at this moment is.
> >>
> >> Is there any implementation available that is able to shrink a ubi
> >> volume,
> >> so that it will move used blocks at the end to the front?
> >
> > Not sure if I got your use case, but you can do this in userspace.
> >
> > If you're asking whether it is possible to shrink UBIFS, no, this is
> > not possible.
>
> Sorry for the confusion.
> Yes, I want to shrink of a not-mounted UBIFS preferably in u-boot.
> In the posts I read it should not be that hard to do, so I was wondering
> if anyone had taken the effort to implement this...
Nope. So far nobody cared enough about this feature.
Please note that many other major filesystems alos don't support this.
Such das XFS.
Thanks,
//richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ubi resize shrink volume
2017-09-18 7:06 ` Richard Weinberger
@ 2017-09-18 12:32 ` Jaap de Jong
2017-09-18 13:29 ` Richard Weinberger
0 siblings, 1 reply; 6+ messages in thread
From: Jaap de Jong @ 2017-09-18 12:32 UTC (permalink / raw)
To: Richard Weinberger, linux-mtd@lists.infradead.org
On 18-09-17 09:06, Richard Weinberger wrote:
> Am Montag, 18. September 2017, 08:34:34 CEST schrieb Jaap de Jong:
>> On 15-09-17 20:30, Richard Weinberger wrote:
>>> On Fri, Sep 15, 2017 at 8:34 AM, Jaap de Jong <jaap.dejong@nedap.com> wrote:
>>>> Hi All!
>>>>
>>>> I've seen a several (old) posts regarding this subject and I was
>>>> wondering
>>>> what the status at this moment is.
>>>>
>>>> Is there any implementation available that is able to shrink a ubi
>>>> volume,
>>>> so that it will move used blocks at the end to the front?
>>> Not sure if I got your use case, but you can do this in userspace.
>>>
>>> If you're asking whether it is possible to shrink UBIFS, no, this is
>>> not possible.
>> Sorry for the confusion.
>> Yes, I want to shrink of a not-mounted UBIFS preferably in u-boot.
>> In the posts I read it should not be that hard to do, so I was wondering
>> if anyone had taken the effort to implement this...
> Nope. So far nobody cared enough about this feature.
> Please note that many other major filesystems alos don't support this.
> Such das XFS.
>
Well we do care!
Any thoughts to share? We could use some help...
My first impression was that the size of the partition was just a
maximum number of PEBs to use for it,
so lowering that value would just set a new limit and whatever PEBs were
used for that specific partition
was under control of the wear-levelling algorithms. But apparently it is
more complicated.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ubi resize shrink volume
2017-09-18 12:32 ` Jaap de Jong
@ 2017-09-18 13:29 ` Richard Weinberger
0 siblings, 0 replies; 6+ messages in thread
From: Richard Weinberger @ 2017-09-18 13:29 UTC (permalink / raw)
To: Jaap de Jong; +Cc: linux-mtd@lists.infradead.org
Am Montag, 18. September 2017, 14:32:56 CEST schrieb Jaap de Jong:
> >> Sorry for the confusion.
> >> Yes, I want to shrink of a not-mounted UBIFS preferably in u-boot.
> >> In the posts I read it should not be that hard to do, so I was wondering
> >> if anyone had taken the effort to implement this...
> >
> > Nope. So far nobody cared enough about this feature.
> > Please note that many other major filesystems alos don't support this.
> > Such das XFS.
>
> Well we do care!
> Any thoughts to share? We could use some help...
> My first impression was that the size of the partition was just a
> maximum number of PEBs to use for it,
> so lowering that value would just set a new limit and whatever PEBs were
> used for that specific partition
> was under control of the wear-levelling algorithms. But apparently it is
> more complicated.
Well, on UBI level it is easy.
On UBIFS you need to do more.
Think about the situation where you have N LEBs where M are in use by UBIFS
and you reduce the volume size to X.
Assuming that all existing files can fit into X LEBs, therefore X >= M.
Now you have to find all UBIFS data structures that have a reference to a LEB
(> X) that is now outside of the new volume size. You have move data around
patch all references.
Thanks,
//richard
--
sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria
ATU66964118 - FN 374287y
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-09-18 13:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-15 6:34 ubi resize shrink volume Jaap de Jong
2017-09-15 18:30 ` Richard Weinberger
2017-09-18 6:34 ` Jaap de Jong
2017-09-18 7:06 ` Richard Weinberger
2017-09-18 12:32 ` Jaap de Jong
2017-09-18 13:29 ` Richard Weinberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox