How to create a size-limited file-system?(loopback device)
1) dd if=/dev/zero of=/h/data/file.img bs=1k count=100000 # ~100M
2) su root
3) losetup /dev/loop1 /h/data/file.img
4) mkfs -t ext3 /dev/loop1 100000
5) mkdir /mnt/small
6) mount -t ext3 /dev/loop1 /mnt/small
7) chown tachyon:tachyon /mnt/small
Please refer to command: losetup, mount
本文转自 zhenjing 博客园博客,原文链接:http://www.cnblogs.com/zhenjing/archive/2011/01/18/loopback.html ,如需转载请自行联系原作者