[PATCH][BTRFS-PROGS] Enhance btrfs fi df

2012-11-02 Thread Goffredo Baroncelli
Hi all, on the basis of the discussion in the thread '[RFC] New attempt to a better btrfs fi df', I prepared the following set of patches. These patches update the btrfs fi df command and add two new commands: - btrfs filesystem disk-usage path - btrfs device disk-usage path The command btrfs

[PATCH 1/8] Enhance the command btrfs filesystem df.

2012-11-02 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Enhance the command btrfs filesystem df to show space usage information for a mount point(s). It shows also an estimation of the space available, on the basis of the current one used. Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- Makefile

[PATCH 2/8] Create the man page entry for the command btrfs fi df

2012-11-02 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- man/btrfs.8.in | 49 + 1 file changed, 49 insertions(+) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index 9222580..27d0160 100644 ---

[PATCH 5/8] Add command btrfs filesystem disk-usage

2012-11-02 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- cmds-fi-disk_usage.c | 662 +- cmds-fi-disk_usage.h |2 + cmds-filesystem.c|2 + utils.c | 15 ++ utils.h

[PATCH 7/8] Add btrfs device disk-usage command

2012-11-02 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- cmds-device.c|3 ++ cmds-fi-disk_usage.c | 140 ++ cmds-fi-disk_usage.h |4 ++ 3 files changed, 147 insertions(+) diff --git

[PATCH 8/8] Create a new entry in btrfs man page for btrfs device disk-usage.

2012-11-02 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- man/btrfs.8.in |8 1 file changed, 8 insertions(+) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index eabf0a8..a411ff8 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -44,6

[PATCH 6/8] Create entry in man page for btrfs filesystem disk-usage

2012-11-02 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- man/btrfs.8.in | 13 + 1 file changed, 13 insertions(+) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index 27d0160..eabf0a8 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@

[PATCH 4/8] Move scrub_fs_info() and scrub_dev_info() in utils.c

2012-11-02 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Move scrub_fs_info() and scrub_dev_info() in utils.c because these will be used by the command btrfs filesystem disk-usage and btrfs device disk-usage. Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- cmds-scrub.c | 87

[PATCH 3/8] Move open_file_or_dir() in utils.c

2012-11-02 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Due to the moving of the scrub_fs_info() and scrub_device_info() in utils.h the function open_file_or_dir() is moved in utils.c too, in order to avoid the including of commands.h. Moreover in btrfsctl.c the function open_file_or_dir() is renamed as

Re: [PATCH][BTRFS-PROGS] Enhance btrfs fi df

2012-11-02 Thread Martin Steigerwald
Am Freitag, 2. November 2012 schrieb Goffredo Baroncelli: Hi all, on the basis of the discussion in the thread '[RFC] New attempt to a better btrfs fi df', I prepared the following set of patches. These patches update the btrfs fi df command and add two new commands: - btrfs filesystem

Re: [PATCH][BTRFS-PROGS] Enhance btrfs fi df

2012-11-02 Thread Goffredo Baroncelli
On 2012-11-02 12:18, Martin Steigerwald wrote: I can test on some other boxes next week, if you want to. Yes please, I just wonder about one thing: merkaba:[…]/btrfs-progs-unstable ./btrfs fi df / Disk size:18.62GB Disk allocated: 18.62GB Disk unallocated:

[PATCH][BTRFS-PROGS][V1] btrfs-show-super: a tool to dump superblock

2012-11-02 Thread Goffredo Baroncelli
Hi all, I updated the Stefan's program btrfs-show-super. Now it prints the results of some sanity checks (about checksum and superblock magic string), allow more than one dovice as argument and a '-a' switch which dumps all the device superblocks. # btrfs-show-super /dev/sdh1 superblock:

[PATCH] Add btrfs-show-super

2012-11-02 Thread Goffredo Baroncelli
Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- Makefile |5 +- btrfs-show-super.c | 284 2 files changed, 288 insertions(+), 1 deletion(-) create mode 100644 btrfs-show-super.c diff --git a/Makefile b/Makefile index

RE: no space left on device.

2012-11-02 Thread Kyle Gates
So I have ended up in a state where I can't delete files with rm. the error I get is no space on device. however I'm not even close to empty. /dev/sdb1 38G 27G 9.5G 75% there is about 800k files/dirs in this filesystem extra strange is that I can in another directory create and delete

Re: no space left on device.

2012-11-02 Thread Hugo Mills
On Fri, Nov 02, 2012 at 10:54:47AM -0500, Kyle Gates wrote: So I have ended up in a state where I can't delete files with rm. the error I get is no space on device. however I'm not even close to empty. /dev/sdb1 38G 27G 9.5G 75% there is about 800k files/dirs in this filesystem extra

Re: [PATCH][BTRFS-PROGS] Enhance btrfs fi df

2012-11-02 Thread Gabriel
On Fri, 02 Nov 2012 13:02:32 +0100, Goffredo Baroncelli wrote: On 2012-11-02 12:18, Martin Steigerwald wrote: Metadata, DUP is displayed as 3,50GB on the device level and as 1,75GB in total. I understand the logic behind this, but this could be a bit confusing. But it makes sense: Showing

Re: [PATCH][BTRFS-PROGS] Enhance btrfs fi df

2012-11-02 Thread Goffredo Baroncelli
On 11/02/2012 08:05 PM, Gabriel wrote: On Fri, 02 Nov 2012 13:02:32 +0100, Goffredo Baroncelli wrote: On 2012-11-02 12:18, Martin Steigerwald wrote: Metadata, DUP is displayed as 3,50GB on the device level and as 1,75GB in total. I understand the logic behind this, but this could be a bit

