Have a look in the Tivoli Storage manager redbook (SG24-6844-01) for a natty
little way of doing this.
Page 243, in the version I have. Basically you have a savevg image that has
everything excluded at the file level
so it leaves you with a template savevg file which you can restorevg,
putting back the VG, LVs and all filesystems in one go. Very neat...
www.redbooks.ibm.com in case you didn't know, and a search for disaster
turns it up as the first hit.
Their script has a few little problems, but is an excellent starting point
for your own solution.
Hope that helps
> Does anyone have scripts to create mkvg, mklv, crfs line commands from
> existing LVM information? For example, using the parsed output of lsvg,
> lslv and lsfs, I would like to cron this script daily so in the event of a
> disk failure, I can quickly recreate my vgs and filesystems for a restore.
> mkvg -s 32 -y somevg hdisk2 hdisk3
> mklv -y somelv somevg 32 hdisk2
> crfs -v jfs -a nbpi=16384 -a bf=true -a ag=64 -m '/somefs' -d 'somelv' -A
> yes -a check=true
> If anyone has something like this in place, I would be most greatful if
> would reply.