Skip to contentSkip to conversation

thin handling of available space

linux-lvm matthew patton 5 participants 13 messages Apr 28, 2016 – May 3, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 929635034.3140318.1461840230292.JavaMail.yahoo.ref@mail.yahoo.com

#1 lore raw
Quoted 3 lines
Quoted 3 lines

The real question you should be asking is if it increases the monitoring aspect (enhances it) if thin pool data is seen through the lens of the filesystems as well.

Then you want an integrated block+fs implementation. See BTRFS and ZFS. WAFL and friends.

Quoted 1 line

kernel for communication from lower fs layers to higher layers -

Correct. Because doing so violates the fundamental precepts of OS design. Higher layers trust lower layers. Thin Pools are outright lying about the real world to anything that uses it's services. That is its purpose. The FS doesn't give a damn that the block layer is lying to it, it can and does assume and rightly so that what the block layer says it has, it indeed does have. The onus of keeping the block layer ahead of the FS falls on a third party - the system admin. The system admin decided it was a bright idea to use thin pools in the first place so he necessarily signed up to be liable for the hazards and risks that choice entails. It is not the job of the FS to bail his ass out.

A responsible sysadmin who chose to use thin pools might configure the initial FS size to be some modest size well within the constraints of the actual block store, and then as the FS hit say 85% utilization to run a script that investigated the state of the block layer and use resize2fs and friends to grow the FS and let the thin-pool likewise grow to fit as IO gets issued. But at some point when the competing demands of other FS on thin-pool were set to breach actual block availability the FS growth would be denied and thus userland would get signaled by the FS layer that it's out of space when it hit 100% util.

