Skip to contentSkip to conversation

thin handling of available space

linux-lvm matthew patton 3 participants 3 messages May 3, 2016 – May 4, 2016 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

On Mon, 5/2/16, Mark Mielke <[email protected]> wrote:

<quote>
very small use case in reality. I think large service providers would use Ceph or EMC or NetApp, or some such technology to provision large amounts of storage per customer, and LVM would be used more at the level of a single customer, or a single machine.
</quote>

Ceph?!? yeah I don't think so.

If you thin-provision an EMC/Netapp volume and the block device runs out of blocks (aka Raid Group is full) all volumes on it will drop OFFLINE. They don't even go RO. Poof, they disappear. Why? Because there is no guarantee that every NFS client, every iSCSI client, every FC client is going to do the right thing. The only reliable means of telling everyone "shit just broke" is for the asset to disappear.

All in-flight writes to the volume that the array ACK'd are still good even if they haven't been de-staged to the intended device thanks to NVRAM and the array's journal device.

<quote>
In these cases, I
would expect that LVM thin volumes should not be used across multiple customers without understanding the exact type of churn expected, to understand what the maximum allocation that would be required.
</quote>

sure, but that spells responsible sysadmin. Xen's post implied he didn't want to be bothered to manage his block layer that magically the FS' job was to work closely with the block layer to suss out when it was safe to keep accepting writes. There's an answer to "works closely with block layer" - it's spelled BTRFS and ZFS.

LVM has no obligation to protect careless sysadmins doing dangerous things from themselves. There is nothing wrong with using THIN every which way you want just as long as you understand and handle the eventuality of extent exhaustion. Even thin snaps go invalid if it needs to track a change and can't allocate space for the 'copy'.

Responsible usage has nothing to do with single vs multiple customers. Though Xen broached the 'hosting' example and in the cut-rate hosting business over-provisioning is rampant. It's not a problem unless the syadmin drops the ball.

Quoted 1 line

Amazon would make sure to have enough storage to meet my requirement if I need them.

Yes, because Amazon is a RESPONSIBLE sysadmin and has put in place tools to manage the fact they are thin-provisoning and to make damn sure they can cash the checks they are writing.

Â

Quoted 2 lines

the nature of the block device, such as "how much space do you *really* have left?"

So you're going to write and then backport "second guess the block layer" code to all filesystems in common use and god knows how many versions back? Of course not. Just try to get on the EXT developer mailing list and ask them to write "block layer second-guessing code (aka branch on device flag=thin)" because THINP will cause problems for the FS when it runs out of extents. To which the obvious and correct response will be "Don't use THINP if you're not prepared to handle it's pre-requisites."

Quoted 4 lines

you and the other people. You think the block storage should be as transparent as possible, as if the storage was not thin. Others, including me, think that this theory is impractical

Then by all means go ahead and retrofit all known filesystems with the extra logic. ALL of the filesystems were written with the understanding that the block layer is telling the truth and that any "white lie" was benign in so much that it would be made good and thus could be assumed to be "truth" for practical purpose.

#2 lore raw

matthew patton schreef op 03-05-2016 15:01:

Quoted 1 line

Ceph?!? yeah I don't think so.

Mark's argument was nothing about comparing feature sets or something at this point. So I don't know what you are responding to. You respond like a bitten bee.

Read again. Mark Mielke described actual present-day positions. He described what he thinks is how LVM is positioning itself in conjunction with and with regards to other solutions in industry. He described that to his mind the bigger remote storage solutions do not or would not easily or readily start using LVM for those purposes, while the smaller scale or more localized systems would.

He described a layering solution, that you seem to be allergic to. He described a modularized system where thin is being used both at the remote backend (using a different technology) and at the local end (using LVM) for different purposes but achieving much of the same results.

He described how he considered the availability of the remote pool a responsibility for that remote supplier (and paying good money for it) while having different uses cases for LVM thin himself or themselves.

And I did think he made a very good case for this. I absolutely believe his use case is the most dominant and important one for LVM. LVM is for local systems.

In this case it is a local system running storage on a remote backend. Yet the local system has different requirements and uses LVM thin for a different purpose.

And this purpose falls along the lines of having cheap and freely available snapshots.

And he still feels and believes, apparently, that using the LVM admin tools for ensuring the stability of his systems might not be the most attractive and functional thing to do.

You may not agree with that but it is what he believes and feels. It is a real life data point, if you care about that.

Sometimes people's opinions actually simply just inform you of the world. It is information. It is not something to fight or disagree with, it is something to take note of.

The better you are able to respond to these data points, the better you are aware of the system you are dealing with. That could be real people paying or not paying you money.

However if you are going to fight every opinion that disagrees with you, you will never get to the point of actually realizing that they are just opinions and they are a wealth of information if you'd make use of it.

And that is not a devious thing to do if you're thinking that. It is being aware. Nothing more, nothing less.

