Re: Mounting multiple regular files as a filesystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/6/15 Ravi Pinjala <ravi@xxxxxxxxxxxx>:
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux