Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

BtrFS and Device Mapper (DM)

Dude!Oct 6 2012 — edited Oct 8 2012
Hello,

I learned from a previous thread here that BtrFS should not be put on a LVM volume as both provide similar technologies that compete with each other. What about Device Mapper (DM) and BtrFS under Oracle Linux 6.3? I guess both share similar technologies as well, like Snapshot. Albeit DM is probably less sophisticated. However, I was wondering whether BtrFS and Device Mapper should be used together.

According to https://www.suse.com/documentation/sles11/singlehtml/stor_admin/stor_admin.html. +"You can create BtrFS on Multiple Devices (MD) and Device Mapper (DM) storage configurations by using the YaST2 Partitioner."+ So this tells me that DM and BtrFS can be used together. And I guess one example might be disk encryption using cryptsetup, which uses device mapper. Is this correct?

If I'm not mistaken, then Device Mapper support is in the Linux 2.6 kernel, and /dev/mapper devices are typcially setup by LVM and cryptsetup, but I can also create them using dmsetup. Let's say I have e.g. /dev/sda2 and I want to map it to a DM virtual device named root, then initialize it using BtrFS:

<pre>
dmsetup create root table "0 $(blockdev getsz /dev/sda2) linear /dev/sda2 0"
mkfs.btrfs /dev/mapper/root
</pre>

The command works, but I might doing something wrong, because /dev/mapper/root does not survive a system restart. Unfortunately I have not found anything useful about it in Google yet. Anyway, does this make any sense?

Thanks!
This post has been answered by Avi Miller-Oracle on Oct 7 2012
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 5 2012
Added on Oct 6 2012
2 comments
964 views