3
使用 fallocate 快速占用磁盘空间
source link: https://blog.shuf.io/post/use-fallocate-to-reserve-disk-space
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Oct 07, 2023
使用 fallocate 快速占用磁盘空间
简单记一下:
$ fallocate -l 180G /tmp/testfile
底下调用的就是 fallocate()/posix_fallocate()
这个系统调用。内核的话,例如 ext4,实现是在 fs/ext4/extents.c
的 ext4_fallocate
Except where otherwise noted, content on this page is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International license.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK