Re: Announcing btrfs-gui
On Wed, Nov 23, 2011 at 6:33 AM, Hugo Mills wrote: > On Sat, Nov 12, 2011 at 01:24:57AM +0100, Amedee Van Gasse wrote: >> On 02-06-11 01:20, Hugo Mills wrote: >> > Unless the traffic gets too high-volume, or unless someone >> >important objects, I'm going to suggest that bug reports should go to >> >this list for now (cc'd me, if you like). Note that this isn't an >> >"offical" btrfs project -- it's just something I knocked together on >> >my own. >> >> >> I seem to have stumbled upon a bug. >> During install, Ubuntu gives the user the option to use btrfs as the >> root filesystem. It automatically creates two subvolumes, @ (for /) >> and @home (for /home, only if no other partition is used for /home), >> like this: >> >> mount | grep btrfs >> /dev/sda6 on / type btrfs (rw,subvol=@) >> /dev/sda6 on /home type btrfs (rw,subvol=@home) >> /dev/sda6 on >> /tmp/btrfs-gui-kl6zx1/12624/eba4f1e9-5b55-4e14-abb8-5a3cf3625c56 >> type btrfs (rw,subvolid=0) >> >> When gtrfs-gui scans for filesystems, it gives the error >> Root helper exception: b'@' is not JSON serializable > [snip] > > Mmm... That could be fun. :) > > Thanks for the bug report. I hope I'll have time to look into this > next week. Looks like a unicode screwup; python 3 doesn't do implicit unicode conversions anymore, so passing a bytestring to the json module isn't supported. The solution will be something along the lines of "subvol.decode('ascii')" (or possibly utf-8 if you're willing to silently break on the admittedly obscure case of a non-ascii subvolume name in an installation using an encoding other than utf-8). -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Announcing btrfs-gui
On Sat, Nov 12, 2011 at 01:24:57AM +0100, Amedee Van Gasse wrote: > On 02-06-11 01:20, Hugo Mills wrote: > >Unless the traffic gets too high-volume, or unless someone > >important objects, I'm going to suggest that bug reports should go to > >this list for now (cc'd me, if you like). Note that this isn't an > >"offical" btrfs project -- it's just something I knocked together on > >my own. > > > I seem to have stumbled upon a bug. > During install, Ubuntu gives the user the option to use btrfs as the > root filesystem. It automatically creates two subvolumes, @ (for /) > and @home (for /home, only if no other partition is used for /home), > like this: > > mount | grep btrfs > /dev/sda6 on / type btrfs (rw,subvol=@) > /dev/sda6 on /home type btrfs (rw,subvol=@home) > /dev/sda6 on > /tmp/btrfs-gui-kl6zx1/12624/eba4f1e9-5b55-4e14-abb8-5a3cf3625c56 > type btrfs (rw,subvolid=0) > > When gtrfs-gui scans for filesystems, it gives the error > Root helper exception: b'@' is not JSON serializable [snip] Mmm... That could be fun. :) Thanks for the bug report. I hope I'll have time to look into this next week. Hugo. -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- The English language has the mot juste for every occasion. --- signature.asc Description: Digital signature
Re: Announcing btrfs-gui
On 6/1/2011 7:20 PM, Hugo Mills wrote: Over the last few weeks, I've been playing with a foolish idea, mostly triggered by a cluster of people being confused by btrfs's free space reporting (df vs btrfs fi df vs btrfs fi show). I also wanted an excuse, and some code, to mess around in the depths of the FS data structures. Like all silly ideas, this one got a bit out of hand, and seems to have turned into something vaguely useful. I'm therefore pleased to announce the first major public release of btrfs-gui[1]: a point-and- click tool for managing btrfs filesystems. This is a nice little tool. The one suggestion that I have is that it display the actual chunks and where they are located. It seems that right now it uses the same ioctl that btrfs fi df uses, and that just gets the total combined size for all chunks of a given type. It would be nice if the gui actually parsed the chunk tree and showed each individual chunk with lines showing how they are mapped to the physical disks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Announcing btrfs-gui
On 02-06-11 01:20, Hugo Mills wrote: *snip* Like all silly ideas, this one got a bit out of hand, and seems to have turned into something vaguely useful. I'm therefore pleased to announce the first major public release of btrfs-gui[1]: a point-and- click tool for managing btrfs filesystems. The tool currently can scan for and list btrfs filesystems and the volumes they live on. It can show the allocation and usage of data in a selected filesystem, categorised by use, replication, and device. It can show and manipulate subvolumes and snapshots: creation, deletion, and setting the default. For those with servers to manage, it also has the ability to ssh into a remote machine, and manage its filesystems remotely (so you don't have to have X installed on your servers just to use btrfs-gui on them). *snip* Unless the traffic gets too high-volume, or unless someone important objects, I'm going to suggest that bug reports should go to this list for now (cc'd me, if you like). Note that this isn't an "offical" btrfs project -- it's just something I knocked together on my own. I seem to have stumbled upon a bug. During install, Ubuntu gives the user the option to use btrfs as the root filesystem. It automatically creates two subvolumes, @ (for /) and @home (for /home, only if no other partition is used for /home), like this: mount | grep btrfs /dev/sda6 on / type btrfs (rw,subvol=@) /dev/sda6 on /home type btrfs (rw,subvol=@home) /dev/sda6 on /tmp/btrfs-gui-kl6zx1/12624/eba4f1e9-5b55-4e14-abb8-5a3cf3625c56 type btrfs (rw,subvolid=0) When gtrfs-gui scans for filesystems, it gives the error Root helper exception: b'@' is not JSON serializable This is the relevant console output: Helper: found label None, UUID eba4f1e9-5b55-4e14-abb8-5a3cf3625c56 Helper: found dev 1 = /dev/sda6 Helper: Created private directory /tmp/btrfs-gui-kl6zx1 Helper: Mounted filesystem UUID=eba4f1e9-5b55-4e14-abb8-5a3cf3625c56 at /tmp/btrfs-gui-kl6zx1/12624/eba4f1e9-5b55-4e14-abb8-5a3cf3625c56 Traceback (most recent call last): File "/usr/local/lib/python3.2/dist-packages/btrfsgui/hlp/helper.py", line 40, in main COMMANDS[command](parameters) File "/usr/local/lib/python3.2/dist-packages/btrfsgui/hlp/subvol.py", line 126, in sv_list sys.stdout.write(json.dumps(res)) File "/usr/lib/python3.2/json/__init__.py", line 224, in dumps return _default_encoder.encode(obj) File "/usr/lib/python3.2/json/encoder.py", line 188, in encode chunks = self.iterencode(o, _one_shot=True) File "/usr/lib/python3.2/json/encoder.py", line 246, in iterencode return _iterencode(o, 0) File "/usr/lib/python3.2/json/encoder.py", line 170, in default raise TypeError(repr(o) + " is not JSON serializable") TypeError: b'@' is not JSON serializable Kind regards, Amedee Van Gasse ame...@vangasse.eu -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Announcing btrfs-gui 0.3-rc1
Finally, I've found some time to finish off the latest slice of btrfs-gui development. I've put up version 0.3-rc1 on the git repo at http://git.darksatanic.net/repo/btrfs-gui.git/ and the repository can be browsed through gitweb at [1]. New features since 0.2: * mkfs * add/remove devices * assorted bug-fixes Hugo. [1] http://git.darksatanic.net/cgi/gitweb.cgi?p=btrfs-gui.git;a=summary -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- "You are demons, and I am in Hell!" "Well, technically, it's --- London, but it's an easy mistake to make." signature.asc Description: Digital signature
Re: Announcing btrfs-gui
Excerpts from Hugo Mills's message of 2011-06-01 19:20:58 -0400: >Over the last few weeks, I've been playing with a foolish idea, > mostly triggered by a cluster of people being confused by btrfs's free > space reporting (df vs btrfs fi df vs btrfs fi show). I also wanted an > excuse, and some code, to mess around in the depths of the FS data > structures. > This is really interesting. I'm updating my local install of python and friends so it can run properly. But I like the idea and will check it out. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Announcing btrfs-gui
On Thu, Jun 02, 2011 at 09:41:08AM +0100, Hugo Mills wrote: > On Thu, Jun 02, 2011 at 03:31:16PM +0700, Fajar A. Nugraha wrote: > > On Thu, Jun 2, 2011 at 6:20 AM, Hugo Mills wrote: > > > Over the last few weeks, I've been playing with a foolish idea, > > > mostly triggered by a cluster of people being confused by btrfs's free > > > space reporting (df vs btrfs fi df vs btrfs fi show). I also wanted an > > > excuse, and some code, to mess around in the depths of the FS data > > > structures. > > > > > > Like all silly ideas, this one got a bit out of hand, and seems to > > > have turned into something vaguely useful. I'm therefore pleased to > > > announce the first major public release of btrfs-gui[1]: a point-and- > > > click tool for managing btrfs filesystems. > > > > > > The tool currently can scan for and list btrfs filesystems and the > > > volumes they live on. It can show the allocation and usage of data in > > > a selected filesystem, categorised by use, replication, and device. It > > > can show and manipulate subvolumes and snapshots: creation, deletion, > > > and setting the default. > > > > > > Some comments: > > (1) Currently it needs to be run from the directory where it's > > downloaded, even after a "python3 setup.py install". When run from > > other directory, it bails with [snip] > > OSError: [Errno 2] No such file or directory: './btrfs-gui-helper' > > > > Is this intentional? > >No, and will be fixed later today. I forsee an emergency 0.2.1 > coming shortly. :) OK, it's fixed in git in the stable-v0.2 branch. Unless anyone else reports something that needs fixing over the weekend, I'll tag it as 0.2.1 on Sunday and roll another release tarball. (The fix is actually pretty ugly, and has some poor UX in it for one case, but I've run out of brain this evening, and can't face the shell hackery necessary to do it nicely right now.) > > (2) When showing space usage for a single-device FS, selecting "Show > > unallocated space as raw space", why is the top and bottom graph > > different? Shouldn't it be the same, since there's only one device? > >Good question. I shall investigate what's going on. OK, on investigation and reflection, it shouldn't be identical, because metadata is DUP. The per-disk displays show actual physical disk usage; the filesystem display at the top shows unique data. Therefore, the top display will show half the amount of metadata than the bottom. Hugo. -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- Comic Sans goes into a bar, and the barman says, "We don't --- serve your type here." signature.asc Description: Digital signature
Re: Announcing btrfs-gui
On Thu, Jun 02, 2011 at 03:31:16PM +0700, Fajar A. Nugraha wrote: > On Thu, Jun 2, 2011 at 6:20 AM, Hugo Mills wrote: > > Over the last few weeks, I've been playing with a foolish idea, > > mostly triggered by a cluster of people being confused by btrfs's free > > space reporting (df vs btrfs fi df vs btrfs fi show). I also wanted an > > excuse, and some code, to mess around in the depths of the FS data > > structures. > > > > Like all silly ideas, this one got a bit out of hand, and seems to > > have turned into something vaguely useful. I'm therefore pleased to > > announce the first major public release of btrfs-gui[1]: a point-and- > > click tool for managing btrfs filesystems. > > > > The tool currently can scan for and list btrfs filesystems and the > > volumes they live on. It can show the allocation and usage of data in > > a selected filesystem, categorised by use, replication, and device. It > > can show and manipulate subvolumes and snapshots: creation, deletion, > > and setting the default. > > > Some comments: > (1) Currently it needs to be run from the directory where it's > downloaded, even after a "python3 setup.py install". When run from > other directory, it bails with > > Traceback (most recent call last): > File "/usr/local/bin/btrfs-gui", line 5, in > btrfsgui.main.main() > File "/usr/local/lib/python3.2/dist-packages/btrfsgui/main.py", line > 24, in main > subproc = init_root_process(options) > File "/usr/local/lib/python3.2/dist-packages/btrfsgui/sudo.py", line > 31, in init_root_process > stdin=subprocess.PIPE, stdout=subprocess.PIPE) > File "/usr/lib/python3.2/subprocess.py", line 736, in __init__ > restore_signals, start_new_session) > File "/usr/lib/python3.2/subprocess.py", line 1330, in _execute_child > raise child_exception_type(errno_num, err_msg) > OSError: [Errno 2] No such file or directory: './btrfs-gui-helper' > > Is this intentional? No, and will be fixed later today. I forsee an emergency 0.2.1 coming shortly. :) > (2) When showing space usage for a single-device FS, selecting "Show > unallocated space as raw space", why is the top and bottom graph > different? Shouldn't it be the same, since there's only one device? Good question. I shall investigate what's going on. > (3) Not directly related to btrfs-gui, but I've been wondering what's > the correct way to SHOW the current default subvolume? The btrfs-progs tools don't have a way of doing this. It's relatively easy to do: use the tree-search ioctl to search for a DIR_ITEM key in the tree of tree roots with the name "default". The corresponding FS tree is the default subvolume. It's just not implemented yet. Thanks for the feedback. Hugo. -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- Welcome to Rivendell, Mr Anderson... --- signature.asc Description: Digital signature
Re: Announcing btrfs-gui
On Thu, Jun 2, 2011 at 6:20 AM, Hugo Mills wrote: > Over the last few weeks, I've been playing with a foolish idea, > mostly triggered by a cluster of people being confused by btrfs's free > space reporting (df vs btrfs fi df vs btrfs fi show). I also wanted an > excuse, and some code, to mess around in the depths of the FS data > structures. > > Like all silly ideas, this one got a bit out of hand, and seems to > have turned into something vaguely useful. I'm therefore pleased to > announce the first major public release of btrfs-gui[1]: a point-and- > click tool for managing btrfs filesystems. > > The tool currently can scan for and list btrfs filesystems and the > volumes they live on. It can show the allocation and usage of data in > a selected filesystem, categorised by use, replication, and device. It > can show and manipulate subvolumes and snapshots: creation, deletion, > and setting the default. Some comments: (1) Currently it needs to be run from the directory where it's downloaded, even after a "python3 setup.py install". When run from other directory, it bails with Traceback (most recent call last): File "/usr/local/bin/btrfs-gui", line 5, in btrfsgui.main.main() File "/usr/local/lib/python3.2/dist-packages/btrfsgui/main.py", line 24, in main subproc = init_root_process(options) File "/usr/local/lib/python3.2/dist-packages/btrfsgui/sudo.py", line 31, in init_root_process stdin=subprocess.PIPE, stdout=subprocess.PIPE) File "/usr/lib/python3.2/subprocess.py", line 736, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.2/subprocess.py", line 1330, in _execute_child raise child_exception_type(errno_num, err_msg) OSError: [Errno 2] No such file or directory: './btrfs-gui-helper' Is this intentional? (2) When showing space usage for a single-device FS, selecting "Show unallocated space as raw space", why is the top and bottom graph different? Shouldn't it be the same, since there's only one device? (3) Not directly related to btrfs-gui, but I've been wondering what's the correct way to SHOW the current default subvolume? -- Fajar -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Announcing btrfs-gui
Over the last few weeks, I've been playing with a foolish idea, mostly triggered by a cluster of people being confused by btrfs's free space reporting (df vs btrfs fi df vs btrfs fi show). I also wanted an excuse, and some code, to mess around in the depths of the FS data structures. Like all silly ideas, this one got a bit out of hand, and seems to have turned into something vaguely useful. I'm therefore pleased to announce the first major public release of btrfs-gui[1]: a point-and- click tool for managing btrfs filesystems. The tool currently can scan for and list btrfs filesystems and the volumes they live on. It can show the allocation and usage of data in a selected filesystem, categorised by use, replication, and device. It can show and manipulate subvolumes and snapshots: creation, deletion, and setting the default. For those with servers to manage, it also has the ability to ssh into a remote machine, and manage its filesystems remotely (so you don't have to have X installed on your servers just to use btrfs-gui on them). You can get the latest version from git[2] (or gitweb[3]), or tarball download of the sources from [4]. To install and run the GUI, you will need python3 and the python tk libraries (package python3-tk on my Debian system). The root helper component (which can be installed independently on an X-less server) will run under python2 or python3, depending on how it's installed. Installation instructions can be found on the main web page, and in the README file. Unless the traffic gets too high-volume, or unless someone important objects, I'm going to suggest that bug reports should go to this list for now (cc'd me, if you like). Note that this isn't an "offical" btrfs project -- it's just something I knocked together on my own. Finally, I'd like to thank David Sterba for testing the pre-release versions, reporting bugs, and making many good suggestions for improvements. Any deviation from his instructions is entirely my fault. :) Hugo. [1] http://carfax.org.uk/btrfs-gui/ [2] http://git.darksatanic.net/repo/btrfs-gui.git/ [3] http://git.darksatanic.net/cgi/gitweb.cgi?p=btrfs-gui.git;a=summary [4] http://carfax.org.uk/node/79 -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- Great oxymorons of the world, no. 7: The Simple Truth --- signature.asc Description: Digital signature