Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] LVM and moving drive to another sata port.
Date: Fri, 14 Dec 2018 14:14:12
Message-Id: 64a784ff-6743-8204-14fd-4b44276face2@gmail.com
Howdy,

I'm getting closer to swapping out a hard drive in one of my LVM
groups.  It has two drives in it.  They are sdc and sdd as shown below. 


--- Physical volume ---
  PV Name               /dev/sdc1
  VG Name               Home2
  PV Size               2.73 TiB / not usable 3.44 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              715396
  Free PE               0
  Allocated PE          715396
  PV UUID               ki26nc-pgTs-PCx9-qPBQ-RJNd-5Rd7-aj8sR4
  
  --- Physical volume ---
  PV Name               /dev/sdd1
  VG Name               Home2
  PV Size               2.73 TiB / not usable 3.44 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              715396
  Free PE               0
  Allocated PE          715396
  PV UUID               vg4f2b-1d6N-61hF-Adl7-0wzf-nxn6-Ol5ybJ



I'm planning to change some connections while swapping and wanted to be
sure of something before I do any moves like this.  Let's say I move sdc
and it becomes sdb.  Will LVM still see it the same way?  I suspect it
tracks the drive by the UUID which stays the same no matter what port or
sd letter it gets BUT I want to be sure.  I've drawn out a diagram of
how the drives are currently connected so I could go back if needed but
still want to rearrange things.  Am I correct that changing what drive
connects to what sata port won't matter to LVM and how it sees them? 
Also, what if I connect one to the PCIe card I have?  Will it still see
it the same way? 

Also, I found a wonderful guide for my upcoming move.  It is located here:

http://tldp.org/HOWTO/LVM-HOWTO/removeadisk.html

Scroll down a bit to:  13.5.2. Distributing Old Extents to a New
Replacement Disk

That covers exactly what I am doing.  Even tho Grant and others say it
is that easy, I still find it hard to believe.  O_0  I sure am glad I
was talked into using LVM.  I think it was Alan that first mentioned it
but not sure. 

Thanks much. 

Dale

:-)  :-) 

P. S.  I'm still copying over my /home to the new 8TB backup drive. 
While it is copying at speeds of 20MBs/sec for some files to as high as
160MBs/sec for other files, it takes a long time with that much data. 
It is running at a much better speed than it was when I started the
other thread. 

Replies

Subject Author
Re: [gentoo-user] LVM and moving drive to another sata port. Rich Freeman <rich0@g.o>