linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FIBMAP unsupported
@ 2014-10-02 15:13 Marc Dietrich
  2014-10-02 17:25 ` David Sterba
  0 siblings, 1 reply; 7+ messages in thread
From: Marc Dietrich @ 2014-10-02 15:13 UTC (permalink / raw)
  To: linux-btrfs

Hi,

I have a large (25G) virtual disk on a btrfs fs. Yes, I know this is not 
optimial. So I try to defrag it from time to time. However, using "btrfs fi 
defrag -c vm.vdi" results in even more fragments than before (reported by 
filefrag). So I wrote my own pseudo defragger,

-----
#!/bin/sh

test -f $1 || exit 2

echo "defrag $1"
/usr/sbin/filefrag $1 || exit

fallocate -n -l `filesize $1` $1.new || exit
chattr +C $1.new
dd if=$1 of=$1.new conv=notrunc oflag=append status=none
chmod --reference $1 $1.new
chown --reference $1 $1.new
mv $1.new $1
/usr/sbin/filefrag $1

-----

which produces much better results (ok, the file must not be in use). 
Somewhere in the 3.17 cycle the resulting image got corrupted using the script 
above. 

Running filefrag on it returns "FIBMAP unsupported".

Virtualbox returns  "AHCI#0P0: Read at offset 606236672 (49152 bytes left) 
returned rc=VERR_DEV_IO_ERROR". No errors in the kernel log.

Trying "cp vm.vdi /dev/null" returns: cp: Error reading „vm.vdi“: IO-Error

kernel 3.17-rc7
btrfs 3.17.x
mount options: rw,nodiratime,relatime,compress=lzo,space_cache,autodefrag

Marc


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-10-04 21:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-02 15:13 FIBMAP unsupported Marc Dietrich
2014-10-02 17:25 ` David Sterba
2014-10-02 17:39   ` Hugo Mills
2014-10-02 19:55   ` Marc Dietrich
2014-10-02 22:11     ` Marc Dietrich
2014-10-03 13:15       ` Filipe Manana
2014-10-04 21:33         ` Marc Dietrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).