recursive subvolume delete

2011-10-02 Thread krz...@gmail.com
btrfs is missing recursive subvolume delete. You can't delete
subvolume if there is other subvolumes/snapshots in it. Also I think
there are no real tools to find out which directories are
subvolumes/snapshots
--
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: recursive subvolume delete

2011-10-02 Thread Hugo Mills
On Sun, Oct 02, 2011 at 04:38:21PM +0200, krz...@gmail.com  wrote:
 btrfs is missing recursive subvolume delete. You can't delete
 subvolume if there is other subvolumes/snapshots in it. Also I think
 there are no real tools to find out which directories are
 subvolumes/snapshots

$ btrfs sub list /mountpoint

   This will tell you what subvolumes you have on any given filesystem.

   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
--- There's an infinite number of monkeys outside who want to ---
   talk to us about this new script for Hamlet   
   they've worked out!   


signature.asc
Description: Digital signature


Re: recursive subvolume delete

2011-10-02 Thread David Sterba
On Sun, Oct 02, 2011 at 04:38:21PM +0200, krz...@gmail.com  wrote:
 Also I think there are no real tools to find out which directories are
 subvolumes/snapshots

Well, there are, but these are the _real_ tools, you know.

subv1 is a subvolume
snap1 is it's snapshot

$ stat subv1 snap1
  File: `subv1'
  Size: 0   Blocks: 0  IO Block: 4096   directory
Device: 1ch/28d Inode: 256 Links: 1
Access: (0700/drwx--)  Uid: (0/root)   Gid: (0/root)
Access: 2011-10-02 19:12:04.493885220 +0200
Modify: 2011-10-02 19:12:04.493885220 +0200
Change: 2011-10-02 19:12:04.493885220 +0200
 Birth: -
  File: `snap1'
  Size: 0   Blocks: 0  IO Block: 4096   directory
Device: b1h/177dInode: 256 Links: 1
Access: (0700/drwx--)  Uid: (0/root)   Gid: (0/root)
Access: 2011-10-02 19:12:04.493885220 +0200
Modify: 2011-10-02 19:12:04.493885220 +0200
Change: 2011-10-02 19:12:04.493885220 +0200
 Birth: -


Common signature is Inode: 256 and this is acutally the same test which is
performed by 'btrfs subvol ...' to check whether the source dir is a
subvolume, and by the kernel module as well.


david
--
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: recursive subvolume delete

2011-10-02 Thread Stephane Chazelas
2011-10-02 16:38:21 +0200, krz...@gmail.com :
 Also I think there are no real tools to find out which
 directories are subvolumes/snapshots
[...]

On my system (debian), there's mountpoint command (from the
initscript package from
http://savannah.nongnu.org/projects/sysvinit) that will tell you
that (it compares the st_dev of the given directory with that of
directory/..).

-- 
Stephane
--
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