Re: [PATCH][BTRFS-PROGS] Enhance btrfs fi df

2012-11-02 Thread Gabriel
On Fri, 02 Nov 2012 20:31:56 +0100, Goffredo Baroncelli wrote: On 11/02/2012 08:05 PM, Gabriel wrote: On Fri, 02 Nov 2012 13:02:32 +0100, Goffredo Baroncelli wrote: On 2012-11-02 12:18, Martin Steigerwald wrote: Metadata, DUP is displayed as 3,50GB on the device level and as 1,75GB in total.

Re: [PATCH] Add btrfs-show-super

2012-11-02 Thread Stefan Behrens
On 11/02/2012 15:17, Goffredo Baroncelli wrote: Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- Makefile |5 +- btrfs-show-super.c | 284 2 files changed, 288 insertions(+), 1 deletion(-) create mode 100644

[PATCH][BTRFS-PROGS][V2] btrfs-show-super: a tool to dump superblock

2012-11-02 Thread Goffredo Baroncelli
Hi all, I updated the Stefan's program btrfs-show-super. Now it prints the results of some sanity checks (about checksum and superblock magic string), allow more than one dovice as argument and a '-a' switch which dumps all the device superblocks. # btrfs-show-super /dev/sdh1 superblock:

[PATCH] Add btrfs-show-super

2012-11-02 Thread Goffredo Baroncelli
Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- Makefile |5 +- btrfs-show-super.c | 284 2 files changed, 288 insertions(+), 1 deletion(-) create mode 100644 btrfs-show-super.c diff --git a/Makefile b/Makefile index

Re: [PATCH][BTRFS-PROGS] Enhance btrfs fi df

2012-11-02 Thread Michael Kjörling
On 2 Nov 2012 20:40 +, from g2p.c...@gmail.com (Gabriel): Now that I've started bikeshedding, here is something that I would find pretty much ideal: DataMetadata System Unallocated VolGroup/Btrfs Reserved 1.31TB 8.00MB +

Re: [PATCH][BTRFS-PROGS] Enhance btrfs fi df

2012-11-02 Thread Hugo Mills
On Fri, Nov 02, 2012 at 07:05:37PM +, Gabriel wrote: On Fri, 02 Nov 2012 13:02:32 +0100, Goffredo Baroncelli wrote: On 2012-11-02 12:18, Martin Steigerwald wrote: Metadata, DUP is displayed as 3,50GB on the device level and as 1,75GB in total. I understand the logic behind this, but

Re: [PATCH] Add btrfs-show-super

2012-11-02 Thread Stefan Behrens
On 11/02/2012 22:46, Goffredo Baroncelli wrote: Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- Makefile |5 +- btrfs-show-super.c | 284 2 files changed, 288 insertions(+), 1 deletion(-) create mode 100644

Re: [PATCH][BTRFS-PROGS] Enhance btrfs fi df

2012-11-02 Thread Gabriel
On Fri, 02 Nov 2012 22:06:04 +, Hugo Mills wrote: On Fri, Nov 02, 2012 at 07:05:37PM +, Gabriel wrote: On Fri, 02 Nov 2012 13:02:32 +0100, Goffredo Baroncelli wrote: On 2012-11-02 12:18, Martin Steigerwald wrote: Metadata, DUP is displayed as 3,50GB on the device level and as 1,75GB

Re: [PATCH][BTRFS-PROGS] Enhance btrfs fi df

2012-11-02 Thread Gabriel
On Fri, 02 Nov 2012 21:46:35 +, Michael Kjörling wrote: On 2 Nov 2012 20:40 +, from g2p.c...@gmail.com (Gabriel): Now that I've started bikeshedding, here is something that I would find pretty much ideal: DataMetadata System Unallocated

Re: [PATCH][BTRFS-PROGS] Enhance btrfs fi df

2012-11-02 Thread Hugo Mills
On Fri, Nov 02, 2012 at 11:23:14PM +, Gabriel wrote: On Fri, 02 Nov 2012 22:06:04 +, Hugo Mills wrote: On Fri, Nov 02, 2012 at 07:05:37PM +, Gabriel wrote: On Fri, 02 Nov 2012 13:02:32 +0100, Goffredo Baroncelli wrote: On 2012-11-02 12:18, Martin Steigerwald wrote:

What's the minimum size I can shrink my FS to?

2012-11-02 Thread Jordan Windsor
Hello, I'm trying to shrink my Btrfs filesystem to the smallest size it can go, here's the information: failed to read /dev/sr0 Label: 'Storage' uuid: 717d4a43-38b3-495f-841b-d223068584de Total devices 1 FS bytes used 491.86GB devid1 size 612.04GB used 605.98GB path /dev/sda6 Btrfs Btrfs

Re: What's the minimum size I can shrink my FS to?

2012-11-02 Thread cwillu
Run btrfs balance start -musage=1 -dusage=1, and then try it again. This may require update btrfs tools however. On Fri, Nov 2, 2012 at 10:09 PM, Jordan Windsor jorda...@gmail.com wrote: Hello, I'm trying to shrink my Btrfs filesystem to the smallest size it can go, here's the information:

Re: What's the minimum size I can shrink my FS to?

2012-11-02 Thread Jordan Windsor
Hello, here's the new output: [root@archpc ~]# btrfs bal start -musage=1 -dusage=1 /home/jordan/Storage/ Done, had to relocate 3 out of 609 chunks [root@archpc ~]# btrfs fi df /home/jordan/Storage/ Data: total=580.88GB, used=490.88GB System, DUP: total=32.00MB, used=76.00KB System: total=4.00MB,