环境:
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
标签:--,分区,fstab,dev,etc,unbuntu,添加,swap,ubuntu From: https://www.cnblogs.com/hxlasky/p/18281868