#
# /etc/fstab
# Created by anaconda on Thu Jul 23 03:45:08 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-LogVol00 / ext4 defaults 1 1
UUID=4221a802-6ce2-4638-a3a5-7c17b961f291 /boot ext4 defaults 1 2
UUID=b720b68f-37b7-45ce-b4a2-40deeb9fa90f /www ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/www/swap swap swap defaults 0 0
重启后可以看到,根分区空间有增加, swap使用的是swap文件
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-LogVol00
18G 716M 17G 5% /
tmpfs 939M 0 939M 0% /dev/shm
/dev/sda1 485M 32M 429M 7% /boot
/dev/sda2 61G 2.2G 55G 4% /www
[root@localhost ~]# free -m
total used free shared buffers cached
Mem: 1877 135 1741 0 7 36
-/+ buffers/cache: 91 1786
Swap: 1999 0 1999
[root@localhost ~]# swapon -s
Filename Type Size Used Priority
/www/swap file 2047992 0 -1
注:之前有实验过直接删掉swap的LV,用文件代替,但是,删除swap的LV后,重启报错如图
按网上的解决办法,开机按“e”加“enforcing=0”神马的不管用。这个问题暂时木有解决,有解决过的老师,请告诉下学生。