antlists wrote: > On 19/12/2020 17:32, Dale wrote: >> Neil Bothwick wrote: >>> On Sat, 19 Dec 2020 07:02:23 -0600, Dale wrote: >>> >>>> I have another question related to LVM. Let's say a system crashes >>>> and >>>> dies. Or I just move a drive, or drives, with LVM on it to another >>>> system. Does the system just recognize the drives and knows how to >>>> add >>>> them or do I have to do that manually on the new system? >>> It should just work if you move all the PVs in the volume group. One >>> thing to watch out for is if the destination system is already using >>> LVM, >>> the volume groups must be named differently. That's why I always use >>> unique VG names based on the hostname. >>> >> >> Ahhh, so it stores the info on the drive so that it knows what it is. >> Neato!! I was thinking it was in /etc/lvm/ or something. I've wondered >> about that for a while now. > > mdadm version 0 stored its information in mdadm.conf. That was a > mistake - it had the downside you couldn't boot from the array, it was > wide open to errors, arrays were regularly trashed because things had > got confused, etc etc. Sticking all the necessary information in a > superblock is now considered must-do good practice. >> >> Naming them based on hostname is also a good idea. I don't have mine >> named that way but if I ever redo them, I will. It could save me some >> problems down the road. >> > Again, that's now the default for mdadm - not necessarily the user > name, but the internal array name is something like "tigger:0", to > quote one of mine - array 0 created on tigger. > > Cheers, > Wol > >
Right now, this is mine: root@fireball / # vgs VG #PV #LV #SN Attr VSize VFree Home2 2 1 0 wz--n- <12.74t 0 OS 1 3 0 wz--n- <124.46g <35.46g backup 1 1 0 wz--n- 698.63g 0 root@fireball / # I'm assuming it would be best to have them named like this: root@fireball / # vgs VG #PV #LV #SN Attr VSize VFree fb-Home2 2 1 0 wz--n- <12.74t 0 fb-OS 1 3 0 wz--n- <124.46g <35.46g fb-backup 1 1 0 wz--n- 698.63g 0 root@fireball / # The added fb would be short for fireball. If this rig suddenly blew a gasket and I stuck the drives in a new system, it would make them different at least. Once moved and stable, Neil says I can rename it to something else to match the new system. It sounds like a good idea since right now, I could move those drives to a system that has the same names which would cause issues. As a matter of fact, the reason for Home2 is because I already had a Home group in a previous move. I guess we are talking about the same thing. Dale :-) :-)