Another way (haven't tested) to 'signal' the FS as to the true state of the underlying storage is to have a sparse file that gets shrunk over time.

But either way if you have a sudden burst of I/O from competing interests in the thin-pool, what appeared to be a safe growth allocation at one instant of time is not likely to be true when actual writes try to get fulfilled.

Think of mindless use of thin-pools as trying to cross a heavily mined beach. Bring a long stick and say your prayers because you'r likely going to lose a limb.

#2 lore raw

Let me just write down some thoughts here.

First of all you say that fundamental OS design is about higher layers trusting lower layers and that certain types of communications should then always be one way.

In this case it is about block layer vs. file system layer.

But you make certain assumptions about the nature of a block device to begin with.

A block device is defined by its acess method (ie. data organized in blocks) rather than its contigiousness or having an unchanging, "single block" address or access space. I know this goes pretty far but it is the truth.

In theory there is nothing against a hypothetical block device offering ranges of blocks to a higher level (that might never change) or to be dynamically notified of changes to that address pool.

To a process virtual memory is a space that is transparent to it whether that space is constructed of paged memory (swap file) or not. At the same time it is not impossible to imagine that an IO scheduler for swap would take heed of values given by applications, such as using nice or ionice values. That would be one way communication though.

In general a higher level should be oblivious to what kind of lower level layer it is running on, you are right. Yet if all lower levels exhibit the same kind of features, this point becomes moot, because at that point the higher level will not be able to know, once more, precisely what kind of layer it is running on, although it would have more information.

So just theoretically speaking the only thing that is required to be consistent is the API or whatever interface you design for it.

I think there are many cases where some software can run on some libraries but not on others because those other libraries do not offer the full feature set of whatever standard is being defined there. An example is DLNA/UPNP, these are not layers but the standard is ill-defined and the device you are communicating with might not support the full set.

Perhaps these are detrimental issues but there are plenty of cases where one type of "lower level" will suffice but another won't, think maybe of graphics drivers. Across the layer boundary, communication is two-way anyway. The block device *does* supply endless streams of data to the higher layer. The only thing that would change is that you would no longer have this "always one contigious block of blocks" but something that is slightly more volatile.

When you "mkfs" the tool reads the size of the block device. Perhaps subsequently the filessytem is unaware and depends on fixed values.

The feature I described (use case) would allow the set of blocks that is available, to dynamically change. You are right that this would apparently be a big departure from the current model.

So I'm not saying it is easy, perfect, or well understood. I'm just saying I like the idea.

I don't know what other applications it might have but it depends entirely on correct "discard" behaviour from the filesystem.

The filesystem should be unaware of its underlying device but discard is never required for rotating disks as far as I can tell. This is an option that assumes knowledge of the underlying device. From discard we can basically infer that either we are dealing with a flash device or something that has some smartness about what blocks it retains and what not (think cache).

So in general this is already a change that reflects changing conditions of block devices in general or its availability. And its characteristic behaviour or demands from filesystems.

These are block devices that want more information to operate (well).

Coincidentally, discard also favours or enhances (possibly) lvmcache.

So it's not about doing something wildly strange here, it's about offering a feature set that a filesystem may or may not use, or a block device may or may not offer.

Contrary to what you say, there is nothing inherently bad about the idea. The OS design principle violation you speak of is principle, not practical reality. It's not that it can't be done. It's that you don't want it to happen because it violates your principles. It's not that it wouldn't work. It's that you don't like it to work because it violates your principles.

At the same time I object to the notion of the system administrator being this theoretical vastly differing role/person than the user/client.

We have no in-betweens on Linux. For fun you should do a search of your filesystem with find -xdev based on the contents of /etc/passwd or /etc/group. You will find that 99% of files are owned by root and the only ones that aren't are usually user files in the home directory or specific services in /var/lib.

Here is a script that would do it for groups:

cat /etc/group | cut -d: -f1 | while read g; do printf "%-15s %6d" $g find / -xdev -type f -group $g | wc -l; done

Probably. I can't run it here it might crash my system (live dvd).

Of about 170k files on an OpenSUSE system, 15 were group writable, mostly due to my own interference probably. Of 170197 files (no xdev) 168161 were owned by root.

Excluding man and my user, 69 files did not have "root" as the group. Part of that was again due to my own changes.

At the same time in some debates your are presented with the ludicrous notion that there is some ideal desktop user who doesn't need to ever see anything of the internal system. She never opens a shell and certainly does not come across ethernet device names (for example). The "desktop user" does not care about the naming of devices from /dev/eth0 to /sys/class/net/enp3s0.

The desktop user never uses anything other than DHCP, etc. etc. etc.

The desktop user never can configure anything without the help of the admin, if it is slightly more advanced.

It's that user vs. admin dichotomy that is never true on any desktop system and I will venture it is not even true on the systems I am a client of, because you often need to debate stuff with the vendor or ask for features, offer solutions, etc.

In a store you are a client. There are employees and clients, nothing else. At the same time I treat these girls as my neighbours because they work in the block I live in.

You get the idea. Roles can be shifty. A person can use multiple roles at the same time. He/she can be admin and user simulaneously.

Perhaps you are correct to state that the roles themselves should not be watered down, that clear delimitations are required.

In your other email you allude to me not ever having done an OS design course.

Offlist a friendly member suggested strongly I not use personal attacks in my communications here. But of course this is precisely what you are doing here, because as a matter of fact I did follow such a course.

I don't remember the book we used because apparently between my house mate and me we only had one exemplar and he ended up getting it because I was usually the one borrowing stuff from him.

At the same time university is way beyond my current reach (in living conditions) so it is just an unwarranted allusion that does not have anything to do with anything really.

Yes I think it was the dinosaur book:

Operating System Concepts by Silberschatz, Galvin and Gagne

Anyway, irrelevant here.

Quoted 1 line

Another way (haven't tested) to 'signal' the FS as to the true state of the underlying storage is to have a sparse file that gets shrunk over time.

You do realize you are trying to find ways around the limitation you just imposed on yourself right?

Quoted 1 line

The system admin decided it was a bright idea to use thin pools in the first place so he necessarily signed up to be liable for the hazards and risks that choice entails. It is not the job of the FS to bail his ass out.

I don't think thin pools are that risky or should be that risky. They do incur a management overhead compared to static filesystems because of adding that second layer you need to monitor. At the same time the burden of that can be lessened with tools.

As it stands I consider thin LVM the only reasonably way to snapshot a running system without dedicating specific space to it in advance. I could expect snaphotting to require stuff to be in the same volume group. Without LVM thin, snapshotting requires making at least some prior investment in having a snapshot device ready for you in the same VG, right?

Quoted 1 line · Do not think btrfs and ZFS are without costs. You

Then you want an integrated block+fs implementation. See BTRFS and ZFS.

WAFL and friends.

But btrfs is not without complexity. It uses subvolumes that differ from distribution to distribution as each makes its own choice. It requires knowledge of more complicated tools and mechanics to do the simplest (or most meaningful) of tasks. Working with LVM is easier. I'm not saying LVM is perfect and....

Using snapshotting as a backup measure is something that seems risky to me at the first place because it is a "partition table" operation which really you shouldn't be doing on a consistent basis. So in other to effectively use it in the first place you require tools that handle the safeguards for you. Tools that make sure you are not making some command line mistake. Tools that simply guard against misuse.

Regular users are not fit for being btrfs admins either.

It is going to confuse the hell out of people seeing as that what their systems run on and if they are introduced to some of the complexity of it.

You say swallow your pride. It has not much to do with pride.

It has to do with ending up in a situation I don't like. That is then going to "hurt" me for the remainder of my days until I switch back or get rid of it.

I have seen NOTHING NOTHING NOTHING inspiring about btrfs.

Not having partition tables and sending volumes across space and time to other systems, is not really my cup of tea.

It is a vendor lock-in system and would result in other technologies being lesser developed.

I am not alone in this opinion either.

Btrfs feels like a form of illness to me. It is living in a forest with all deformed trees, instead of something lush and inspiring. If you've ever played World of Warcraft, the only thing that comes a bit close is the Felwood area ;-).

But I don't consider it beyond Plaguelands either.

Anyway.

I have felt like btrfs in my life. They have not been the happiest moments of my life ;-).

I will respond more in another mail, this is getting too long.

#3 lore raw
In reply to matthew patton

Continuing from previous mail I guess. But I realized something.

Quoted 9 lines

A responsible sysadmin who chose to use thin pools might configure the initial FS size to be some modest size well within the constraints of the actual block store, and then as the FS hit say 85% utilization to run a script that investigated the state of the block layer and use resize2fs and friends to grow the FS and let the thin-pool likewise grow to fit as IO gets issued. But at some point when the competing demands of other FS on thin-pool were set to breach actual block availability the FS growth would be denied and thus userland would get signaled by the FS layer that it's out of space when it hit 100% util.

Well of course what you describe here are increasingly complex strategies that require development and should not be put on invidual administrators (or even organisations) to devise and come up with.

Growing filesystems? If you have a platform where continous thin pool growth is possible (and we are talking of well developed, complex setups here) then maybe you have in-house tools to take care of all of that.

So you suggest a strategy here that involves both intelligent automatic administration of the FS layer as well as the block layer.

A concerted strategy where for example you do have a defined thin volume size but you constrain your FS artificially AND depend its intelligence on knowledge of your thin pool size. And then you have created an intelligence where the "filesystem agent" can request growth, and perhaps the "block level agent" may grant or deny it such that FS growth is staged and given hard limits at every point. And then you have the same functionality as what I described other than that it is more sanely constructed at intervals.

No continuous updating, but staged growth intervals or moments.

Quoted 4 lines

But either way if you have a sudden burst of I/O from competing interests in the thin-pool, what appeared to be a safe growth allocation at one instant of time is not likely to be true when actual writes try to get fulfilled.

So in the end monitoring is important but because you use a thin pool there are like 3 classes of situations that change:

* Filesystems will generally have more leeway because you are /able/ to provide them with more (virtual) space to begin with, in the assumption that you won't readily need it, but it's normally going to be there when it does.

* Hard limits in the filesystem itself is still a use case that has no good solution; most applications will start crashing or behaving weirdly when out of diskspace. Freezing a filesystem (when it is not a system disk) might be equally well of a good mitigation strategy as anything that involves "oh no, I am out of diskspace and now I am going to ensure endless trouble as processes keep trying to write to that empty space - that nonexistent space". If anything I don't think most systems gracefully recover from that.

Creating temporary filesystems for important parts is not all that bad.

* Thin volumes do allow you to make better use of the available space (as per btrfs, I guess) and give many advantages in moving data around.

The only detriment really to thin for a desktop power user, so to speak is:

1. Unless you monitor it directly in some way, the lack of information is going to make you feel rather annoyed and insecure

2. Normally user tools do inform you of system status (a user-run "ls" or "df" is enough) but you cannot have lvs information unless run as root.

The system-config-lvm tool just runs as setuid. I can add volumes without authenticating as root.

Regular command line tools are not accessible to the user.

So what I have been suggesting obviously seeks to address point 2. I am more than willing to address point 1 by developing something, but I'm not sure I will ever be able to develop again in this bleak sense of decay I am experiencing life to be currently ;-).

Anyhow, it would never fully satisfy for me.

Even with a perfect LVM monitoring tool, I would experience a consistent lack of feedback.

Just a simple example: I can adjust "df" to do different stuff. But any program reporting free diskspace is going to "lie" to me in that sense. So yes I've chosen to use thin LVM because it is the best solution for me right now.

At the same time indeed, I lack information and this information cannot be sourced directly from the block layer because that's not how computer software works. Computer software doesn't interface with the block layer. They interface with filesystems and report information from there.

Technically I consider autoextend not that great of a solution either.

It begs the question: why did you not start out with a larger volume in the first place? You going to keep adding disks as the thing grows?

I mean, I don't know. If I'm some VPS user and I'm running on a thinly-provisioned host. Maybe it's nice to be oblivious. But unless my host has a perfect failsafe setup, the only time I am going to be notified of failure is if my volume (that I don't know about) drops or freezes.

Would I personally like having a tool that would show at some point something going wrong at the lower level? I think I would.

An overprovisioned system with individual volumes that individually cannot reach their max size is a bad system.

That they can't do it all at the same time is not that much of a problem. That is not very important.

Yet considering a different situation -- suppose this is a host with few clients but high data requirements. Suppose there are only 4 thin volumes. And suppose every thin volume is going to be something of 2TB or make it anything as large as you want.

(I just have 50GB on my vps). Suppose you had a 6TB disk and you provisioned it for 4 clients x 2TB. Economies of scale only start to really show their benefit with much higher number of clients. With 200 clients the "averaging" starts to work in your favour giving you a dependable system that is not going to suddenly do something weird.

But with smaller numbers you do run into the risk of something going amiss.

The only reason lack of feedback would not be important for your clients is if you had a large enough pool, and individual volumes would be just a small part of that pool, say 50-100 volumes per pool.

So I guess I'm suggesting there may be a use case for thin LVM in which you do not have this >10 number of volumes sitting in any pool.

And at that point personally even if I'm the client of that system, I do want to be informed.

And I would prefer to be informed *through* the pipe that already exists.

Thin pools lie. Yes. But it's not a lie of the space is available. It's only a lie if the space is no longer available!!!!!!!.

It is not designed to lie.

#4 lore raw
Quoted 32 lines · Xen

Continuing from previous mail I guess. But I realized something.

Quoted 9 lines

A responsible sysadmin who chose to use thin pools might configure the initial FS size to be some modest size well within the constraints of the actual block store, and then as the FS hit say 85% utilization to run a script that investigated the state of the block layer and use resize2fs and friends to grow the FS and let the thin-pool likewise grow to fit as IO gets issued. But at some point when the competing demands of other FS on thin-pool were set to breach actual block availability the FS growth would be denied and thus userland would get signaled by the FS layer that it's out of space when it hit 100% util.

Well of course what you describe here are increasingly complex strategies that require development and should not be put on invidual administrators (or even organisations) to devise and come up with.

Growing filesystems? If you have a platform where continous thin pool growth is possible (and we are talking of well developed, complex setups here) then maybe you have in-house tools to take care of all of that.

So you suggest a strategy here that involves both intelligent automatic administration of the FS layer as well as the block layer.

A concerted strategy where for example you do have a defined thin volume size but you constrain your FS artificially AND depend its intelligence on knowledge of your thin pool size. And then you have created an intelligence where the "filesystem agent" can request growth, and perhaps the "block level agent" may grant or deny it such that FS growth is staged and given hard limits at every point. And then you have the same functionality as what I described other than that it is more sanely constructed at intervals.

Quoted 1 line

No continuous updating, but staged growth intervals or moments.

I'm not going to add much to this thread - since there is nothing really useful for devel. But let me strike out few important moments:

Thin-provisioning is NOT about providing device to the upper system levels and inform THEM about this lie in-progress.

That's complete misunderstanding of the purpose.

If you seek for a filesystem with over-provisioning - look at btrfs, zfs and other variants...

Device target is definitely not here to solve filesystem troubles.
Thinp is about 'promising' - you as admin promised you will provide
space - we could here discuss maybe that LVM may possibly maintain
max growth size we can promise to user - meanwhile - it's still the admin
who creates thin-volume and gets WARNING if VG is not big enough when all thin volumes would be fully provisioned.

And THAT'S IT - nothing more.

So please avoid making thinp target to be answer to ultimate question of life, the universe, and everything - as we all know it's 42...

Quoted 6 lines
Quoted 5 lines

But either way if you have a sudden burst of I/O from competing interests in the thin-pool, what appeared to be a safe growth allocation at one instant of time is not likely to be true when actual writes try to get fulfilled.

Quoted 7 lines

So in the end monitoring is important but because you use a thin pool there are like 3 classes of situations that change:

* Filesystems will generally have more leeway because you are /able/ to provide them with more (virtual) space to begin with, in the assumption that you won't readily need it, but it's normally going to be there when it does.

So you try to design 'another btrfs' on top of thin provisioning?

Quoted 2 lines

* Thin volumes do allow you to make better use of the available space (as per btrfs, I guess) and give many advantages in moving data around.

With 'thinp' you want simplest filesystem with robust metadata - so in theory - 'ext4' or XFS without all 'improvements for rotational hdd that has accumulated over decades of their evolution.

Quoted 5 lines

1. Unless you monitor it directly in some way, the lack of information is going to make you feel rather annoyed and insecure

2. Normally user tools do inform you of system status (a user-run "ls" or "df" is enough) but you cannot have lvs information unless run as root.

You miss the 'key' details.

Thin pool is not constructing 'free-maps' for each LV all the time - that's why tools like 'thin_ls' are meant to be used from the user-space. It IS very EXPENSIVE operation.

So before you start to present your visions here, please spend some time with reading doc and understanding all the technology behind it.

Quoted 2 lines

Even with a perfect LVM monitoring tool, I would experience a consistent lack of feedback.

Mistake of your expectations

If you are trying to operate thin-pool near 100% fullness - you will need to write and design completely different piece of software - sorry thinp is not for you and never will...

Simply use 'fully' provisioned - aka - already existing standard volumes.

Quoted 5 lines

Just a simple example: I can adjust "df" to do different stuff. But any program reporting free diskspace is going to "lie" to me in that sense. So yes I've chosen to use thin LVM because it is the best solution for me right now.

'df' has nothing in common with 'block' layer.

Quoted 4 lines

Technically I consider autoextend not that great of a solution either.

It begs the question: why did you not start out with a larger volume in the first place? You going to keep adding disks as the thing grows?

Very simple answer and related of to misunderstanding of the purpose.

Take it as motivation like you want to reduce amount of active device in your i.e. 'datacenter'.

So you start with 1TB volume - while the user may immediately create and format and use i.e. 10TB volume. As the volume fill over the time - you add more devices to your vg (buy/pay for more disk space/energy).
But user doesn't have to resize his filesystem or have other costs with maintenance of slowly growing filesystem.

Of course if the first thing user will do is to i.e. 'dd' full 10TB volume the are not going to be any savings!

But if you've never planned to buy 10TB - you should have never allow to create such big volume in the first place!

With thinp you basically postpone or skip (fsresize) some operations.

Quoted 2 lines

An overprovisioned system with individual volumes that individually cannot reach their max size is a bad system.

Yes - it is bad system.

So don't do it - and don't plan to use it - it's really that simple.

ThinP is NOT virtual disk-space for free...

Quoted 4 lines

Thin pools lie. Yes. But it's not a lie of the space is available. It's only a lie if the space is no longer available!!!!!!!.

It is not designed to lie.

Actually it's the core principle!
It lies (or better say uses admin's promises) that there is going to be a disk space. And it's admin responsibility to fulfill it.

If you know in front you will need quickly all the disk space - then using thinp and expecting miracle is not going to work.

Regards

Zdenek

#5 lore raw
Quoted 4 lines · Zdenek Kabelac

Thin-provisioning is NOT about providing device to the upper system levels and inform THEM about this lie in-progress. That's complete misunderstanding of the purpose.

I think this line of thought is a bit of a strawman.

Thin provisioning is entirely about presenting the upper layer with a logical view which does not match the physical view, including the possibility for such things as over provisioning. How much of this detail is presented to the higher layer is an implementation detail and has nothing to do with "purpose". The purpose or objective is to allow volumes that are not fully allocated in advance. This is what "thin" means, as compared to "thick".

Quoted 3 lines

If you seek for a filesystem with over-provisioning - look at btrfs, zfs and other variants...

I have to say that I am disappointed with this view, particularly if this is a view held by Red Hat. To me this represents a misunderstanding of the purpose for over-provisioning, and a misunderstanding of why thin volumes are required. It seems there is a focus on "filesystem" in the above statement, and that this may be the point of debate.

When a storage provider providers a block device (EMC, NetApp, ...) and a snapshot capability, I expect to be able to take snapshots with low overhead. The previous LVM model for snapshots was really bad, in that it was not low overhead. We use this capability for many purposes including:

1) Instantiating test environments or dev environments from a snapshot of production, with copy-on-write to allow for very large full-scale environments to be constructed quickly and with low overhead. In one of our examples, this includes an example where we have about 1 TByte of JIRA and Confluence attachments collected over several years. It is exposed over NFS by the NetApp device, but in the backend it is a volume. This volume is snapshot and then exposed as a different volume with copy-on-write characteristics. The storage allocation is monitored, and if it is exceeded, it is known that there will be particular behaviour. I believe in our case, the behaviour is that the snapshot becomes unusable.

2) Frequent snapshots. In many of our use cases, we may take snapshots every 15 minutes, every hour, and every day, keeping 3 or more of each. If this storage had to be allocated in full, this amounts to at least 10X the storage cost. Using snapshots, and understanding the rate of churn, we can use closer to 1X or 2X the storage overhead, instead of 10X the storage overhead.

3) Snapshot as a means of achieving a consistent backup at low cost of outage or storage overhead. If we "quiesce" the application (flush buffers, put new requests on hold, etc.) take the snapshot, and then "resume" the application, this can be achieved in a matter of seconds or less. Then, we can mount the snapshot at a separate mount point and proceed with a more intensive backup process against a particular consistent point-in-time. This can be fast and require closer to 1X the storage overhead, instead of 2X the storage overhead.

