Re: lvcreateopts ordering / sizing
Thanks Thomas, You are correct in that we want the flexibility of lvm to grow the disk on to another device (md2 in this case), in the future should it be required. The other reason being that md3 could be comprised of ssds and md2 spinning disks, in our experience this does give better IO for the lv using the faster disks. In this example md2 might be used temporarily to increase the solr lv until more ssds are added. It's mostly about flexibility still. I am less bothered about point 2 from my original reply, so just changing the order of when lvcreateopts is injected into the lvcreate command would suffice and I don't think it would effect current functionality? Thanks for listening, Luke Original message From: Thomas Neumann Date:21/11/2014 17:12 (GMT+00:00) To: fully automatic installation developers list Subject: Re: lvcreateopts ordering / sizing Hello Luke On Friday 21 November 2014 14:24:27 Luke Alexander wrote: > 1) be able to create an lv using extents from a specific physical device in > the vg > 2) be able to allocate 100% of the extents from that specific device What's the deeper meaning behind this? From just this description there's not much difference compared to using the physical volume directly. The only thing that I can think of is that you may want to grow the solr-lv with some extents from md2 later on. But if that's possible later then why don't you do it right from the start? One other reason could be to make sure the disk I/O-queues for root and mnt are separate from solr - but to be frank I don't even know if LVM really works that way. It may as well be that the actual device I/O is indeed going into different queues, but shares the same queues (and latencies) on the LVM level. bye thomas
Re: lvcreateopts ordering / sizing
Hello Luke On Friday 21 November 2014 14:24:27 Luke Alexander wrote: > 1) be able to create an lv using extents from a specific physical device in > the vg > 2) be able to allocate 100% of the extents from that specific device What's the deeper meaning behind this? From just this description there's not much difference compared to using the physical volume directly. The only thing that I can think of is that you may want to grow the solr-lv with some extents from md2 later on. But if that's possible later then why don't you do it right from the start? One other reason could be to make sure the disk I/O-queues for root and mnt are separate from solr - but to be frank I don't even know if LVM really works that way. It may as well be that the actual device I/O is indeed going into different queues, but shares the same queues (and latencies) on the LVM level. bye thomas
Re: lvcreateopts ordering / sizing
Hi Kerim, Yes, essentially two things are required; 1) be able to create an lv using extents from a specific physical device in the vg 2) be able to allocate 100% of the extents from that specific device Many thanks, Luke Original message From: Kerim Gueney Date:21/11/2014 13:54 (GMT+00:00) To: linux-fai-devel@uni-koeln.de Subject: Re: lvcreateopts ordering / sizing What exactly is it that you're trying to do, if I may ask? Do you want the main-soir volume to use all of the remaining space on /dev/md3? I'm currently looking at this issue and just want to make sure I understand it correctly. Best regards Kerim On 11/19/2014 09:07 PM, Luke Alexander wrote: > Hi, > > I have a problem where I'd like to be able to specify a physical device as an > LV create option: > > --- > > disk_config lvm fstabkey:device > vg main md2,md3 > main-root / 10G xfs defaults > main-mnt /home/mnt 50G xfs defaults > main-solr /srv/solr/disk1 0- xfs defaults lvcreateopts="/dev/md3" > > --- > > Please assume that the md devices are created OK (which they are), I'd like > for main-solr LV to use 100% of the PD /dev/md3 > > Using (undocumented?) lvcreateopts I was able to see the device trying to be > used, but the ordering is incorrect, the PD switch to the lvcreate command > should be at the end of the command, but lvcreateopts is added as the > beginning flags the 'lvcreate' command... > > To get past that we can change /usr/share/fai/setup-storage/Commands.pm : > > &FAI::push_command( "lvcreate -n $lv -L " . >&FAI::convert_unit($lv_size->{eff_size} . "B") . " $vg > $create_options", "vg_enabled_$vg", > > However this didn't work as the size option used '0-' trys to consume the > entire VG size (so both, md2 and md3) > >VG #PV #LV #SN Attr VSize VFree >main 2 2 0 wz--n- 1.79t 1.73t > > the lvcreate command looks like: > lvcreate -n solr -L 1794482.72765625 main /dev/md3 > > the command fails as there are already devices using the VG - so the full VG > size is not possible to use... > > I then thought maybe I could change the lvcreateopts to comsume 100% of the > PV (rather than VG), but I think this isn't parsed by Parsed.pm properly? > lvcreateopts="-l +100%PVS /dev/md3" > > Anyway, I can work round this by using the above hack to Commands.pm and > setting the size option in the disk_config recipe to something like 900G: > > main-solr /srv/solr/disk1 900G xfs defaults lvcreateopts="/dev/md3" > > There is probably a more elegant way to do this though, you may have some > pointers? > > Apologies if this is the wrong list, I wasn't sure since I thought I could > assist with the Commands.pm change if needed? > > Thanks, > Luke
Re: lvcreateopts ordering / sizing
What exactly is it that you're trying to do, if I may ask? Do you want the main-soir volume to use all of the remaining space on /dev/md3? I'm currently looking at this issue and just want to make sure I understand it correctly. Best regards Kerim On 11/19/2014 09:07 PM, Luke Alexander wrote: Hi, I have a problem where I'd like to be able to specify a physical device as an LV create option: --- disk_config lvm fstabkey:device vg main md2,md3 main-root / 10G xfs defaults main-mnt /home/mnt 50G xfs defaults main-solr /srv/solr/disk1 0- xfs defaults lvcreateopts="/dev/md3" --- Please assume that the md devices are created OK (which they are), I'd like for main-solr LV to use 100% of the PD /dev/md3 Using (undocumented?) lvcreateopts I was able to see the device trying to be used, but the ordering is incorrect, the PD switch to the lvcreate command should be at the end of the command, but lvcreateopts is added as the beginning flags the 'lvcreate' command... To get past that we can change /usr/share/fai/setup-storage/Commands.pm : &FAI::push_command( "lvcreate -n $lv -L " . &FAI::convert_unit($lv_size->{eff_size} . "B") . " $vg $create_options", "vg_enabled_$vg", However this didn't work as the size option used '0-' trys to consume the entire VG size (so both, md2 and md3) VG #PV #LV #SN Attr VSize VFree main 2 2 0 wz--n- 1.79t 1.73t the lvcreate command looks like: lvcreate -n solr -L 1794482.72765625 main /dev/md3 the command fails as there are already devices using the VG - so the full VG size is not possible to use... I then thought maybe I could change the lvcreateopts to comsume 100% of the PV (rather than VG), but I think this isn't parsed by Parsed.pm properly? lvcreateopts="-l +100%PVS /dev/md3" Anyway, I can work round this by using the above hack to Commands.pm and setting the size option in the disk_config recipe to something like 900G: main-solr /srv/solr/disk1 900G xfs defaults lvcreateopts="/dev/md3" There is probably a more elegant way to do this though, you may have some pointers? Apologies if this is the wrong list, I wasn't sure since I thought I could assist with the Commands.pm change if needed? Thanks, Luke