Thread (28 messages) 28 messages, 6 authors, 2017-10-10

Re: mdadm: Patch to restrict --size when shrinking unless forced

From: Phil Turmel <hidden>
Date: 2017-10-10 13:12:29

On 10/09/2017 08:07 PM, Wakko Warner wrote:
On a side note, is it possible for the lower layers to know what the last
used sector is?
No.  Upper layers can use the device content in any order desired.
IE lvm ontop of raid and has 10% allocated and the last
sector is around the 10% mark.  (If this were possible --force would be,
required if shrinking would result in inaccessible data)
LVM has a number of allocation policies, including selecting space at
the end instead of beginning.  And it won't relocate anything (on its
own) when gaps open.  Lower layers simply can't assume anything at all.
I recently did a shrink of 4x 2tb drives so that I could replace the 2tb
drives with 80gb drives (yes, big shrink!)  Would have been nice for mdadm
to know the smallest size was that wouldn't destroy my lvm volumes that were
on top.
Only LVM can know.

Phil
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help