In all of these cases - we'll buy more storage if we need more storage. But, we're not going to use BTRFS or ZFS to provide the above capabilities, just because this is your opinion on the matter. Storage vendors of reputation and market presence sell these capabilities as features, and we pay a lot of money to have access to these features.

In the case of LVM... which is really the point of this discussion... LVM is not necessarily going to be used or available on a storage appliance. The LVM use case, at least for us, is for storage which is thinly provisioned by the compute host instead of the backend storage appliance. This includes:

1) Local disks, particularly included local flash drives that are local to achieve higher levels of performance than can normally be achieved with a remote storage appliance.

2) Local file systems, on remote storage appliances, using a protocol such as iSCSI to access the backend block device. This might be the case where we need better control of the snapshot process, or to abstract the management of the snapshots from the backend block device. In our case, we previously use an EMC over iSCSI for one of these use cases, and we are switching to NetApp. However, instead of embedding NetApp-specific logic into our code, we want to use LVM on top of iSCSI, and re-use the LVM thin pool capabilities from the host, such that we don't care what storage is used on the backend. The management scripts will work the same whether the storage is local (the first case above) or not (the case we are looking into now).

In both of these cases, we have a need to take snapshots and manage them locally on the host, instead of managing them on a storage appliance. In both cases, we want to take many light weight snapshots of the block device. You could argue that we should use BTRFS or ZFS, but you should full well know that both of these have caveats as well. We want to use XFS or EXT4 as our needs require, and still have the ability to take light-weight snapshots.

Generally, I've seen the people who argue that thin provisioning is a "lie", tend to not be talking about snapshots. I have a sense that you are talking more as storage providers for customers, and talking more about thinly provisioning content for your customers. In this case - I think I would agree that it is a "lie" if you don't make sure to have the storage by the time it is required. But, I think this is a 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. 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. In the case of our IT team and EMC or NetApp, they mostly avoid the use of thin volumes for "cross customer" purposes, and instead use thin volumes for a specific customer, for a specific need. In the case of Amazon EC2, for example... I would use EBS for storage, and expect that even if it is "thin", Amazon would make sure to have enough storage to meet my requirement if I need them. But, I would use LVM on my Amazon EC2 instance, and I would expect to be able to use LVM thin pool snapshots to over provision my own per-machine storage requirements by creating multiple snapshots of the underlying storage, with a full understanding of the amount of churn that I expect to occur, and a full understanding of the need to monitor.

Quoted 9 lines

Device target is definitely not here to solve filesystem troubles. Thinp is about 'promising' - you as admin promised you will provide space - we could here discuss maybe that LVM may possibly maintain max growth size we can promise to user - meanwhile - it's still the admin who creates thin-volume and gets WARNING if VG is not big enough when all thin volumes would be fully provisioned.
And THAT'S IT - nothing more.
So please avoid making thinp target to be answer to ultimate question of life, the universe, and everything - as we all know it's 42...

The WARNING is a cover-your-ass type warning that is showing up inappropriately for us. It is warning me something that I should already know, and it is training me to ignore warnings. Thinp doesn't have to be the answer to everything. It does, however, need to provide a block device visible to the file system layer, and it isn't invalid for the file system layer to be able to query about the nature of the block device, such as "how much space do you *really* have left?"

This seems to be a crux of this debate between 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, as it leads to edge cases where the file system could choose to fail in a cleaner way, but it gets too far today leading to a more dangerous failure when it allocates some block, but not some other block.

Exaggerating this to say that thinp would become everything, and the answer to the ultimate question of life, weakens your point to me, as it means that you are seeing things in far too black + white, whereas real life is often not black + white.

It is your opinion that extending thin volumes to allow the file system to have more information is breaking some fundamental law. But, in practice, this sort of thing is done all of the time. "Size", "Read only", "Discard/Trim Support", "Physical vs Logical Sector Size", ... are all information queried from the device, and used by the file system. If it is a general concept that applies to many different device targets, and it will help the file system make better and smarter choices, why *shouldn't* it be communicated? Who decides which ones are valid and which ones are not?

I didn't disagree with all of your points. But, enough of them seemed to be directly contradicting my perspective on the matter that I felt it important to respond to them.

Mostly, I think everybody has a set of opinions and use cases in mind when they come to their conclusions. Please don't ignore mine. If there is something unreasonable above, please let me know.

Signature · 1 line
Mark Mielke <[email protected]>
#6 lore raw
Quoted 18 lines · Mark Mielke

On Fri, Apr 29, 2016 at 7:23 AM, Zdenek Kabelac <[email protected] <mailto:[email protected]>> wrote:

Thin-provisioning is NOT about providing device to the upper system levels and inform THEM about this lie in-progress. That's complete misunderstanding of the purpose.

I think this line of thought is a bit of a strawman.

Thin provisioning is entirely about presenting the upper layer with a logical view which does not match the physical view, including the possibility for such things as over provisioning. How much of this detail is presented to the higher layer is an implementation detail and has nothing to do with "purpose". The purpose or objective is to allow volumes that are not fully allocated in advance. This is what "thin" means, as compared to "thick".

Quoted 6 lines

If you seek for a filesystem with over-provisioning - look at btrfs, zfs and other variants...

I have to say that I am disappointed with this view, particularly if this is a view held by Red Hat. To me this represents a misunderstanding of the purpose

Hi

So first - this is AMAZING deduction you've just shown.

You've cut sentence out of the middle of a thread and used as kind of evidence that Red Hat is suggesting usage of ZFS, Btrfs - sorry man - read this thread again...

Personally I'd never use those 2 filesystems as they are to complex for recovery. But I've no problem to advice users to try them if that's what fits their needs best and they believe into 'all in once logic' ('Hit the wall' is best learning exercise in Xen case anyway...)

Quoted 4 lines

When a storage provider providers a block device (EMC, NetApp, ...) and a snapshot capability, I expect to be able to take snapshots with low overhead. The previous LVM model for snapshots was really bad, in that it was not low overhead. We use this capability for many purposes including:

This usage is perfectly fine. It's been designed this way from day 1.

Quoted 10 lines

1) Instantiating test environments or dev environments from a snapshot of production, with copy-on-write to allow for very large full-scale environments to be constructed quickly and with low overhead. In one of our examples, this includes an example where we have about 1 TByte of JIRA and Confluence attachments collected over several years. It is exposed over NFS by the NetApp device, but in the backend it is a volume. This volume is snapshot and then exposed as a different volume with copy-on-write characteristics. The storage allocation is monitored, and if it is exceeded, it is known that there will be particular behaviour. I believe in our case, the behaviour is that the snapshot becomes unusable.

