Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Just a few questions about Btrfs:

  1. Do I have to mount a Btrfs filesystem before creating subvolumes on it?
  2. Can I easily convert an existing directory into a subvolume? (i.e. if I want to make "/home" a separate subvolume can I just go mk_btrfs_subfolder /home (or whatever the command is), instead of having to make a new empty subvolume and copying everything over?

The commands to do the above would be good but not necessary, just yes/no will be fine and I can Google how.

share|improve this question

2 Answers 2

up vote 0 down vote accepted
  1. Yes.
  2. No.

At least not at the moment.


share|improve this answer
    
This answer is incomplete. Please expand. –  n0pe Mar 7 '13 at 18:22
    
@MaxMackie I'd love to expand, but please state the question first. Do you want reference? Do you want working example of how to mount btrfs volume? Or even better: if you have more questions, post them as separate post. –  Adam Ryczkowski Mar 8 '13 at 11:06

Yes you have to mount it, and if you want to convert a directory into a subvolume what you can do is create a snapshot using

btrfs su sn <name of subvolume containing folder> @new_subvol

Then you could go into the subvolume and delete everything other than @new_subvol/home for instance and move everything in home to the root of the new subvolume with something like

mv @new_subvol/home/* @new_subvol

Then you could delete the original directory and move the newly created snapshot into its place.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.