mv fails to preserve COW on btrfs
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://
100 /var/lib/
Thanks
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: coreutils 8.21-1ubuntu5
ProcVersionSign
Uname: Linux 3.13.0-32-generic x86_64
NonfreeKernelMo
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)