# Move operation is extremely slow

**URL:** <https://cernvm-forum.cern.ch/t/move-operation-is-extremely-slow/345>\
**Category:** Publisher / Stratum 0\
**Created:** [August 30, 2023, 1:34am UTC](https://cernvm-forum.cern.ch/t/move-operation-is-extremely-slow/345 "2023-08-30T01:34:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rptaylor](https://cernvm-forum.cern.ch/letter_avatar_proxy/v4/letter/r/49beb7/32.png) [@rptaylor](https://cernvm-forum.cern.ch/u/rptaylor)\
**Post date:** [August 30, 2023, 1:34am UTC](https://cernvm-forum.cern.ch/t/move-operation-is-extremely-slow/345/1 "2023-08-30T01:34:33Z")

</div>

Hello,

We have an older repository that we want to replace with a new repository, but users may still be accessing the path /cvmfs/oldrepo/content. So we want to move the ‘content’ directory out of the way so we can replace it with a symlink to the new repo:  
/cvmfs/oldrepo/content → /cvmfs/newrepo/content

However a publish operation (on a remote publisher via GW) on the old repo to simply do ‘mv content whatever’ (so we can create a symlink named ‘content’) is extremely slow. There is practically no CPU usage, and the IO usage also appears low. The only discernable activity in /var/spool/cvmfs/oldrepo appeared to be a gradual growth in /var/spool/cvmfs/oldrepo/cache , so I wonder if it was trying to read the entire content directory first from the stratum 0 and then write that back to the new location on the stratum 0 which would be very inefficient.

OTOH, trying the same thing directly on the stratum 0 server quickly filled up the spool space - which is limited in size on the s0 because all publishing is normally done via the remote publisher node.

Is there anyway to do a fast and efficient move operation of a large directory of data?

Thanks.

---

<div class="post-metadata">

**Author:** ![dwd](https://cernvm-forum.cern.ch/letter_avatar_proxy/v4/letter/d/b9bd4f/32.png) [@dwd](https://cernvm-forum.cern.ch/u/dwd)\
**Post date:** [August 30, 2023, 9:20pm UTC](https://cernvm-forum.cern.ch/t/move-operation-is-extremely-slow/345/2 "2023-08-30T21:20:52Z")

</div>

I don’t know if it works through a gateway, but a [template transaction](https://cvmfs.readthedocs.io/en/stable/cpt-repo.html#template-transactions) may be what you want. That quickly duplicates a tree from one location to another by replicating the catalogs. Then you could remove the old tree, and hopefully that won’t take too long.

---

<div class="post-metadata">

**Author:** ![system](https://cernvm-forum.cern.ch/uploads/default/original/1X/3e336816dfbfe00295701fad16d3bf5b3fca3a02.jpeg) [@system](https://cernvm-forum.cern.ch/u/system)\
**Post date:** [September 14, 2023, 9:21pm UTC](https://cernvm-forum.cern.ch/t/move-operation-is-extremely-slow/345/3 "2023-09-14T21:21:18Z")

</div>

Closed on September 14, 2023, 9:21pm UTC

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