Thin pool does not make a difference between snapshot and origin. All thin-volumes share the same volume space.

It's up to monitoring application to decide if some snapshots could be erased to reclaim some space in thin-pool.

Recent tool thin_ls is showing info how much data are exclusively held by individual thin volumes.

It's major difference compared with old snapshots and it's 'Invalidation' logic.

Quoted 6 lines

2) Frequent snapshots. In many of our use cases, we may take snapshots every 15 minutes, every hour, and every day, keeping 3 or more of each. If this storage had to be allocated in full, this amounts to at least 10X the storage cost. Using snapshots, and understanding the rate of churn, we can use closer to 1X or 2X the storage overhead, instead of 10X the storage overhead.

Sure - snapper... whatever you name.
It's just for admin to maintain space availability in thin-pool.

Quoted 10 lines

3) Snapshot as a means of achieving a consistent backup at low cost of outage or storage overhead. If we "quiesce" the application (flush buffers, put new requests on hold, etc.) take the snapshot, and then "resume" the application, this can be achieved in a matter of seconds or less. Then, we can mount the snapshot at a separate mount point and proceed with a more intensive backup process against a particular consistent point-in-time. This can be fast and require closer to 1X the storage overhead, instead of 2X the storage overhead.

In all of these cases - we'll buy more storage if we need more storage. But, we're not going to use BTRFS or ZFS to provide the above capabilities, just

And where exactly I'd advised to you specifically to switch to those filesystem?

My advice is clearly given to a user who seeks for filesystem COMBINED with block layer.

Quoted 24 lines

because this is your opinion on the matter. Storage vendors of reputation and market presence sell these capabilities as features, and we pay a lot of money to have access to these features.

In the case of LVM... which is really the point of this discussion... LVM is not necessarily going to be used or available on a storage appliance. The LVM use case, at least for us, is for storage which is thinly provisioned by the compute host instead of the backend storage appliance. This includes:

1) Local disks, particularly included local flash drives that are local to achieve higher levels of performance than can normally be achieved with a remote storage appliance.

2) Local file systems, on remote storage appliances, using a protocol such as iSCSI to access the backend block device. This might be the case where we need better control of the snapshot process, or to abstract the management of the snapshots from the backend block device. In our case, we previously use an EMC over iSCSI for one of these use cases, and we are switching to NetApp. However, instead of embedding NetApp-specific logic into our code, we want to use LVM on top of iSCSI, and re-use the LVM thin pool capabilities from the host, such that we don't care what storage is used on the backend. The management scripts will work the same whether the storage is local (the first case above) or not (the case we are looking into now).

Quoted 6 lines

In both of these cases, we have a need to take snapshots and manage them locally on the host, instead of managing them on a storage appliance. In both cases, we want to take many light weight snapshots of the block device. You could argue that we should use BTRFS or ZFS, but you should full well know that both of these have caveats as well. We want to use XFS or EXT4 as our needs require, and still have the ability to take light-weight snapshots.

Which is exactly actual Red Hat strategy. XFS is strongly pushed forward.

Quoted 5 lines

Generally, I've seen the people who argue that thin provisioning is a "lie", tend to not be talking about snapshots. I have a sense that you are talking more as storage providers for customers, and talking more about thinly provisioning content for your customers. In this case - I think I would agree that it is a "lie" if you don't make sure to have the storage by the time it

Thin-provisioning simply requires RESPONSIBLE admins - if you are not willing to take care about your thin-pools - don't use them - lots of kitten may die and that's all what this thread was about - it had absolutely nothing to do with Red Hat and any of your conspiracy theories like it would be pushing you to switch to a filesystem you don't like...

Quoted 11 lines

Device target is definitely not here to solve filesystem troubles. Thinp is about 'promising' - you as admin promised you will provide space - we could here discuss maybe that LVM may possibly maintain max growth size we can promise to user - meanwhile - it's still the admin who creates thin-volume and gets WARNING if VG is not big enough when all thin volumes would be fully provisioned.
And THAT'S IT - nothing more.
So please avoid making thinp target to be answer to ultimate question of life, the universe, and everything - as we all know it's 42...

Quoted 7 lines

The WARNING is a cover-your-ass type warning that is showing up inappropriately for us. It is warning me something that I should already know, and it is training me to ignore warnings. Thinp doesn't have to be the answer to everything. It does, however, need to provide a block device visible to the file system layer, and it isn't invalid for the file system layer to be able to query about the nature of the block device, such as "how much space do you *really* have left?"

This is not so useful information - as this state is dynamic. The only 'valid' query is - are we out-of-space... And that's what you get from block layer now - ENOSPC. Filesystems may have different reaction then to plain EIO.

I'd be really curious what would be the use case of this information even ?

If you care about i.e. 'df' - then let's fix 'df' - it may check fs is thinly provisioned volume and may ask provisioner about free space in pool and combine result in some way... Just DO NOT mix this with filesystem layer...

What would the filesystem do with this info ?

Should this randomly decide to drop files according to thin-pool workload ?

Would you change every filesystem in kernel to implement such policies ?

It's really the thin-pool monitoring which tries to add some space when it's getting low and may implement further policies to i.e. drop some snapshots.

However what is being implemented is better 'allocation' logic for pool chunk provisioning (for XFS ATM) - as rather 'dated' methods for deciding where to store incoming data do not apply with provisioned chunks efficiently.

Quoted 4 lines

This seems to be a crux of this debate between 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, as it leads to edge cases where the file system could choose to

It's purely practical and it's the 'crucial' difference between

i.e. thin+XFS/ext4 and BTRFS.

Quoted 2 lines

fail in a cleaner way, but it gets too far today leading to a more dangerous failure when it allocates some block, but not some other block.

The best thing to do is to stop immediately on error and do 'read-only' fs - what is exactly 'ext4 + remount-ro'

Your proposal to make XFS a different kind of BTRFS monster is simply not going to work - that's exactly what BTRFS is doing - waste of time to do it again.

BTRFS has built-in volume manager and combines fs layer with block layer (making many layers in kernel quite ugly - i.e. device major:minor)

This is different logic lvm2 takse - where layers are separated with clearly defined logic.

So again - if you don't like separate thin block layer + XFS fs layer and you want to see 'merged' technology - there is BTRFS/ZFS/.... which tries to combine raid/caching/encryption/snapshot... - but there are no plans to 'reinvent' the same from the other side with lvm2/dm....

Quoted 4 lines

Exaggerating this to say that thinp would become everything, and the answer to the ultimate question of life, weakens your point to me, as it means that you are seeing things in far too black + white, whereas real life is often not black + white.

Yes we prefer clearly defined borders and responsibilities which could be well tested and verified..

Don't compare life with software :)

Quoted 9 lines

It is your opinion that extending thin volumes to allow the file system to have more information is breaking some fundamental law. But, in practice, this sort of thing is done all of the time. "Size", "Read only", "Discard/Trim Support", "Physical vs Logical Sector Size", ... are all information queried from the device, and used by the file system. If it is a general concept that applies to many different device targets, and it will help the file system make better and smarter choices, why *shouldn't* it be communicated? Who decides which ones are valid and which ones are not?

lvm2 is logical volume manager. Just think about it.

In future your thinLV might be turned into plain 'linear' LV as well as your linearLV would become a member of thin-pool (planned features).

