Harvester storage using partition

Newer Harvester from 1.3.0 no longer support for partition as main storage, but I found a workaround to use partition rather than whole disk. In this case, I installed harvester in the ssd raid disk and want to spare part of the disk as ssd storage class. After installation, I made the partition using gparted and then use the partition as ssd ctorage class. Here is how to do it.

Create file /oem/90_after_install.yaml with this content:

name: "fstab related patch"
stages:
   initramfs:
     - name: "Add ssd mountpoint"
       commands:
       - |
         echo "/dev/disk/by-label/HARV_LH_SSD /var/lib/harvester/ssd auto defaults 0 0" >> /etc/fstab
       directories:
         - path: /var/lib/harvester/ssd
           permissions: 493
           owner: 0
           group: 0

add label to the partition using this command:

e2label /dev/sdg6 HARV_LH_SSD

add disk in longhorn using path /var/lib/harvester/ssd

Comments

Popular Posts