若某分区空间较多剩余,不好重新分区的话,可以制作loop档案,
作为文件系统挂载,以充分利用空间。1、建立大档案
#dd if=/dev/zero of=/loop bs=1M count=10241024+0 records in1024+0 records out1073741824 bytes (1.1 GB) copied, 24.1344 s, 44.5 MB/s查看文档属性,确实有1G
# ll -h /loop-rw-r--r--. 1 root root 1.0G Oct 27 08:52 /loop格式化
# mkfs -t ext4 /loopmke2fs 1.41.12 (17-May-2010)/loop is not a block special device.Proceed anyway? (y,n) y <==由于是非正常装置,故会提示Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks65536 inodes, 262144 blocks13107 blocks (5.00%) reserved for the super user……以下省略……挂载,用 -o loop参数
# mount -o loop /loop /mnt/cdrom# dfdf -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/VolGroup-lv_root 8.5G 5.7G 2.3G 72% /tmpfs 120M 0 120M 0% /dev/shm/dev/sda1 485M 30M 430M 7% /boot/loop 1008M 34M 924M 4% /mnt/cdrom搞定,over