[opensuse] Is there a fstrim like tool that punches holes? Would it work with a NFS mount?
All, Due to an Admin screw up: (and yes I'm the admin). I have a large loopback mounted filesystem with about 100GB of unused space. I need to punch holes where the unused space is and free up some disk space. That is where fstrim calls ioctl(FITRIM) to free up space on a SSD I need something that calls fallocate(FALLOC_FL_PUNCH_HOLE) to free up space on an underlying filesystem If nothing already exists to do this I guess I could hack on fstrim and get it to do if for me. The next issue is my underlying filesystem is a NFS mount. Not sure if will handle fallocate(FALLOC_FL_PUNCH_HOLE). Worst case I guess I can grow the NFS mount, but I rent that space monthly, so I'd rather not have to grow it by 100GB to fix my issue. Thanks Greg -- Greg Freemyer www.IntelligentAvatar.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/31/2015 02:56 AM, Greg Freemyer wrote:
All,
Due to an Admin screw up: (and yes I'm the admin).
I have a large loopback mounted filesystem with about 100GB of unused space.
I need to punch holes where the unused space is and free up some disk space.
That is where fstrim calls ioctl(FITRIM) to free up space on a SSD I need something that calls fallocate(FALLOC_FL_PUNCH_HOLE) to free up space on an underlying filesystem
If nothing already exists to do this I guess I could hack on fstrim and get it to do if for me.
sounds like fallocate(1) from util-linux is your friend. A quick search in the Git tree shows that you probably need >=v2.25, so if you're running an older openSUSE version, then you may have to build util-linux from Git yourself.
The next issue is my underlying filesystem is a NFS mount. Not sure if will handle fallocate(FALLOC_FL_PUNCH_HOLE).
sorry, no idea if it will work over an NFS mount.
Worst case I guess I can grow the NFS mount [...]
I'm not sure what you mean here exactly - probably "grow the file system on the NFS server side" ...? Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Fri, 31 Jul 2015 07:50:03 +0200
Bernhard Voelker
The next issue is my underlying filesystem is a NFS mount. Not sure if will handle fallocate(FALLOC_FL_PUNCH_HOLE).
sorry, no idea if it will work over an NFS mount.
Hole punching is planned for NFS 4.2 which is currently in draft state. Client side support is actually available in Linux kernel since v3.19. You of course need server side support; not sure whether it is already available. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Andrei Borzenkov
-
Bernhard Voelker
-
Greg Freemyer