Skip to contentSkip to conversation

Sparse files and block devices

DISCUSSION Randy Barlow 2 participants 2 messages Aug 8, 2011 Btrfs file system

lore
Share & tools
lore
#0 lore raw

I started playing with btrfs last night, and I must say that I am very excited! I do have one question so far. Since I was learning, I created a sparse file, and then used mkfs to get a btrfs filesystem. I entertained myself with that for a while, and then decided that I wanted to try out the multi device support. I found that the device add command requires the device to be a block device, and wouldn't accept another sparse file that I had created. Is there a workaround, or is that just the way it is?

I ended up just making a logical volume to get the second block device.

Thanks for making such a cool fs!

#1 lore raw
Quoted 8 lines · Randy Barlow

I started playing with btrfs last night, and I must say that I am very excited! I do have one question so far. Since I was learning, I created a sparse file, and then used mkfs to get a btrfs filesystem. I entertained myself with that for a while, and then decided that I wanted to try out the multi device support. I found that the device add command requires the device to be a block device, and wouldn't accept another sparse file that I had created. Is there a workaround, or is that just the way it is?

I think that you can use 'losetup' command for this end.

-Tsutomu

Quoted 4 lines

I ended up just making a logical volume to get the second block device.

Thanks for making such a cool fs!