Comments (2)
shake
tries really hard not to destroy files, at worst it may let you know that the file has been renamed. The error message should look like failed to allocate space! file has been saved at ...
. Can you please confirm this is what you are seeing?
from shake.
That's true, although it means that shake cannot be used on filesystems not supporting (or emulating via glibc) fallocate. The error message is also unclear, at least to me it wasn't apparent that the original file had been truncated (and not deleted, so it can even take a while to notice). For some reason it also seems that hundreds of files on the filesystem I was using it on were truncated, but I've not been able to reproduce it yet (I don't think I ran it in a loop for individual files, but that's distinct possibility too).
user@server:~/shake> find test | sudo ./shake -vv --old=0
IDEAL START END FRAGC CRUMBC AGE SHOCKED NAME
./shake: test/CPackSourceConfig.cmake: failed to allocate space! file has been saved at shakenuXJaF: Operation not supported
user@server:~/shake> ls -l /lib/libc.so.6
lrwxrwxrwx 1 root root 14 Dec 11 2018 /lib/libc.so.6 -> libc-2.11.3.so
user@server~/shake> uname -a
Linux server 3.0.101-108.87-default #1 SMP Fri Feb 22 16:42:57 UTC 2019 (10e85a8) x86_64 x86_64 x86_64 GNU/Linux
Updating the system isn't an option currently (heck, there's plenty of embedded/NAS appliances where updating REALLY isn't an option). I guess it could say "file has been truncated and saved" to make it clearer it isn't just inconsequential advisory, but using fallocate() only if it actually works would seem to solve the problems and have it degrade gracefully to how it used to function.
from shake.
Related Issues (19)
- man page should point out that shake has to be executed as root, neither does the error message HOT 4
- RFE: Better lock handling HOT 2
- RFE: Reflink the file before rewriting it HOT 1
- RFE: Rename first copy into place for non-hardlinked files HOT 2
- Support for ZFS (open zfs) filesystems HOT 3
- Reformat code HOT 2
- use fiemap instead of fibmap ioctl to support btrfs HOT 1
- Investigate interactions with realtime file indexers HOT 1
- musl incompatibility due to use of error() from error.h
- You need libattr headers for Shake to build. HOT 2
- PPA not working on newer Ubuntu distros HOT 2
- tmpfile location ? HOT 1
- Update CMakeFiles HOT 1
- Deprecation compilation warnings HOT 1
- Fallback on posix_fallocate if fallocate fail HOT 2
- You need libattr headers for Shake to build HOT 1
- Was using a Linux Mint 13/14 LTS Live Boot and was unable to install Shake due to dependencies HOT 2
- RFE: Separate judgement and defrag part into two binaries
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shake.