check for reflink capability and for shared data

2013-08-24 Thread Thomas Koch
Hi, how can I do the following in a shell script: - check whether my file system supports cp --reflink? - check whether two files share the same data on disk, i.e. one has been created by cp --reflink of the other? Thank you! Thomas Koch -- To unsubscribe from this list: send the line

Re: check for reflink capability and for shared data

2013-08-24 Thread Hugo Mills
On Sat, Aug 24, 2013 at 06:09:58PM +0200, Thomas Koch wrote: Hi, how can I do the following in a shell script: - check whether my file system supports cp --reflink? touch foo; if cp --reflink=always foo bar; then ...; fi; rm -f foo bar - check whether two files share the same data on

Re: Help interpreting RAID1 space allocation

2013-08-24 Thread Joel Johnson
On Aug 23, 2013, Chris Murphy li...@colorremedies.com wrote: When replacing a failed disk, I'd like btrfs to compare states between the available drives and know that it needs to catch up the newly added device, but this doesn't yet happen. It's necessary to call btrfs balance. I can only

Re: Help interpreting RAID1 space allocation

2013-08-24 Thread Joel Johnson
On 2013-08-24 11:24, Joel Johnson wrote: Should I file a few bugs to capture the related issues? Here are the discrete issues that seem to be present from a user point of view: After writing this, I figured I'd experiment with the current state and try to properly delete and add the sdd

[PATCH] Btrfs: fix memory leak of uuid_root in free_fs_info

2013-08-24 Thread Filipe David Borba Manana
Signed-off-by: Filipe David Borba Manana fdman...@gmail.com --- fs/btrfs/ctree.h |1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index c90be01..742dea1 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -3460,6 +3460,7 @@ static inline void

Re: Help interpreting RAID1 space allocation

2013-08-24 Thread Sandy McArthur
On Sat, Aug 24, 2013 at 2:02 PM, Joel Johnson mrj...@lixil.net wrote: On 2013-08-24 11:24, Joel Johnson wrote: Should I file a few bugs to capture the related issues? Here are the discrete issues that seem to be present from a user point of view: After writing this, I figured I'd experiment

Re: Help interpreting RAID1 space allocation

2013-08-24 Thread Joel Johnson
On 2013-08-24 14:30, Sandy McArthur wrote: I was surprised to find that I'm not allowed to remove one of the two drives in a RAID1. Kernel message is btrfs: unable to go below two devices on raid1 Not allowing it by default makes some sense, however a --force flag or something would be

Re: Help interpreting RAID1 space allocation

2013-08-24 Thread Chris Murphy
On Aug 24, 2013, at 11:24 AM, Joel Johnson mrj...@lixil.net wrote: Similar to what Duncan described in his response, on a hot-remove (without doing the proper btrfs device delete), there is no opportunity for a rebalance or metadata change on the pulled drives, so I would expect there to