1. use the dd command to create a M file named vhost01.img: ddif =/dev/zeroibs = 2 Mcount = 50of =/data/htdocs/vhost01.img: if =/dev/zero: indicates that the input file is/dev/zero, a virtual device. as the name suggests, the data in the file is 0ibs = 2 M: indicates that the size of each read block is 2 Mcount = 50: Table
1. use the dd command to create a M file named vhost01.img:
Dd if =/dev/zero ibs = 2 M count = 50 of =/data/htdocs/vhost01.img
Explanation:
If =/dev/zero: indicates that the input file is/dev/zero, a virtual device. as the name suggests, all the data in it is 0.
Ibs = 2 M: indicates that the size of each read block is 2 M.
Count = 50: 50 bytes are read.
Of =/data/htdocs/vhost01.img: output file
2. associate the regular file with the loop device
Losetup/dev/loop0/data/htdocs/vhost01.img
3. create a file system
Mkfs. ext3/dev/loop0
4. file mounting device
Mount-t ext3/dev/loop0/data/htdocs/vhost01