<div dir="ltr"><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">And i spoke too soon...</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default"><font face="trebuchet ms, sans-serif"><a href="http://unix.stackexchange.com/questions/173704/booting-from-an-lvm-cached-volume">http://unix.stackexchange.com/questions/173704/booting-from-an-lvm-cached-volume</a></font><br></div><div class="gmail_default"><font face="trebuchet ms, sans-serif"><br></font></div><div class="gmail_default"><font face="trebuchet ms, sans-serif">so now to get to a point where i can rebuild this or just reinstall from scratch... i think the latter might be easier.</font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 8, 2016 at 11:41 AM, Stephen Partington <span dir="ltr"><<a href="mailto:cryptworks@gmail.com" target="_blank">cryptworks@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">wow, that was much smoother than i thought it would be.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">I guess setting things up the way i have ahead of time was a good thing. now to move on to the rest of life. (also an interesting idea to set up a desktop/laptop this way to see how life works)</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><span class=""><div class="gmail_default">lvm> vgs</div><div class="gmail_default"> VG #PV #LV #SN Attr VSize VFree</div></span><div class="gmail_default"> System 2 1 0 wz--n- 1.02t 1.38g</div><span class=""><div class="gmail_default">lvm> pvs</div><div class="gmail_default"> PV VG Fmt Attr PSize PFree</div></span><div class="gmail_default"> /dev/sda3 System lvm2 a-- 117.38g 1.38g</div><span class=""><div class="gmail_default"> /dev/sdb2 System lvm2 a-- 922.20g 0</div></span><div class="gmail_default">lvm> lvs</div><div class="gmail_default"> LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert</div><div class="gmail_default"> System System Cwi-aoC--- 922.20g [cache] [System_corig] 0.00 0.70 0.00</div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 8, 2016 at 11:24 AM, Stephen Partington <span dir="ltr"><<a href="mailto:cryptworks@gmail.com" target="_blank">cryptworks@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">The biggest issue i have is that i am working with a mac mini. the 1T drive is a 5400 rpm drive. this has been my home server for a while running server 2016, but it is time to put something more useful on it.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">Part of this is specifically to learn how to use lvm and lvmcache. And ram is on the list for this server just not in the budget yet.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">I am not worried about catastrophic failure or the like as nothing lives on this server that does not already live anywhere else.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">I did the install with the Ubuntu server install so i could at least get lvm set up partly ahead of time. so it looks like I am in a good place. I was reading that article as i received your email.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">So now to extend the vg create the cache and meta lv's and turn things on.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><div class="gmail_default">lvm> pvscan</div><div class="gmail_default"> PV /dev/sdb2 VG System lvm2 [922.20 GiB / 0 free]</div><div class="gmail_default"> PV /dev/sda3 lvm2 [117.38 GiB]</div><div class="gmail_default"> Total: 2 [1.02 TiB] / in use: 1 [922.20 GiB] / in no VG: 1 [117.38 GiB]</div><div class="gmail_default">lvm> pvs</div><div class="gmail_default"> PV VG Fmt Attr PSize PFree</div><div class="gmail_default"> /dev/sda3 lvm2 --- 117.38g 117.38g</div><div class="gmail_default"> /dev/sdb2 System lvm2 a-- 922.20g 0</div><div class="gmail_default">lvm> vgs</div><div class="gmail_default"> VG #PV #LV #SN Attr VSize VFree</div><div class="gmail_default"> System 1 1 0 wz--n- 922.20g 0</div><div class="gmail_default">lvm> vgdisplay</div><div class="gmail_default"> --- Volume group ---</div><div class="gmail_default"> VG Name System</div><div class="gmail_default"> System ID</div><div class="gmail_default"> Format lvm2</div><div class="gmail_default"> Metadata Areas 1</div><div class="gmail_default"> Metadata Sequence No 2</div><div class="gmail_default"> VG Access read/write</div><div class="gmail_default"> VG Status resizable</div><div class="gmail_default"> MAX LV 0</div><div class="gmail_default"> Cur LV 1</div><div class="gmail_default"> Open LV 1</div><div class="gmail_default"> Max PV 0</div><div class="gmail_default"> Cur PV 1</div><div class="gmail_default"> Act PV 1</div><div class="gmail_default"> VG Size 922.20 GiB</div><div class="gmail_default"> PE Size 4.00 MiB</div><div class="gmail_default"> Total PE 236082</div><div class="gmail_default"> Alloc PE / Size 236082 / 922.20 GiB</div><div class="gmail_default"> Free PE / Size 0 / 0</div><div><br></div></div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Fri, Jul 8, 2016 at 11:02 AM, Matt Graham <span dir="ltr"><<a href="mailto:mhgraham@crow202.org" target="_blank">mhgraham@crow202.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2016-07-08 10:00, Stephen Partington wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
1T spinning disk and 128G SSD installed. [...] going with LVM-Cache<span><br>
Sadly the Ubuntu server installation does not have the option of<br>
setting up LVM for anything other than its most basic configuration<br>
</span></blockquote>
<br>
LVM is complicated, and using LVM-cache is a bit more complicated than just making some PVs and putting them into a VG and then making LVs.<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What I understand about LVM is that you can build your LVM group and<br>
then migrate/expand it without a full install/wipe or 3rd disk device<br>
to host your core os installation. Can this be done for LVM cache as<br>
well?<br>
</blockquote>
<br></span>
Yes. Your setup would be something like this: 2 PVs, one on the fast disk, one on the slow disk[0]. One VG with both PVs in it. Multiple LVs. One named root on the fast disk (mounted at / obviously), one small one named cache-meta on the fast disk, one larger one named cache on the fast disk, and finally one larger one named origin on the slow disk. You'd probably mount the last one on /data or /home or wherever makes sense to put the large amount of stuff you want to serve up. I suppose you could put / on the spinny-disk and use almost all of the SSD for cache too. Your call.<br>
<br>
If you already have some PVs and LVs set up, you might need to use pvmove and lvresize and resize2fs to resize filesystems and LVs and move them to the appropriate PV. These things are of course doable from a running system and should not cause any problems.<br>
<br>
<a href="https://rwmj.wordpress.com/2014/05/22/using-lvms-new-cache-feature/" rel="noreferrer" target="_blank">https://rwmj.wordpress.com/2014/05/22/using-lvms-new-cache-feature/</a> describes all the commands you'd need to run to make this stuff happen. And getting an additional 4G or 8G of RAM might help more than using an SSD as a cache, depending on what exactly is going on.<br>
<br>
(I haven't actually tried this, but I've got a 32G unused partition on my SSD right now, and this could be a fun weekend project. I will let you know if I run into any problems.)<br>
<br>
[0] With 1T disks as cheap as they are, consider a softRAID-1 instead of a single spinny disk. Disk failures are No Fun At All.<span><font color="#888888"><br>
<br>
-- <br>
Crow202 Blog: <a href="http://crow202.org/wordpress" rel="noreferrer" target="_blank">http://crow202.org/wordpress</a><br>
There is no Darkness in Eternity<br>
But only Light too dim for us to see.<br>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><span>-- <br><div data-smartmail="gmail_signature">A mouse trap, placed on top of your alarm clock, will prevent you from rolling over and going back to sleep after you hit the snooze button.<br><br>Stephen<br><br></div>
</span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature">A mouse trap, placed on top of your alarm clock, will prevent you from rolling over and going back to sleep after you hit the snooze button.<br><br>Stephen<br><br></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">A mouse trap, placed on top of your alarm clock, will prevent you from rolling over and going back to sleep after you hit the snooze button.<br><br>Stephen<br><br></div>
</div>