Create a ext2 file of the specified size
Generate a 1G space of a specified size using DD
DD If=/dev/zero of=/home/foobar bs=1m count=1000 create 1G size space
Format created space (at this point the file type is ext2)
Mke2fs-vfm0/home/foobar
Create a table of contents
Mkdir/foobar
Mount the generated space to the specified directory
Mount-o loop/home/foobar/foobar/
Set file permissions
chmod 777/foobar
View disk space size and file type
Df-ht/foobar
Implementation of transitions from ext2 to ext3
Uninstall the mounted directory first
Umount/foobar
Converts the ext2 file type to ext3, specifying the file to convert
/sbin/tune2fs-j/home/foobar converts foobar ext2 format to ext3 format
Mount the generated space to the specified directory
Mount-o loop-text3/home/foobar/foobar/
View disk space size and file type
Df-ht/foobar
Create a ext3 file of the specified size
DD If=/dev/zero Of=/home/foobar bs=1m count=1000
Mkfs.ext3-vfm0/home/foobar
Mkdir/foobar
Mount-o loop/home/foobar/foobar/
chmod 777/foobar
Df-ht/foobar
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/