And we are talking about awareness here. Not surprising then that the people most vehemently opposing this also seem to be the people least aware of the fact that real people with real uses cases might find the current situation not practical.

Mr. Zdenek can say all he wants that the current situation is very practical.

If that is not a data point but an opinion (not of someone experiencing it, but someone who wants certain people to experience certain things) then we must listen to actual data points and not what he wants.

Mr. Zdenek (I haven't responded to him here now) also responds like a bitten bee to simple allusions that Red Hat might be thinking this or that.

Not just stung by a bee. A bee getting stung ;-).

I mean come on people. You have nothing to lose. Either it is a good idea or it isn't. If it gets support, maybe someone will implement it and deliver proof of concept. But if you go about shooting it down the moment it rears its ugly (or beautiful) head you also ensure that that developer time is not going to be spend on it even if it were an asset to you.

Someone discussing a need might not always be that person that in the end is not going to do anything himself.

You are trying to avoid work but in doing so you avoid work being done for you as well.

It's give or take, it's plus plus.

Don't kill other people's ideas and maybe they start doing work for you too.

Oh yeah. Sorry if I'm being judgmental or belligerent (or pedantic):

The great irony and tragedy of the Linux world is this:

Someone comes with a great idea that he/she believes in and wants to work on.

They shoot it down.

Next they complain why there are so very few volunteers.

They can ban someone on a mailing list one instant and out loud wonder how they can attract more interest to their system, the next.

Not unrelated.

Quoted 5 lines

sure, but that spells responsible sysadmin. Xen's post implied he didn't want to be bothered to manage his block layer that magically the FS' job was to work closely with the block layer to suss out when it was safe to keep accepting writes. There's an answer to "works closely with block layer" - it's spelled BTRFS and ZFS.

It is not my block layer. I'm not the fucking system admin.

I can only talk to the FS. Or that might very well be the case for my purposes here.

It is pretty amazing that any attempt to separate responsibilities in actuality is met with a rebuttal that insists one use a solution that mingles everything.

In your ideal world then, everyone is forced to use BTRFS/ZFS because at least these take the worries away from the software/application designer.

And you ensure a beautiful world without LVM because it has no purpose.

As as software developer I cannot depend on your magical solution and assertion that every admin out there is going to be this amazing person that never makes a mistake.

Quoted 4 lines

Responsible usage has nothing to do with single vs multiple customers. Though Xen broached the 'hosting' example and in the cut-rate hosting business over-provisioning is rampant. It's not a problem unless the syadmin drops the ball.

What if I want him to be able to drop the ball and still survive?

What about designing systems that are actually failsafe and resilient?

What about resilience?

What about goodness?

What about quality?

What about good stuff?

Why do you feed your admins bad stuff just so that they can shine and consider themselves important?

Quoted 8 lines

So you're going to write and then backport "second guess the block layer" code to all filesystems in common use and god knows how many versions back? Of course not. Just try to get on the EXT developer mailing list and ask them to write "block layer second-guessing code (aka branch on device flag=thin)" because THINP will cause problems for the FS when it runs out of extents. To which the obvious and correct response will be "Don't use THINP if you're not prepared to handle it's pre-requisites."

So you are basically suggesting a solution that you know will fail, but still you recommend it.

That spells out "I don't know how to achieve my goals" like no other thing.

But you still think people should follow your recommendations.

What you say is completely anemic to how the open source world works.

You do not ask people to do your work for you.

Why do you even insist on recommending that. And then when you (in your imagination here) do ask those people to do it for you, they refuse. No small wonder.

Still you consider that a good way to approach things. To depend on someone else to do your work for you.

Really.

"Of course not. Just try to get on the EXT developer mailing list and ask them to..."

Yes I am ridiculing you.

You were sincere in saying those words. You ridicule yourself.

Of course you would start designing patches and creating a workable solution with yourself as the main leader or catalyst of that project. There is not other way to do things in life. You should know that.

Quoted 5 lines

Then by all means go ahead and retrofit all known filesystems with the extra logic. ALL of the filesystems were written with the understanding that the block layer is telling the truth and that any "white lie" was benign in so much that it would be made good and thus could be assumed to be "truth" for practical purpose.

Maybe we should also retrofit all unknown filesystems and those that might be designed on different planets. Yeah, that would be a good way to approach things.

I really want to follow your recommendations here. If I do, I will have good chances of achieving success.

#3 lore raw
In reply to matthew patton
Quoted 11 lines · matthew patton

On Mon, 5/2/16, Mark Mielke <[email protected]> wrote:
<quote>
very small use case in reality. I think large service providers would use Ceph or EMC or NetApp, or some such technology to provision large amounts of storage per customer, and LVM would be used more at the level of a single customer, or a single machine.
</quote>

Ceph?!? yeah I don't think so.

