top

file system full... zfs to the rescue

Or not. This is just some, perhaps, thoughtless idea.

ZFS is a big deal. It's powerful and very easy to use. It's automated and hides all the complexities in a redundant storage system. We've all come across situations where a file system gets full and we then spend hours trying to fix the mess up. This happens in big and small companies.

It happens in servers that are well managed with "good" monitoring software too. Even setting quota's can result in this problem. So, what is a good solution for this problem? I was brainstorming an idea, and one way maybe is to get the ZFS kernel to make the system run slow when a file system (or zpool) is nearing capacity - perhaps some sleep() somewhere. Of course, this would happen on only critical file systems, such as rpool or a zfs file system with a special option set.

In addition, this intentional length of sleep() would be based on how busy a server is. If it is an mostly idle server, the sleep would be long. If it's a busy server, it'll be smaller, but long enough for the performance to be noticeable.

Users and customers would complain and get the attention of administrators. The end goal is to get IT working on the server, looking for problems. The "kernel" then could also add a note to the motd about the file system nearing capacity.

But having the file system do all this could be bad, when a some script or a small C program can do it, outside of the kernel! Getting it to slow down the OS could be the hard part, but I am sure there are some clever tricks for doing this, e.g. pounding the disk or using up all the available RAM.

Could this work? Please share your thoughts.

2 Responses to file system full... zfs to the rescue

  1. gravatar

    Wouldn't it be better to just monitor disk usage, and trap when it goes over a threshold?

  2. gravatar

    Disk space monitoring isn't a big deal at most companies (they are caught with monitoring and fixed easily) but it is a problem at very large companies with thousands of servers with global support groups. I've seen lots of times where servers get hit with full file systems. This wasn't a big idea, just some random thought... not to get too analytical on this. :)

Leave a Reply

Mail will not be published