[EMAIL PROTECTED] (Simon J Mudd) writes: > The only thing that surprises me is that I don't see recipes or archives > which mention the use of LVM for configuring servers with puppet yet > this seems to be such a basic task of building a server. And at least > 2 platforms I know use LVM: Linux and AIX, though I imagine other UNIX > platforms do too.
Actually I'm wrong. There is a ticket http://reductivelabs.com/trac/puppet/ticket/475 which mentions this. One thing perhaps it's missing is having the list of volume groups and logical volumes in a place that can be used to check for their existence. For volume groups something list a list/hash of volume groups. If this is not possible a : separated list of volume groups. That would be something like: # vgs VG #PV #LV #SN Attr VSize VFree xxxxx.wl0.org 1 23 0 wz--n- 465.56G 186.53G usbdisk.wl0.org 1 2 0 wz--n- 465.56G 32.00M or $volume_groups = "xxxxx.wl0.org:usbdisk.wl0.org" Logical volume information is more difficult as you have multiple logical volumes under each volume group so storing in a scalar is ugly and would produce very large strings. So I have something similar on one of my machines: # lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert lv.vm.fc7 vg00 -wi-ao 10.00G lv.vm.fedora8 vg00 -wi-ao 10.00G lv.vm.fedora9 vg00 -wi-ao 10.00G lv.vm.rhel5 vg00 -wi-ao 10.00G lv.vm.rhel4 vg00 -wi-ao 10.00G lv.vm.rhel3 vg00 -wi-ao 10.00G lvbackup vg00 -wi-ao 10.00G lvhome vg00 -wi-ao 1.00G lvmirror vg00 -wi-ao 10.00G lvopenpkg vg00 -wi-ao 5.00G lvroot vg00 -wi-ao 20.00G lvswap vg00 -wi-ao 4.00G lvtmp vg00 -wi-ao 1.00G lvvar vg00 -wi-ao 2.00G lvusr.local.rhel4 vg00 -wi-ao 1.00G LogVol01 usbdisk -wi-a- 1.94G LogVol00 usbdisk -wi-ao 463.59G And this would give rather a huge scalar value if vg/lv were concatenated and colon separated. Ideally I'd like to be able to check vg_exists( 'usbdisk' ) lv_exists( 'usbdisk/LogVol00' ) It seems that the puppet functions are run on the server and not on the client so I'm not sure how I could write a function to collect/return the information I need as obviously it needs to be run on the client to be of any use. Again I may be misunderstanding something. Writing shell scripts which return an appropriate exist status to perform these tests is trivial, but I don't see how to collect the information and then use it elsewhere from within puppet. Simon > > Simon > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---