ManageIQ / manageiq-appliance-build

Scripts to build ManageIQ appliances
Apache License 2.0
10 stars 55 forks source link

RFE: appliance disk layout to have lv_pg partition for postgresql #536

Closed tjyang closed 1 year ago

tjyang commented 1 year ago
Fryguy commented 1 year ago

@agrare Can you take a look at this one - I thought this was what we had originally proposed, or is the LV only added when you configure it in appliance_console?

agrare commented 1 year ago

@tjyang did you manually run pvcreate and friends? We create that automatically with appliance_console when you go through the database create wofkflow.

tjyang commented 1 year ago

@tjyang did you manually run pvcreate and friends? We create that automatically with appliance_console when you go through the database create wofkflow.

@agrare , Yes. I manually did all needful tasks to turn a worker node into db node. I will try appliance_console (interactive) way to see the difference. needful tasks=add disk to VM ,pvcreate,vgcreate,lvextend,add new lvs into fstab,, appliance_console_cli

agrare commented 1 year ago

@tjyang here is what the disks look like after running through appliance_console to set up the appliaction:

[root@manageiq ~]# fdisk -l /dev/vdb
Disk /dev/vdb: 64 GiB, 68719476736 bytes, 134217728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3e078f60

Device     Boot Start       End   Sectors Size Id Type
/dev/vdb1        2048 134217727 134215680  64G 83 Linux
[root@manageiq ~]# pvs
  PV         VG        Fmt  Attr PSize   PFree
  /dev/vda2  vg_system lvm2 a--  <42.00g    0 
  /dev/vdb1  vg_pg     lvm2 a--  <64.00g    0 
[root@manageiq ~]# vgs
  VG        #PV #LV #SN Attr   VSize   VFree
  vg_pg       1   1   0 wz--n- <64.00g    0 
  vg_system   1   7   0 wz--n- <42.00g    0 
[root@manageiq ~]# lvs
  LV               VG        Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lv_pg            vg_pg     -wi-ao---- <64.00g                                                    
  lv_home          vg_system -wi-ao----   1.00g                                                    
  lv_os            vg_system -wi-ao----  10.50g                                                    
  lv_swap          vg_system -wi-ao----  <6.00g                                                    
  lv_tmp           vg_system -wi-ao----   1.00g                                                    
  lv_var           vg_system -wi-ao----  12.00g                                                    
  lv_var_log       vg_system -wi-ao----  11.00g                                                    
  lv_var_log_audit vg_system -wi-ao---- 512.00m

This looks like it would satisfy your requirements?

tjyang commented 1 year ago

@agrare , Sorry. I am busy this week, I haven't got a chance to run through interactive appliance_console TUI for creating vg_pg/lv_pg. But yes it LGTM from above output.

Assuming /dev/vdb (in VMWare it is /dev/sdb) got added first.

agrare commented 1 year ago

Assuming /dev/vdb (in VMWare it is /dev/sdb) got added first.

Yes I added a second disk prior to starting the application setup per the documentation. Using appliance_console_cli should also work though I haven't tested that.

I'm going to close this since it is working as expected, if you end up hitting any issues with appliance_console_cli not creating the PV/VG/LV propertly please open a bug in the github.com/ManageIQ/manageiq-appliance_console repo