All of lore.kernel.org
 help / color / mirror / Atom feed
* move subvolume to directory fails
@ 2015-01-17 21:45 Elliot Wolk
  0 siblings, 0 replies; only message in thread
From: Elliot Wolk @ 2015-01-17 21:45 UTC (permalink / raw)
  To: linux-btrfs

renaming read-only subvolumes works fine, as long as you dont move them 
to a new directory.
create a ro snapshot, and mv it to a subdir or a parent directory. it 
fails with 'Read-only file system'. no nested-subvolumes involved, just 
the base and the single snapshot.
is this a bug? is this by design? i cant find any documentation about it 
or any bug reports. all i see is the same advice 'just use mv to rename 
subvols', 'subvols are basically directories', etc.

this makes re-organizing subvolumes difficult, especially if you 
consider send|receive which cannot be snapshotted without breaking the 
parent ids. {for normal subvols, making a snapshot and deleting the old 
is a sufficient workaround}

root:~$ uname -r
3.18-0.towo-siduction-amd64
root:~$ mkfs.btrfs /dev/sdc1 -f
Btrfs v3.17
See http://btrfs.wiki.kernel.org for more information.

Turning ON incompat feature 'extref': increased hardlink limit per file 
to 65536
fs created label (null) on /dev/sdc1
     nodesize 16384 leafsize 16384 sectorsize 4096 size 15.01GiB
root:~$ mkdir test
root:~$ mount -t btrfs /dev/sdc1 test
root:~$ cd test
root:~/test$ touch content
root:~/test$
root:~/test$ btrfs subvol snapshot -r ./ ro_snap
Create a readonly snapshot of './' in './ro_snap'
root:~/test$ mv ro_snap/ ro_snap_applesauce
root:~/test$ mv ro_snap_applesauce/ ro_snap
root:~/test$
root:~/test$ mkdir snapshot_container
root:~/test$ mv ro_snap/ snapshot_container
mv: cannot move ‘ro_snap/’ to ‘snapshot_container/ro_snap’: Read-only 
file system
root:~/test$
root:~/test$ btrfs subvol snapshot -r ./ snapshot_container/ro_snap2
Create a readonly snapshot of './' in 'snapshot_container/ro_snap2'
root:~/test$ mv snapshot_container/ro_snap2/ 
snapshot_container/ro_snap2_applesauce
root:~/test$ mv snapshot_container/ro_snap2_applesauce/ 
snapshot_container/ro_snap2
root:~/test$
root:~/test$ mv snapshot_container/ro_snap2/ .
mv: cannot move ‘snapshot_container/ro_snap2/’ to ‘./ro_snap2’: 
Read-only file system
root:~/test$
root:~/test$ mv snapshot_container/ snapshot_container_applesauce
root:~/test$ mv snapshot_container_applesauce/ro_snap2/ 
snapshot_container_applesauce/ro_snap2_applesauce
root:~/test$ mv snapshot_container_applesauce/ro_snap2_applesauce/ 
snapshot_container_applesauce/ro_snap2
root:~/test$ mv snapshot_container_applesauce/ro_snap2/ .
mv: cannot move ‘snapshot_container_applesauce/ro_snap2/’ to 
‘./ro_snap2’: Read-only file system


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-17 21:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-17 21:45 move subvolume to directory fails Elliot Wolk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.