unbuntu添加交换分区

环境:

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
复制代码

 

posted @   slnngk  阅读(45)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2023-07-03 es集群环境安装分词器elasticsearch-analysis-ik(直接解压方式)
2020-07-03 12C下使用logminer
2019-07-03 grafana安装升级部署
点击右上角即可分享
微信分享提示