Uploaded image for project: 'Evergreen'
  1. Evergreen
  2. EVG-12553

Ability to use reflinks on virtual workstation home volumes

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: app
    • Labels:

      Description

      XFS supports reflinks. On filesystems that support reflinks, it's possible to use cp --reflink[=always]. From the man page:

             When --reflink[=always] is specified, perform a lightweight copy,
             where the data blocks are copied only when modified.  If this is not
             possible the copy fails, or if --reflink=auto is specified, fall back
             to a standard copy.  Use --reflink=never to ensure a standard copy is
             performed.
      

      In contrast to a true copy, the bulk of the data doesn't need to be duplicated. In contrast to a hard link, if either the original or resulting file is modified, the other is untouched.

      ccache supports reflinks for caching. When operating in this mode, cache hits will cause ccache to reflink the compilation outputs from the cache into the build directories. This saves a disk copy, and prevents storage duplication.

      The following occurs when attempting to use reflinks on a virtual workstation:

      :~$ echo "Data" > file
      :~$ cp --reflink=always file file2
      cp: failed to clone 'file2' from 'file': Operation not supported
      

      Running xfs_info suggests that reflinking wasn't enabled when the filesystem was created:

      :~$ xfs_info /dev/nvme1n1
      meta-data=/dev/nvme1n1           isize=512    agcount=4, agsize=32768000 blks
               =                       sectsz=512   attr=2, projid32bit=1
               =                       crc=1        finobt=1 spinodes=0 rmapbt=0
               =                       reflink=0
      data     =                       bsize=4096   blocks=131072000, imaxpct=25
               =                       sunit=0      swidth=0 blks
      naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
      log      =internal               bsize=4096   blocks=64000, version=2
               =                       sectsz=512   sunit=0 blks, lazy-count=1
      realtime =none                   extsz=4096   blocks=0, rtextents=0
      
      

      It would be great to use this!

        Attachments

          Activity

            People

            Assignee:
            backlog-server-evg Backlog - Evergreen Team
            Reporter:
            spencer.jackson Spencer Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: