All of lore.kernel.org
 help / color / mirror / Atom feed
* Unexpected deletion behaviour between subvolume and normal directory
@ 2020-01-28 10:25 Robbie Smith
  2020-01-28 11:19 ` Holger Hoffstätte
  2020-01-28 11:38 ` Nikolay Borisov
  0 siblings, 2 replies; 5+ messages in thread
From: Robbie Smith @ 2020-01-28 10:25 UTC (permalink / raw)
  To: linux-btrfs

I wanted to try to convert my music library from a directory into a
subvolume so I could use btrfs send/receive to transfer (changed)
files between it and a USB backup. A bit of Googling suggested that
the approach would be:

> btrfs subvolume create /library/newmusic
> cp -ar --reflink=auto /library/music/* /library/newmusic/.
> rm -r /library/music

After about 30 seconds I realised that it was deleting files from both
/library/music and /library/newmusic. It appears I've only lost
everything starting with A, B or C, so I unmounted the device, and am
currently trying to use `btrfs restore` to get the files back and it
doesn't seem to be finding them.

I'm pretty sure deleting files from directory A isn't supposed to also
delete them from directory B, but that's what it did. Is this a bug?

Robbie

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

end of thread, other threads:[~2020-01-29  2:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-28 10:25 Unexpected deletion behaviour between subvolume and normal directory Robbie Smith
2020-01-28 11:19 ` Holger Hoffstätte
2020-01-28 11:38 ` Nikolay Borisov
2020-01-28 12:44   ` Robbie Smith
     [not found]     ` <CAJCQCtTCJpMSLYKQD+phEnF01iPL27dimrjsHyaCA=Xc76TniA@mail.gmail.com>
2020-01-29  2:26       ` Robbie Smith

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.