miércoles, 5 de junio de 2019

Agregar area de Swap a uno existente


Estos son los comandos, resumidos:


lvcreate -n lv_swap2 -L50g /dev/VolGroup00
mkswap /dev/VolGroup00/lv_swap2
agregar esta linea al /etc/fstab :
/dev/mapper/VolGroup00-lv_swap2 swap swap defaults 0 0
swapon -va
free -m

Aca esta el paso a paso detallado :

[root@app2 ~]# lvcreate -n lv_swap2 -L50g /dev/VolGroup00
Logical volume "lv_swap2" created.
[root@app2 ~]# mkswap /dev/VolGroup00/lv_swap2
mkswap: /dev/VolGroup00/lv_swap2: warning: don't erase bootbits sectors
on whole disk. Use -f to force.
Setting up swapspace version 1, size = 52428796 KiB
no label, UUID=68d25033-5db8-4fe5-a53a-c50cfcf9f3e7
[root@app2 ~]# vi /etc/fstab (agregar la linea a continuacion descripta)
/dev/mapper/VolGroup00-lv_swap2 swap swap defaults 0 0
[root@app2 ~]# swapon -va
swapon on /dev/mapper/VolGroup00-lv_swap2
swapon: /dev/mapper/VolGroup00-lv_swap2: found swap signature: version 1, page-size 4, same byte order
swapon: /dev/mapper/VolGroup00-lv_swap2: pagesize=4096, swapsize=53687091200, devsize=53687091200
[root@app2 ~]# free -m
 total used free shared buffers cached
Mem: 258208 169225 88982 0 1642 128652
-/+ buffers/cache: 38931 219277
Swap: 67583 2197 65386
[root@app2 ~]#