* Mounting multiple regular files as a filesystem
@ 2009-06-15 5:36 Ravi Pinjala
2009-06-15 7:48 ` Yan Zheng
0 siblings, 1 reply; 2+ messages in thread
From: Ravi Pinjala @ 2009-06-15 5:36 UTC (permalink / raw)
To: linux-btrfs
I'm trying to create a multi-device filesystem on top of regular files
(not actual disks), and mount that to a loopback device. For a
filesystem created on a single file, it works fine, but for a filesystem
across multiple files, it doesn't.
dd if=/dev/zero of=img1 bs=4096 count=65536
dd if=/dev/zero of=img2 bs=4096 count=65536
dd if=/dev/zero of=img3 bs=4096 count=65536
dd if=/dev/zero of=img4 bs=4096 count=65536
mkfs.btrfs img1
mount -o loop -t btrfs img1 /mnt/test # works
mkfs.btrfs img1 img2 img3 img4
mount -o loop -t btrfs img1 /mnt/test # fails
When I try to mount with multiple files, it also prints a message to syslog:
Jun 15 00:32:10 3vil device fsid a147d6b950f66dca-3e2e7f52011c93b0 devid
4 transid 9 /dev/loop/0
Jun 15 00:32:10 3vil btrfs: failed to read chunk tree on loop0
Jun 15 00:32:10 3vil btrfs: open_ctree failed
Am I doing something wrong, or is this use case broken right now?
--Ravi
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Mounting multiple regular files as a filesystem
2009-06-15 5:36 Mounting multiple regular files as a filesystem Ravi Pinjala
@ 2009-06-15 7:48 ` Yan Zheng
0 siblings, 0 replies; 2+ messages in thread
From: Yan Zheng @ 2009-06-15 7:48 UTC (permalink / raw)
To: Ravi Pinjala; +Cc: linux-btrfs
2009/6/15 Ravi Pinjala <ravi@p-static.net>:
> I'm trying to create a multi-device filesystem on top of regular files
> (not actual disks), and mount that to a loopback device. For a
> filesystem created on a single file, it works fine, but for a filesystem
> across multiple files, it doesn't.
>
>
>
> dd if=/dev/zero of=img1 bs=4096 count=65536
> dd if=/dev/zero of=img2 bs=4096 count=65536
> dd if=/dev/zero of=img3 bs=4096 count=65536
> dd if=/dev/zero of=img4 bs=4096 count=65536
>
> mkfs.btrfs img1
> mount -o loop -t btrfs img1 /mnt/test # works
>
> mkfs.btrfs img1 img2 img3 img4
> mount -o loop -t btrfs img1 /mnt/test # fails
>
>
Please setup loop devices for the image files manually. In this case,
'mount -o loop' can't do it for you.
For example:
mkfs.btrfs img1 img2 img3 img4
for i in `seq 1 4`; do losetup /dev/loop$ img$i; done
btrfsctl -a
mount -t btrfs /dev/loop1 /mnt/test
See below for more information:
http://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices
Yan, Zheng
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-15 7:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-15 5:36 Mounting multiple regular files as a filesystem Ravi Pinjala
2009-06-15 7:48 ` Yan Zheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox