mv fails to preserve COW on btrfs

Bug #1400010 reported by Charlie Todd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
coreutils (Ubuntu)
New
Undecided
Unassigned

Bug Description

the /bin/mv command fails to preserve extended attributes, specifically the COW (lsattr; chattr +C) on btrfs, for both files and directories. Affects virtual machine images in VirtualBox which perform POORLY if hosted on btrfs without COW set.

Workaround:
1. Set the folder to have the COW flag (chattr +C .)
2. Back up all of the files (for c in *; do mv $c $c.old; done)
3. Copy the files to the same folder, assuming that there is space, and delete the backup upon success (for c in $.old; do cp $c ${c/.old/} && rm $c)

User has to copy the file to a COW flagged directory before VirtualBox will talk correctly to the block device images.

coreutils, 8.21-1ubuntu5, amd64
btrfs-tools, 3.12-1, amd64
kernel 3.13.0-32-generic

Filesystem was created under Trusty (14.04.1 LTS).

$ apt-cache policy coreutils
coreutils:
  Installed: 8.21-1ubuntu5
  Candidate: 8.21-1ubuntu5
  Version table:
 *** 8.21-1ubuntu5 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Thanks

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: coreutils 8.21-1ubuntu5
ProcVersionSignature: Ubuntu 3.13.0-32.57-generic 3.13.11.4
Uname: Linux 3.13.0-32-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Dec 6 15:33:07 2014
InstallationDate: Installed on 2014-11-06 (30 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
SourcePackage: coreutils
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Charlie Todd (chtodd) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.