Re: Can moving data to a subvolume not take as long as a fully copy?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 14, 2013 at 05:41:55PM +0000, Hugo Mills wrote:
> On Mon, Jan 14, 2013 at 09:32:50AM -0800, Marc MERLIN wrote:
> > I made a mistake and copied data in the root of a new btrfs filesystem.
> > I created a subvolume, and used mv to put everything in there.
> > Something like:
> > cd /mnt
> > btrfs subvolume create dir
> > mv * dir
> > 
> > Except it's been running for over a day now (ok, it's 5TB of data)
> > 
> > Looks like mv is really copying all the data as if it were an entirely
> > different filesystem.
> > 
> > Is there not a way to short circuit this and only update the metadata?
> 
>    I guess the best way of doing this in this case is to teach mv to
> do cp --reflink=always then unlink the origin.
> 
>    Clearly that won't work over mount boundaries (where a copy of the
> data is the best you're going to get), but that's not what you've got
> here.

Mmmh, this made me think:
It seems that I could have done cp --reflink without duplicating the data
and running out of space.
Then, I could have deleted the originals?

Is that correct?

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux