1

I need to add 100MB of swap space to my machine. I was trying to use a logical volume.

# lvcreate –name lv_swap2 –size 100M vg
# mkswap /dev/vg/lv_swap2
# swapon /dev/vg/lv_swap2
# vi /etc/fstab
/dev/vg/lv_swap2 swap defaults 0 0

It doesn't work.

1

You wrote everything right but missed something here: swap swap defaults

# lvcreate –name lv_swap2 –size 100M vg
# mkswap /dev/vg/lv_swap2
# swapon /dev/vg/lv_swap2
# vi /etc/fstab
/dev/vg/lv_swap2 swap swap defaults 0 0

Now it should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy