All of lore.kernel.org
 help / color / mirror / Atom feed
* recursive subvolume delete
@ 2011-10-02 14:38 krzf83@gmail.com 
  2011-10-02 16:06 ` Hugo Mills
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: krzf83@gmail.com  @ 2011-10-02 14:38 UTC (permalink / raw)
  To: linux-btrfs

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: recursive subvolume delete
  2011-10-02 14:38 recursive subvolume delete krzf83@gmail.com 
@ 2011-10-02 16:06 ` Hugo Mills
  2011-10-02 17:17 ` David Sterba
  2011-10-02 21:33 ` Stephane Chazelas
  2 siblings, 0 replies; 4+ messages in thread
From: Hugo Mills @ 2011-10-02 16:06 UTC (permalink / raw)
  To: krzf83@gmail.com ; +Cc: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 771 bytes --]

On Sun, Oct 02, 2011 at 04:38:21PM +0200, krzf83@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!                           

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: recursive subvolume delete
  2011-10-02 14:38 recursive subvolume delete krzf83@gmail.com 
  2011-10-02 16:06 ` Hugo Mills
@ 2011-10-02 17:17 ` David Sterba
  2011-10-02 21:33 ` Stephane Chazelas
  2 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2011-10-02 17:17 UTC (permalink / raw)
  To: krzf83@gmail.com ; +Cc: linux-btrfs

On Sun, Oct 02, 2011 at 04:38:21PM +0200, krzf83@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/177d        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: -


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: recursive subvolume delete
  2011-10-02 14:38 recursive subvolume delete krzf83@gmail.com 
  2011-10-02 16:06 ` Hugo Mills
  2011-10-02 17:17 ` David Sterba
@ 2011-10-02 21:33 ` Stephane Chazelas
  2 siblings, 0 replies; 4+ messages in thread
From: Stephane Chazelas @ 2011-10-02 21:33 UTC (permalink / raw)
  To: krzf83@gmail.com ; +Cc: linux-btrfs

2011-10-02 16:38:21 +0200, krzf83@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-02 21:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-02 14:38 recursive subvolume delete krzf83@gmail.com 
2011-10-02 16:06 ` Hugo Mills
2011-10-02 17:17 ` David Sterba
2011-10-02 21:33 ` Stephane Chazelas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.