Parted, GPT and LVM

Always forget this:


(parted) mklabel gpt
(parted) mkpart primary 0 100%
(parted) set 1 lvm on

That is all.


3 Comments

  1. Jose Lourenco says:

    Do you know how to do if one want to use the lv partitions created on the LVM as iSCSI devices?
    The problem I have is how to make the corresponding mapped devices available after rebooting.
    As they have no defined filesystems they cannot be mounted on /etc/fstab (as far as I know).

    Thank you.
    Best regards,
    Jose Lourenco

  2. sink says:

    sudo parted /dev/sdb
    (parted) mklabel gpt
    (parted) mkpart primary 0 100%
    (parted) set 1 lvm on

    sudo kvpm
    Create physical volume

  3. joag says:

    > Jose Lourenco says:

    Actually once you discover and login to the target you are set, the only thing you need to do is to add the /dev/mapper device in the fstab, and at the end 0 0, you don’t want to check it at boot for errors.

    Depending on the target you need to tune other parameters like creating a device file for you NIC cards for multipath to work correctly, configure the switches for jumbo frames as well as target and NICS and tune the NIC cards also. Check with the target manufacturer for this as it makes a big impact on performance if you don’t tune everything as it should be.

Leave a Reply