<div dir="auto">Lvm is a total lifesaver!! You never know really how to partition a drive so lvm can help expand a partition. On. The. Fly! Add a new drive or add a new raid box and lvm says, sure, let's use that!<div dir="auto"><br></div><div dir="auto">It also supports software raid which irritates the hardware purists with deeper pockets that me. A software raid10 is cheap, fast, reliable, and if I really need it, I can clone the box into a new mobo with some boot magic and it resurrects the added blank drives in old and new boxes for me without a pair of cards that cost more than the 4 new drives. Spinning rust sata drives with 5 year warranties are totally worth it.</div><div dir="auto"><br></div><div dir="auto">Yeah. Lvextend is a lifesaver. Lvreduce is awesome as long as the filesystem is not xfs. Ext4 supports shrink. ZFS of course replaces ext4 and raid and lvm but does eat more CPU in Linux land. Pretty sure ZFS borders on being a filesystem cult but the prophets have some really good points. Maybe one day it'll get into the mainline kernel. Probably right after gluster. 😁</div><div dir="auto"><br></div><div dir="auto">I'm almost embarrassed to admit that I no longer fix my home gear. If it pukes, it just gets replaced. Hardware is mostly pretty reliable (not gonna discuss HPC/supercomputers running a hot tub style liquid cooling solution). There's used Dell/Supermicro server gear in Suwanee data centers that hits eBay. It's usually 5-7 years old and lasts another 3-5 years in the home shop. 3 on the Supermicro, 5 on the Dell. But at $350 for a dual CPU, 8-12 core, 64-128G ram, add your own hard drives, I'm happy.</div><div dir="auto"><br></div><div dir="auto">I do need to kick the backups again. Long overdue for the bare metal recovery of the entire backup system. Thanks for the reminder of "aging backups".</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 30, 2023, 5:36 PM Charles Shapiro <<a href="mailto:hooterpincher@gmail.com">hooterpincher@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>About three weeks ago piglet, my primary desktop computer, pooped out. Press the power button and the fans came on, but nothing else happened -- no POST, no screen, like, Nuthin'. Went through all the hardware troubleshooting I knew, carted it around to a couple of friends who are smarter than me, but never revived it. It was a Core I7 motherboard obtained surplus 5 years ago after a hard life as a server, so I reckon it was no big surprise it finally bit the dust. <br></div><div><br></div><div>$500 or so and a couple of sessions at Decatur Makers later I'd replaced everything but the Mass Storage, the video card, and the case. She would boot to the BIOS screen np. I could get the GRUB screen but no further -- she'd would just Kernel Panic. The new guts are a 12th gen Intel I9 on a Gigabyte Aorus Z690 gen 1.4 MB, so maybes that had something to do with it.</div><div><br></div><div>Fortunately, I keep my OS on a 120 GB SSD, and my /home on a much larger Spinning Rust drive. So I knew that I wouldn't have to go back to my (shamefully aged) backups. I installed Debian 12 on the SSD (up from Debian 11) and got her to boot ok. <br></div><div><br></div><div>I configured my original install to use lvm without really understanding what that meant, so my /home wouldn't actually, like, mount with a simple mount(8) command. Cue a deep-dive into lvm, helped along by an excellent tutorial ( <a href="https://linuxhandbook.com/lvm-guide/" target="_blank" rel="noreferrer">https://linuxhandbook.com/lvm-guide/</a> ) which also let me delve into the Wonderful World of Vagrant. <br></div><div><br></div><div>After groveling through all that mess, I did the following:</div><div><br></div><div>* vgrename the old piglet-vg vgroup to piglet-home-vg ( using the UUID grabbed from vgdisplay so I was sure to rename the correct one)</div><div>* vgchange -ay piglet-home-vg to 'activate' my renamed vgroup</div><div>* vgscan --mknodes to fiddle the file system to recognize my new logical volumes</div><div>* Verify that I could now mount(8) my piglet-home-vg/home lvolume on /mnt (Yay!)</div><div>* systemctl set-default multi-user.target to bring the machine up with no GUI and log in as root</div><div> * Move the installed /home to /home-debian12-default ( in case I needed to grab some stuff from there to make the Debian 11 settings for Plasma work with Debian 12). Make a new empty /home to serve as a mount point.<br></div><div> * Edit /etc/fstab to mount /dev/mapper/piglet--home--vg-home on /home</div><div> * systemctl set-default graphical.target to bring the machine back up</div><div><br></div><div>Of course I still have a bunch of software to install and some stuff to bring back from my backup ( all my local apache stuff is gone for example). But it's really all over but the shouting.</div><div><br></div><div>Fun Things I Learned:</div><div><br></div><div> * If you screw up an entry in /etc/fstab, Debian 12 will halt during the boot process when it tries to mount disks. On some occasions, it'll attempt to mount your screw up for a while and time out after a minute and a half or so, but other times I think it just dies. You can fix this by choosing Emergency Mode from the GRUB menu and fixing the bad edit in your /etc/fstab. Or I suppose you could boot from your stick again if that rocks your sox.<br></div><div><br></div><div> * Debian 12 doesn't appear to let you mount an lvolume from fstab by UUID. I could do this on my VM, which was running Ubuntu. On Debian you mount from /dev/mapper, which seems to be the Correct Way (at least that's the way shipped lvolumes are mounted). There's some magic going on here that I still don't fully understand. Some of the hyphens in the /dev/mapper lvolume names are doubled, again for reasons which are inscrutable to me.<br></div><div><br></div><div> * Hardware can be Tricky. If you don't plug in ALL the power connectors on your MB, it will simply refuse to start at all. Then you will tear your hair out until you figure out the dumb misteak you made. And if you get checksum errors
late in your install off a Stick, it means that the media is no good no
more. <br><div><br></div></div><div> * vagrant and lvm are pretty way kewl. Learning on a virtual machine let me hack away at lvm and other scary stuff (like parted(8) and mkfs(8) ) break things, and still not disturb anything important on my personal machines. Highly recommended.</div><div><br></div><div>All in all a lot of fun.</div><div><br></div><div>-- CHS<br></div><div> <br></div></div>
</blockquote></div>