unbrice / shake

Shake is a defragmenter that runs in userspace

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

man page should point out that shake has to be executed as root, neither does the error message

asmo123 opened this issue · comments

$> shake --pretend foo.bin
shake: foo.bin: FIBMAP failed: Operation not permitted

Maybe "You have to execute shake as root" would be a more meaningful error message.

$> which shake
/usr/bin/shake

Consequently the binary should be placed into /usr/sbin

I'm currently patching shake to use FIEMAP and only fall back to FIBMAP if unsupported. FIEMAP doesn't show this behavior, it works as non-root for me. However, shake needs to have write permissions in the current directory, as it places a temporary file there. Is this your problem?

You may want to look at #7, it should fix this for you.

I think it's not the write permission

$> whoami
xxx
$> ls -al /home/xxx/tmp | grep '..$'
drwx------ 8 xx users 4096 24. Apr 11:43 .
drwx------ 64 xxx users 12288 24. Apr 11:26 .
$> ls -al /home/xxx/tmp | grep build.log.gz
-rw------- 1 xxx users 219066 5. Feb 2015 build.log.gz
$> shake --pretend /home/xxx/tmp/build.log.gz
shake: /home/xxx/tmp/build.log.gz: FIBMAP failed: Operation not permitted
$> echo "test" > /home/xxx/tmp/shake.TMP ; echo $?
0
$> pwd
/home/xxx/tmp
$> cat shake.TMP
test

Right?

Could you try my FIEMAP patch from above?