Your LV could be pvmove(ed) to completely different drive with different geometry...

These are topics for lvm2/dm.

We are not designing filesystem - and we do plan to stay transparent for them.

And it's up to you to understand the reasoning.

Quoted 3 lines

I didn't disagree with all of your points. But, enough of them seemed to be directly contradicting my perspective on the matter that I felt it important to respond to them.

It is an Open Souce World - "so send a patch" and implement your visions - again it is that easy - we do it every day in Red Hat...

Quoted 3 lines

Mostly, I think everybody has a set of opinions and use cases in mind when they come to their conclusions. Please don't ignore mine. If there is something unreasonable above, please let me know.

It's not about ignoring - it's about having certain amount of man-hours for work and you have to chose how to 'spend' them.

And in this case and your ideas you will need to spend/invest your time.... (Just like Xen).

Regards

Zdenek

#7 lore raw
Quoted 12 lines · Zdenek Kabelac
Quoted 10 lines · Mark Mielke

If you seek for a filesystem with over-provisioning - look at btrfs,
zfs
and other variants...

I have to say that I am disappointed with this view, particularly if this is a
view held by Red Hat. To me this represents a misunderstanding of the purpose

Quoted 7 lines

So first - this is AMAZING deduction you've just shown.

You've cut sentence out of the middle of a thread and used as kind of evidence
that Red Hat is suggesting usage of ZFS, Btrfs - sorry man - read this thread again...

My intent wasn't to cut a sentence in the middle. I responded to the each sentence in its place. I think it really comes down to this:

This seems to be a crux of this debate between you and the other people. You

Quoted 10 lines
Quoted 5 lines

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, as it leads to edge cases where the file system could choose to

It's purely practical and it's the 'crucial' difference between

i.e. thin+XFS/ext4 and BTRFS.

I think I captured the crux of this pretty well. If anybody suggests that there could be value to exposing any information related to the nature of the "thinly provisioned block devices", you suggest that the only route forwards here is BTRFS and ZFS. You are saying directly and indirectly, that anybody who disagrees with you should switch to what you feel are the only solutions that are in this space, and that LVM should never be in this space.

I think I understand your perspective. However, I don't agree with it. I don't agree that the best solution is one that fails at the last instant with ENOSPC and/or for the file system to become read-only. I think there is a whole lot of grey possibilities between the polar extremes of "BTRFS/ZFS" vs "thin+XFS/ext4 with last instant failure".

What started me on this list was the CYA mandatory warning about over provisioning that I think is inappropriate, and causing us tooling problems. But seeing the debate unfold, and having seen some related failures in the Docker LVM thin pool case where the system may completely lock up, I have a conclusion that this type of failure represents a fundamental difference in opinion around what thin volumes are for, and what place they have. As I see them as highly valuable for various reasons including Docker image layers (something Red Hat appears to agree with, having targeted LVM thinp instead of the union file systems), and the snapshot use cases I presented prior, I think there must be a way to avoid the worst scenarios, if the right people consider all the options, and don't write off options prematurely due to preconceived notions about what is and what is not appropriate in terms of communication of information between system layers.

There are many types of information that *are* passed from the block device layer to the file system layer. I don't see why awareness of thin volumes, should not be one of them.

For example, and I'm not pretending this is the best idea that should be implemented, but just to see where the discussion might lead:

The Linux kernel needs to deal with problems such as memory being swapped out due to memory pressures. In various cases, it is dangerous to swap memory out. The memory can be protected from being swapped out where required using various technique such as pinning pages. This takes up extra RAM, but ensures that the memory can be safely accessed and written as required. If the file system has particular areas of importance that need to be writable to prevent file system failure, perhaps the file system should have a way of communicating this to the volume layer. The naive approach here might be to preallocate these critical blocks before proceeding with any updates to these blocks, such that the failure situations can all be "safe" situations, where ENOSPC can be returned without a danger of the file system locking up or going read-only.

Or, maybe I am out of my depth, and this is crazy talk... :-)

(Personally, I'm not really needing a "df" to approximate available storage... I just don't want the system to fail badly in the "out of disk space" scenario... I can't speak for others, though... I do *not* want BTRFS/ZFS... I just want a sanely behaving LVM + XFS...)

Signature · 1 line
Mark Mielke <[email protected]>
#8 lore raw
Quoted 39 lines · Mark Mielke

On Tue, May 3, 2016 at 5:45 AM, Zdenek Kabelac <[email protected] <mailto:[email protected]>> wrote:

On 2.5.2016 16:32, Mark Mielke wrote:

If you seek for a filesystem with over-provisioning - look at
btrfs, zfs
and other variants...

I have to say that I am disappointed with this view, particularly if this is a
view held by Red Hat. To me this represents a misunderstanding of the purpose

So first - this is AMAZING deduction you've just shown.

You've cut sentence out of the middle of a thread and used as kind of evidence that Red Hat is suggesting usage of ZFS, Btrfs - sorry man - read this thread again...

My intent wasn't to cut a sentence in the middle. I responded to the each sentence in its place. I think it really comes down to this:

This seems to be a crux of this debate between 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, as it leads to edge cases where the file system could choose to

It's purely practical and it's the 'crucial' difference between

i.e. thin+XFS/ext4 and BTRFS.

Quoted 8 lines

I think I captured the crux of this pretty well. If anybody suggests that there could be value to exposing any information related to the nature of the "thinly provisioned block devices", you suggest that the only route forwards here is BTRFS and ZFS. You are saying directly and indirectly, that anybody who disagrees with you should switch to what you feel are the only solutions that are in this space, and that LVM should never be in this space.

I think I understand your perspective. However, I don't agree with it. I don't

The perspective of lvm2 team is pretty simple as a small team there is absolutely no time to venture into this road-path.

Also technically you are crying on the wrong grave/barking up the wrong tree.

Try to push you visions to some filesystem developers.

Quoted 4 lines

agree that the best solution is one that fails at the last instant with ENOSPC and/or for the file system to become read-only. I think there is a whole lot of grey possibilities between the polar extremes of "BTRFS/ZFS" vs "thin+XFS/ext4 with last instant failure".

The other point is technical difficulties are very high and you are really asking for Btrfs logic, you just fail to admit this to yourself.

It's been the 'core' idea of Btrfs to combine volume management and filesystem together for a better future...

Quoted 8 lines

What started me on this list was the CYA mandatory warning about over provisioning that I think is inappropriate, and causing us tooling problems. But seeing the debate unfold, and having seen some related failures in the Docker LVM thin pool case where the system may completely lock up, I have a conclusion that this type of failure represents a fundamental difference in opinion around what thin volumes are for, and what place they have. As I see them as highly valuable for various reasons including Docker image layers (something Red Hat appears to agree with, having targeted LVM thinp instead of

As you mention Docker - again I've no idea why do you think there is 'one-way' path ?

Red Hat is not political party with a single leading direction.

Many variant are being implemented in parallel (yes even in Red Hat) and the best one will win over the time - but there is no single 'directive' decision. It really is the open source way.

Quoted 10 lines

the union file systems), and the snapshot use cases I presented prior, I think there must be a way to avoid the worst scenarios, if the right people consider all the options, and don't write off options prematurely due to preconceived notions about what is and what is not appropriate in terms of communication of information between system layers.

There are many types of information that *are* passed from the block device layer to the file system layer. I don't see why awareness of thin volumes, should not be one of them.

Find a use-case, build a patch, show results and add info what the filesystem shall be doing when the filesystem underlying device changes its characteristic.

There is an API between block-layer and fs-layer - so propose extension with a patch for a filesystem with clearly defined benefit.

That's my best advice.

Quoted 7 lines

communicating this to the volume layer. The naive approach here might be to preallocate these critical blocks before proceeding with any updates to these blocks, such that the failure situations can all be "safe" situations, where ENOSPC can be returned without a danger of the file system locking up or going read-only.

Or, maybe I am out of my depth, and this is crazy talk... :-)

