Re: btrfs filesystem defragment error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 8, 2010 at 5:33 PM, Leonidas Spyropoulos
<artafinde@xxxxxxxxx> wrote:
> While on Ubuntu 10.10 I cannot get defragment working.
>
> inglor@selene:~$ btrfs filesystem defragment /media/Data/
> ioctl failed on /media/Data/ ret -1 errno 1
> total 1 failures
> ...
> Is it implemented on kernel 2.6.36 and above only?

You need to run it as root (via sudo or whatever).  On the other hand,
it probably doesn't work like you think it does, and you probably
don't want to defrag anyway :p

btrfs fi defrag takes a file or folder, and defrags just that file or
folder (i.e., no recursion).  If you wanted to defrag an entire tree,
you'd have to do something like "find /whatever | xargs -I{} btrfs fi
defrag {}" or some such.  This would have the effect of unlinking any
cow'd files, which isn't necessarily useful.

--Carey
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux