近期在測試Oracle 12C原SWAP預分配置3G,換算下來只有2.91G,安裝時顯示空間不足出現警告。
雖不影響使用,但本人輕微強迫朕,只能擴容,操作如下:
1.檢查SWAP大小
[[email protected] ~]# free -m total used free shared buffers cached Mem: 1996 1530 465 5 51 1029 -/+ buffers/cache: 449 1546 Swap: 2983 0 2983 |
2.檢查VG/LV分區
[[email protected] ~]# vgs VG #PV #LV #SN Attr VSize VFree VolGroup 2 2 0 wz--n- 29.50g 9.02g [[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert lv_root VolGroup -wi-ao---- 17.57g lv_swap VolGroup -wi-ao---- 2.91g |
3.VG已有預眔空間,只需向LV添加空間,先關閉SWAP分區,擴容後再啟用SWAP.
[[email protected] ~]# swapoff /dev/mapper/VolGroup-lv_swap [[email protected] ~]# lvextend -L +600M /dev/mapper/VolGroup-lv_swap Size of logical volume VolGroup/lv_swap changed from 2.91 GiB (746 extents) to 2.93 GiB (751 extents). Logical volume lv_swap successfully resized. [[email protected] ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert lv_root VolGroup -wi-ao---- 17.57g lv_swap VolGroup -wi-a----- 3.50g [[email protected] ~]# mkswap /dev/mapper/VolGroup-lv_swap [[email protected] ~]# swapon /dev/mapper/VolGroup-lv_swap |
重啟系統,再次安裝檢查通過。