Sizing disk partition (lvm)... do i have to be specific?

Is there any way to tell Curtin to create logical volume that spans whole VG? I have to deal with nodes that have different disk sizes. And it would make life so much easier just to have one size boot and rest under LVM for “/”.
thnx for tips in advance.

Hi,

My logical volumes take all space in volume group by default I just tried again, however you have to set disk partition manually, here is my config which is working :

  • id: sdb2
    type: partition
    size: 220GB
    device: sdb
    wipe: superblock-recursive
  • id: sdc2
    type: partition
    size: 220GB
    device: sdc
    wipe: superblock-recursive
  • id: md1
    type: raid
    name: md1
    raidlevel: 1
    devices:
    - sdb2
    - sdc2
    ptable: msdos
  • id: volgroup1
    name: vg00
    type: lvm_volgroup
    devices:
    - md1
  • id: lvmpart1
    name: root
    type: lvm_partition
    volgroup: volgroup1
  • id: lv1_fs
    name: storage
    type: format
    fstype: ext4
    volume: lvmpart1
  • id: lv1_mount
    type: mount
    path: /
    device: lv1_fs

And it results with :

sdb 8:16 0 223.6G 0 disk
├─sdb2 8:18 0 220G 0 part
│ └─md1 9:1 0 219.9G 0 raid1
│ └─vg00-root 253:0 0 219.9G 0 lvm /

About the partitions I’ve been told that :

MAAS currently does the storage modeling and doesn’t yet do anything like
templates or percentages. So unfortunately curtin doesn’t implement that
part right now.
However, it is something that’s been discussed, so I’ll add in a vote for
the feature for future versions of curtin.

Hope it could help you.

Ludwig

thnx Ludwig. I was able to get a far as creating partition. And did understand (from docs) that VG would take whole partition if no size was specified.
But i was hoping that i could create partition and instead of supplying it with fixed size i would be able to tell it to take “rest” of the disk for use.
And you have reassured my doubts… thnx :slight_smile:
thanks again for your responce.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.