I don't use Ceph myself. I only listed it as it may be more familiar to others, and because I was responding to a Red Hat engineer. We use NetApp and EMC for the most part.

Quoted 7 lines

If you thin-provision an EMC/Netapp volume and the block device runs out of blocks (aka Raid Group is full) all volumes on it will drop OFFLINE. They don't even go RO. Poof, they disappear. Why? Because there is no guarantee that every NFS client, every iSCSI client, every FC client is going to do the right thing. The only reliable means of telling everyone "shit just broke" is for the asset to disappear.

I think you are correct. Based upon experience, I don't recall this ever happening, but upon reflection, it may just be that our IT team always caught the situation before it became too bad, and either extended the storage, or asked permission to delete snapshots.

Quoted 4 lines

All in-flight writes to the volume that the array ACK'd are still good even if they haven't been de-staged to the intended device thanks to NVRAM and the array's journal device.

Right. A good feature. An outage occurs, but the data that was properly written stays written.

<quote>

Quoted 7 lines

In these cases, I
would expect that LVM thin volumes should not be used across multiple customers without understanding the exact type of churn expected, to understand what the maximum allocation that would be required.
</quote>

Quoted 6 lines

sure, but that spells responsible sysadmin. Xen's post implied he didn't want to be bothered to manage his block layer that magically the FS' job was to work closely with the block layer to suss out when it was safe to keep accepting writes. There's an answer to "works closely with block layer" - it's spelled BTRFS and ZFS.

I get a bit lost here in the push towards BTRFS and ZFS for people with these expectations as I see BTRFS and ZFS as having a similar problem. They can both still fill up. They just might get closer to 100% utilization before they start to fail.

My use case isn't about reaching closer to 100% utilization. For example, when I first proposed our LVM thinp model for dealing with host-side snapshots, there were people in my team that felt that "fstrim" should be run very frequently (even every 15 minutes!), so as to make maximum use of the available free space across multiple volumes and reduce churn captured in snapshots. I think anybody with this perspective really should be looking at BTRFS or ZFS. Myself, I believe fstrim should run once a week or less, and not really to save space, but more to hint to the flash device which blocks are definitely not in use over time, to make the best use of the flash storage over time. If we start to pass 80%, I raise the alarm that we need to consider increasing the local storage, or moving more content out of the thin volumes. Usually we find out that more-than-normal churn occurred, and we just need to prune a few snapshots to drop below 50% again. I still made them move the content that doesn't need to be snapshot out of the thin volume, and to a stand-alone LVM thick volume so as to entirely eliminate this churn from being trapped in snapshots and accumulating.

LVM has no obligation to protect careless sysadmins doing dangerous things

Quoted 5 lines

from themselves. There is nothing wrong with using THIN every which way you want just as long as you understand and handle the eventuality of extent exhaustion. Even thin snaps go invalid if it needs to track a change and can't allocate space for the 'copy'.

Right.

Quoted 7 lines

Amazon would make sure to have enough storage to meet my requirement if I need them.

Yes, because Amazon is a RESPONSIBLE sysadmin and has put in place tools to manage the fact they are thin-provisoning and to make damn sure they can cash the checks they are writing.

Right.

Quoted 11 lines
Quoted 2 lines

the nature of the block device, such as "how much space do you *really* have left?"

So you're going to write and then backport "second guess the block layer" code to all filesystems in common use and god knows how many versions back? Of course not. Just try to get on the EXT developer mailing list and ask them to write "block layer second-guessing code (aka branch on device flag=thin)" because THINP will cause problems for the FS when it runs out of extents. To which the obvious and correct response will be "Don't use THINP if you're not prepared to handle it's pre-requisites."

Bad things happen. Sometimes they happen very quickly. I don't intend to dare fate, but if fate comes knocking, I prefer to be prepared. For example, we had two monitoring systems in place for one particularly critical piece of storage, where the application is particularly poor at dealing with "out of space". No thin volumes in use here. Thick volumes all the way. The system on the storage appliance stopped sending notifications a few weeks prior as a result of some mistake during a reconfiguration or upgrade. The separate monitoring system using entirely different software and configuration, on different host, also failed for a different reason that I no longer recall. The volume became full, and the application data was corrupted in a bad way that required recovery. My immediate reaction after best addressing the corruption, was to demand three monitoring systems instead of two. :-)

Quoted 9 lines
Quoted 4 lines

you and the other people. You think the block storage should be as transparent as possible, as if the storage was not thin. Others, including me, think that this theory is impractical

Then by all means go ahead and retrofit all known filesystems with the extra logic. ALL of the filesystems were written with the understanding that the block layer is telling the truth and that any "white lie" was benign in so much that it would be made good and thus could be assumed to be "truth" for practical purpose.

I think this relates more closely to your other response, that I will respond to separately...

Signature · 1 line
Mark Mielke <[email protected]>