You are not logged in.

#1 2013-09-15 12:55:46

toni
Member
Registered: 2011-10-15
Posts: 437

How to mount LVM Swap partition

Hi! I am installing arch.
I have create the lvm swap using:

#lvcreate -C y -L 8GB VolGroup00 -n lvolswap

then I format swap parition:

#mkswap /dev/mapper/VolGroup00-lvolswap

Enable it:

#swapon -va

or

#swapon -s /dev/mapper/VolGroup00-lvolswap

Of course, I can add an entry to /etc/fstab using following line within /etc/fstab:

/dev/mapper/VolGroup00-lvolswap swap swap defaults 0 0

or

/dev/mapper/VolGroup00-lvolswap none swap sw 0 0

(What's the difference between the two entries above? I find them by googling)

Finally I mount all the logical volumes, root logical volume in /mnt, and others in /mnt/home /mnt/var /mnt/boot ....

but my doubt is how to mount swap logical volume as in the wiki it is said: "...and mount your swap partition..."

so How to mount swap partition? and where? under /mnt with any name?

Thanks!

Last edited by toni (2013-09-15 12:59:10)

Offline

#2 2013-09-15 13:04:35

toni
Member
Registered: 2011-10-15
Posts: 437

Re: How to mount LVM Swap partition

Ok, I found the answer:

To mount it on every boot append the following line to /etc/fstab:

/dev/vgroup000/lv_swap    swap    swap    defaults    0    0

To mount it instantly:

swapon -a

Offline

Board footer

Powered by FluxBB