環境:
OS:16.04
安裝ubuntu的時候採用的是lvm方式自動安裝的,劃分的swap分割槽太小了,無法滿足安裝oracle的要求,下面單獨建立一個交換分割槽
fallocate -l 4G /swapfile
ls -lh /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
swapon --show
echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab
註釋掉之前分配太小的
root@11g:/lib64# more /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/ubuntu--vg-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=e9dd596c-d06f-450a-b4e9-a00d4088fbea /boot ext2 defaults 0 2
##/dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0
/swapfile none swap sw 0 0