Basically you are not realizing how much work is behind all those simple sentences. At this moment there is 'fallocate' being in discussion...
But it's most or less 'nuclear weapon' for thin provisioning.

Quoted 5 lines

(Personally, I'm not really needing a "df" to approximate available storage... I just don't want the system to fail badly in the "out of disk space" scenario... I can't speak for others, though... I do *not* want BTRFS/ZFS... I just want a sanely behaving LVM + XFS...)

Yes - that's what we try to improve daily.

Regards

Zdenek

#9 lore raw
In reply to Mark Mielke
Quoted 8 lines · Mark Mielke

2) Frequent snapshots. In many of our use cases, we may take snapshots every 15 minutes, every hour, and every day, keeping 3 or more of each. If this storage had to be allocated in full, this amounts to at least 10X the storage cost. Using snapshots, and understanding the rate of churn, we can use closer to 1X or 2X the storage overhead, instead of 10X the storage overhead.

Quoted 9 lines

3) Snapshot as a means of achieving a consistent backup at low cost of outage or storage overhead. If we "quiesce" the application (flush buffers, put new requests on hold, etc.) take the snapshot, and then "resume" the application, this can be achieved in a matter of seconds or less. Then, we can mount the snapshot at a separate mount point and proceed with a more intensive backup process against a particular consistent point-in-time. This can be fast and require closer to 1X the storage overhead, instead of 2X the storage overhead.

This is exactly my main use case.

Quoted 9 lines

The WARNING is a cover-your-ass type warning that is showing up inappropriately for us. It is warning me something that I should already know, and it is training me to ignore warnings. Thinp doesn't have to be the answer to everything. It does, however, need to provide a block device visible to the file system layer, and it isn't invalid for the file system layer to be able to query about the nature of the block device, such as "how much space do you *really* have left?"

As this warning appears on snapshots, it is quite annoying in fact. On the other hand, I fully understand that the developers want to avoid "blind" overprovisioning. A commmand-line (or a lvm.conf) option to override the warning would be welcomed, though.

Quoted 11 lines

This seems to be a crux of this debate between 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, as it leads to edge cases where the file system could choose to fail in a cleaner way, but it gets too far today leading to a more dangerous failure when it allocates some block, but not some other block.

...

Quoted 9 lines

It is your opinion that extending thin volumes to allow the file system to have more information is breaking some fundamental law. But, in practice, this sort of thing is done all of the time. "Size", "Read only", "Discard/Trim Support", "Physical vs Logical Sector Size", ... are all information queried from the device, and used by the file system. If it is a general concept that applies to many different device targets, and it will help the file system make better and smarter choices, why *shouldn't* it be communicated? Who decides which ones are valid and which ones are not?

This seems reasonable. After all, a simple "lsblk" already reports plenty of information to the upper layer, so adding a "REAL_AVAILABLE_SPACE" info should not be infeasible.

Quoted 5 lines

I didn't disagree with all of your points. But, enough of them seemed to be directly contradicting my perspective on the matter that I felt it important to respond to them.

Thinp really is a wonderful piece of technology, and I really thanks the developer for it.

Quoted 13 lines

--
Mark Mielke <[email protected] <mailto:[email protected]>>

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Signature · 5 lines
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: [email protected] - [email protected]
GPG public key ID: FF5F32A8
#10 lore raw
Quoted 10 lines · Gionatan Danti
Quoted 7 lines · Mark Mielke

The WARNING is a cover-your-ass type warning that is showing up inappropriately for us. It is warning me something that I should already know, and it is training me to ignore warnings. Thinp doesn't have to be the answer to everything. It does, however, need to provide a block device visible to the file system layer, and it isn't invalid for the file system layer to be able to query about the nature of the block device, such as "how much space do you *really* have left?"

Quoted 4 lines

As this warning appears on snapshots, it is quite annoying in fact. On the other hand, I fully understand that the developers want to avoid "blind" overprovisioning. A commmand-line (or a lvm.conf) option to override the warning would be welcomed, though.

Since number of reports from people who used thin-pool without realizing what they could do wrong was too high - rather 'dramatic' WARNING approach is used. Advised usage is with dmeventd & monitoring.

Danger with having 'disable' options like this is many distros do decide themselves about best defaults for their users, but Ubuntu with their issue_discards=1 shown us to be more careful as then it's not Ubuntu but lvm2 which is blamed for dataloss.

Options are evaluated...

Quoted 22 lines
Quoted 12 lines

This seems to be a crux of this debate between 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, as it leads to edge cases where the file system could choose to fail in a cleaner way, but it gets too far today leading to a more dangerous failure when it allocates some block, but not some other block.

...

Quoted 9 lines

It is your opinion that extending thin volumes to allow the file system to have more information is breaking some fundamental law. But, in practice, this sort of thing is done all of the time. "Size", "Read only", "Discard/Trim Support", "Physical vs Logical Sector Size", ... are all information queried from the device, and used by the file system. If it is a general concept that applies to many different device targets, and it will help the file system make better and smarter choices, why *shouldn't* it be communicated? Who decides which ones are valid and which ones are not?

Quoted 3 lines

This seems reasonable. After all, a simple "lsblk" already reports plenty of information to the upper layer, so adding a "REAL_AVAILABLE_SPACE" info should not be infeasible.

What's wrong with 'lvs'?
This will give you the available space in thin-pool.

However combining this number with number of free-space in filesystem - that needs magic.

When you create file with hole in your filesystem - how much free space do you have ?

If you have 2 filesystem in a single thin-pool - each takes 1/2 ? It's all about lying....

Regards

Zdenek

#11 lore raw
Quoted 8 lines · Zdenek Kabelac

Danger with having 'disable' options like this is many distros do decide themselves about best defaults for their users, but Ubuntu with their issue_discards=1 shown us to be more careful as then it's not Ubuntu but lvm2 which is blamed for dataloss.

Options are evaluated...

Very true. "Sane defaults" is one of the reason why I (happily) use RHEL/CentOS as hypervisors and other critical tasks.

Quoted 5 lines

What's wrong with 'lvs'?
This will give you the available space in thin-pool.

Oh, absolutely nothing wrong with lvs. I used "lsblk" only as an example of the block device/layer exposing some (lack of) features to upper layer.

One note about the continued "suggestion" to use BTRFS. While for relatively simple use case it can be ok, for more demanding (rewrite-heavy) scenarios (eg: hypervisor, database, ecc) it performs *really* bad, even when "nocow" is enabled.

I had much more fortune, performance wise, with ZFS. Too bad ZoL is an out-of-tree component (albeit very easy to install and, in my experience, quite stable also).

Anyway, ThinLVM + XFS is an extremely good combo in my opinion.

Quoted 6 lines

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Signature · 5 lines
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: [email protected] - [email protected]
GPG public key ID: FF5F32A8
#12 lore raw
Quoted 10 lines · Gionatan Danti
Quoted 4 lines · Zdenek Kabelac

