I performed a standard Debian install using wheezy/testing netinst iso for amd64. After the install completed I booted into a live environment so that I could snapshot the root as a btrfs subvolume named 'root'. To do so I renamed the /root directory to /rootuser temporarily however I am not able to move /rootuser back to /root in the new subvolume. I've seen other posts where people rename and move around the /root directory without any appearent issue. Is this a bug with btrfs? Here are the steps to replicate:
Install Debian on btrfs (/dev/sda3, /dev/sda1=/boot (ext4), /dev/sda2=swap), reboot into live environment (Linux Mint Debian Ediiton 2012-04 in my case) then from a terminal:
$ sudo su - # btrfs filesystem label /dev/sda3 root # mkdir /media/root # mount /dev/sda3 /media/root # cd /media/root # mv /root /rootuser # btrfs subvolume snapshot . root # btrfs subvolume list . # get the subvolume id as $SUBVOLID # btrfs subvolume set-default $SUBVOLID root # rm -rf bin boot etc ... # everything except the root subvolume. # mv root/rootuser root/root
The result is a 'not permitted' error.
# mkdir root/root
results ins an 'already exists' message.
I've also tried the equivelent from inside a chroot environment via:
# mount /dev/sda1 boot # mount --rbind /dev dev # mount --rbind /proc proc # mount --rbind /sys sys # chroot /media/root/root /bin/bash
but I got the same results.
Am I doing something wrong? Any pointers would be helpful. I know I shouldn't have messed with he /root folder in the first place, but it's too late now.