1 |
Rich Freeman wrote: |
2 |
> On Fri, Dec 14, 2018 at 9:13 AM Dale <rdalek1967@×××××.com> wrote: |
3 |
>> I'm planning to change some connections while swapping and wanted to be |
4 |
>> sure of something before I do any moves like this. Let's say I move sdc |
5 |
>> and it becomes sdb. Will LVM still see it the same way? |
6 |
> Yes. At least by default LVM is going to scan all your drives looking |
7 |
> for LVM PVs and will identify them regardless of what device they are |
8 |
> on, as long as the device gets scanned. |
9 |
> |
10 |
>> I suspect it |
11 |
>> tracks the drive by the UUID which stays the same no matter what port or |
12 |
>> sd letter it gets BUT I want to be sure. |
13 |
> It uses a UUID stored in the PV metadata. So, as long as you don't |
14 |
> confuse it by going and making copies of drives (which duplicates the |
15 |
> ID) without using the LVM tools you'll be fine. |
16 |
|
17 |
That's good to know. I thought it worked that way. |
18 |
|
19 |
>> Am I correct that changing what drive |
20 |
>> connects to what sata port won't matter to LVM and how it sees them? |
21 |
> Yes |
22 |
> |
23 |
>> Also, what if I connect one to the PCIe card I have? Will it still see |
24 |
>> it the same way? |
25 |
> Yes, in general. The only time you might have an issue is if you use |
26 |
> something more exotic that creates a block device that might not get |
27 |
> scanned by default, but I believe that is just a configuration fix. |
28 |
> So, if you're using iSCSI or something maybe you might need to do a |
29 |
> little work. |
30 |
|
31 |
It's just a plain sata card so nothing fancy. According to lspci, it |
32 |
sees the card. I haven't actually hooked a drive to it yet tho. |
33 |
|
34 |
|
35 |
>> Also, I found a wonderful guide for my upcoming move. It is located here: |
36 |
>> |
37 |
>> http://tldp.org/HOWTO/LVM-HOWTO/removeadisk.html |
38 |
>> |
39 |
>> Scroll down a bit to: 13.5.2. Distributing Old Extents to a New |
40 |
>> Replacement Disk |
41 |
>> |
42 |
>> That covers exactly what I am doing. Even tho Grant and others say it |
43 |
>> is that easy, I still find it hard to believe. O_0 I sure am glad I |
44 |
>> was talked into using LVM. I think it was Alan that first mentioned it |
45 |
>> but not sure. |
46 |
> You wouldn't do this if you're just moving physical disks from one |
47 |
> physical interface to another. |
48 |
> |
49 |
> However, if you wanted to migrate data off of one disk and onto |
50 |
> another, this is exactly what you would do, and this is exactly why |
51 |
> everybody always advises people to use LVM (or something like |
52 |
> zfs/btrfs with similar capabilities). It makes moving data around |
53 |
> almost trivial. You can migrate your data while your system is in-use |
54 |
> and it isn't a problem at all. |
55 |
|
56 |
I'm actually replacing a 3TB drive with a 6TB drive. So, while I'm also |
57 |
moving drives from one sata port to another, I'll also be replacing a |
58 |
hard drive as well. I'm at just over 70%. It won't be long until it |
59 |
starts getting to full. |
60 |
|
61 |
|
62 |
>> P. S. I'm still copying over my /home to the new 8TB backup drive. |
63 |
>> While it is copying at speeds of 20MBs/sec for some files to as high as |
64 |
>> 160MBs/sec for other files, it takes a long time with that much data. |
65 |
>> It is running at a much better speed than it was when I started the |
66 |
>> other thread. |
67 |
> LVM would migrate data more quickly than a filesystem copy, because it |
68 |
> is doing it at the block level. So, it doesn't matter whether a block |
69 |
> contains 1000 small files or part of one huge file, or filesystem |
70 |
> metadata. The only thing that should slow down LVM moves would be |
71 |
> disk activity, and I believe you can tune its priority (do you want to |
72 |
> slow down disk access, or LVM copying?). |
73 |
> |
74 |
> With a filesystem copy small files will kill your performance in most |
75 |
> cases, with some filesystems being better than others. |
76 |
> |
77 |
|
78 |
Well, I'm making a backup of /home just in case something goes wrong. |
79 |
While I don't plan to change anything, hardware wise, with the drive my |
80 |
OS is on, I plan to backup /etc and my world file as well. Just in |
81 |
case. ;-) |
82 |
|
83 |
Thanks for confirming how LVM works. At least I am reassured that I can |
84 |
move things around a bit. |
85 |
|
86 |
Dale |
87 |
|
88 |
:-) :-) |