What's wrong with 'lvs'?
This will give you the available space in thin-pool.

Oh, absolutely nothing wrong with lvs. I used "lsblk" only as an example of the block device/layer exposing some (lack of) features to upper layer.

One note about the continued "suggestion" to use BTRFS. While for relatively

It's not 'continued' suggestion.

It's just the example of solution where 'filesystem & block layer' are tied together. Every solution has some advantages and disadvantages.

Quoted 3 lines

simple use case it can be ok, for more demanding (rewrite-heavy) scenarios (eg: hypervisor, database, ecc) it performs *really* bad, even when "nocow" is enabled.

So far I'm convinced layered design gives user more freedom - for the price of bigger space usage.

Quoted 3 lines

Anyway, ThinLVM + XFS is an extremely good combo in my opinion.

Yes, thought ext4 is quite good as well...

Zdenek

#13 lore raw
In reply to Zdenek Kabelac

Zdenek Kabelac schreef op 29-04-2016 13:23:

Quoted 2 lines

I'm not going to add much to this thread - since there is nothing really useful for devel. But let me strike out few important moments:

If you like to keep things short now I will give short replies. Also other people have responded and I haven't read everything yet.

Quoted 2 lines

it's still the admin who creates thin-volume and gets WARNING if VG is not big enough when all thin volumes would be fully provisioned.

That is just what we could call insincere or that beautiful strange word that I cannot remember.

The opposite of innocuous. Disingenuous (thank you dictionary).

You know perfectly well that this warning doesn't do much of anything when all people approach thin from the view point of wanting to overprovision.

That is like saying "Don't enter this pet store here, because you might buy pets, and pets might scratch your arm. Now what can we serve you with?".

It's those insincere warnings many business or ideas give to people to supposedly warn them in advance of what they want to do anyway. "I told you it was a bad idea, now what can we do for you? :) :) :) :)". It's a way of being politically correct mostly.

You want to do it anyway. But now someone tells you it might be a bad idea even if both of you want it.

Quoted 1 line

So you try to design 'another btrfs' on top of thin provisioning?

Maybe I am. At least you recognise that I am trying to design something, many people would just throw it in the wastebasket with "empty complains".

That in itself.... ;-)

speaks some volumes.

But let's talk about real volumes now :p.

There's nothing bad about btrfs except that it usurps everything, doesn't separate any layers, and just overall means the end and death of a healthy filesystem system. It wants to be the monopoly.

Quoted 3 lines

With 'thinp' you want simplest filesystem with robust metadata - so in theory - 'ext4' or XFS without all 'improvements for rotational hdd that has accumulated over decades of their evolution.

I agree. I don't even use ext4, I use ext3. I feel ext4 may have some benefits but they are not really worth anything.

Quoted 9 lines

You miss the 'key' details.

Thin pool is not constructing 'free-maps' for each LV all the time - that's why tools like 'thin_ls' are meant to be used from the user-space.
It IS very EXPENSIVE operation.

So before you start to present your visions here, please spend some time with reading doc and understanding all the technology behind it.

Sure I could do that. I could also allow myself to die without ever having contributed to anything.

Quoted 4 lines
Quoted 2 lines

Even with a perfect LVM monitoring tool, I would experience a consistent lack of feedback.

Mistake of your expectations

It is nothing to do with expectations. Things and feeling that keep creeping up to you and keep annoying you have nothing to do with expectations.

That is like being thoroughly annoyed about something for years and expecting it to go away by itself, is the epitome of sanity.

For example: monitor makes buzzing noise when turned off. Deeply frustrating, annoying, downright bad. Gives me nightmares even. You say "You have bad expectations of hardware, hardware just does that thing, you have to live with it." I go to shop, shop says "Yeah all hardware does that (so we don't need to pay you anything back)".

That has nothing to do with bad expectations.

Quoted 4 lines

If you are trying to operate thin-pool near 100% fullness - you will need to write and design completely different piece of software - sorry thinp
is not for you and never will...

I am not trying to operate near 100% fullness.

Although it wouldn't be bad if I could manage that.

That would not be such a bad thing at all. If the tools where there to actually do it, and the mechanisms. Wouldn't you agree? Regardless of what is possible or even what is to be considered "wise" here, wouldn't it be beneficial in some way?

Quoted 8 lines
Quoted 6 lines

Just a simple example: I can adjust "df" to do different stuff. But any program reporting free diskspace is going to "lie" to me in that sense. So yes I've chosen to use thin LVM because it is the best solution for me right now.

'df' has nothing in common with 'block' layer.

A clothing retailer has nothing in common with a clothing manufacturer either, but they are just both in the same business.

Quoted 2 lines

But if you've never planned to buy 10TB - you should have never allow to create such big volume in the first place!

So you are like saying the only use case of thin is a growth scenario that can be met.

Quoted 1 line

So don't do it - and don't plan to use it - it's really that simple.

What I was saying was that it would be possible to maintain the contract that any individual volume at any one time would be able to grow to max size as long as other volumes don't start acting aberrant. If you manage all those volumes of course you would be able to choose this.

The purpose of the thin system is to maintain the situation that all volumes can reach their full potential without (auto)extending, in that sense.

If you did actually make a 1TB volume for a single client with a 10TB V-size, you would be a very bad contractor. Who says it is not going to happen overnight? How will you be able to respond.

The situation where you have a 10TB volume and you have 20 clients with 1TB each, is very different.

I feel the contract should be that the available real space should always be equal to or greater than the available on any one filesystem (volume).

So: R >= max(A(1), A(2), A(3), ..., A(n))

Of course it is pleasant not having to resize the filesystem but would you really do that for yourself? Make a 10TB filesystem on a 1TB disk as you expect to buy more disks in the future?

I mean you could. But in this sense resizing the filesystem (growing it) is not a very expensive operation, usually.

I would only want to do that if I could limit the actual usage of the filesystem in a real way.

Any runaway process causing my volume to drop...... NOT a good thing.

Quoted 3 lines

Actually it's the core principle!
It lies (or better say uses admin's promises) that there is going to be a disk space. And it's admin responsibility to fulfill it.

The admin never comes into it. What the admin does or doesn't do, what the admin thinks or doesn't think. These are all interpretations of intents.

Thinp should function regardless of what the admin is thinking or not. Regardless of what his political views are.

You are bringing morality into the technical system.

You are saying /thinp should work/ because /the admin should be a good person/.

When the admin creates the system, no "promise" is ever communicated to the hardware layer, OR the software layer. You are turning the correct operation of the machine into a human problem in the way of saying "/Linux is a great system and everyone can use it, but some people are just too stupid to spend a few hours reading a manual on a daily basis, and we can't help that/".

These promises are not there in the system. Someone might be using the system for reasons you have not envisioned. But the system is there and it can be used for it. Now if things go wrong you say "You you had the wrong use case" but a use case is just a use case, it has no morality to it.

If you build a waterway system that only functions as long as it doesn't rain (overflowing the channels) then you can say "Well my system is perfect, it is just God who is a bitch and messes things up".

No you have to take account of real life human beings, not those ideal pictures of admins that you have.

Stop the idealism you know. Admins are humans and they can be expected to be humans.

It is you who have wrong expectations of people.

If people mess up they mess up but it is part of the human agenda and you design for that.

Quoted 2 lines

If you know in front you will need quickly all the disk space - then using thinp and expecting miracle is not going to work.

Nobody ever said anything of that kind.