一、建立pv
[root@rac1 ~]# pvcreate /dev/sda3
physical volume "/dev/sda3" successfully created
二、擴成vg
[root@rac1 ~]# vgextend volgroup00 /dev/sda3
/dev/hdc: open failed: read-only file system
/dev/cdrom: open failed: read-only file system
attempt to close device '/dev/cdrom' which is not open.
volume group "volgroup00" successfully extended
三、關閉swap
[root@rac1 ~]# swapoff -v /dev/volgroup00/logvol00
swapoff on /dev/volgroup00/logvol00
[root@rac1 ~]# free -m
total used free shared buffers cached
mem: 1217 198 1018 0 12 147
-/+ buffers/cache: 38 1179
swap: 0 0 0
四、擴充swap所在的lv
[root@rac1 ~]# lvm lvresize /dev/volgroup00/logvol00 -l +256m
/dev/hdc: open failed: read-only file system
extending logical volume logvol00 to 1.25 gb
logical volume logvol00 successfully resized
五、擴成swap
[root@rac1 ~]#
[root@rac1 ~]# mkswap /dev/volgroup00/logvol00
setting up swapspace version 1, size = 1342173 kb
六、啟用swap
[root@rac1 ~]# swapon -va
swapon on /dev/volgroup00/logvol00
七、檢視結果
[root@rac1 ~]# free -m
total used free shared buffers cached
mem: 1217 199 1017 0 12 148
-/+ buffers/cache: 38 1178
swap: 1279 0 1279
linux 增加swap空間
root localhost free m 檢視swap容量 total used free shared buffers cached mem 1006 969 36 0 9 467 buffers cache 492 514 swap 2015 32 1983 root localhost dd...
Linux增加swap空間
執行 free m,可查詢物理記憶體大小和swap空間大小,swap空間通常應為物理記憶體兩倍大。增加swap空間步驟 1 dd if dev zero of home swap bs 1024 count 5120000 這樣就會建立 home swap分割槽檔案。檔案的大小是512000個blo...
Linux上面增加swap空間
在linux中增加swap空間 在安裝linux的時候,不知道swap空間分配多少比較好,所以會隨便分配乙個,在真正使用的時候,比如安裝oracle10g會要求很大的swap空間,發現swap空間不夠,那應該怎麼增加swap空間大小呢。以下的操作都要在root使用者下進行,首先先建立乙個分割槽,採用...