Moving a volume group to another physical disk (repeated)

RodinM

Active Member
Aug 1, 2011
70
0
26
I'm trying to move a volume group to another physical storage issuing a command:
pvmove /dev/cciss/c0d8
and get an answer:
Physical Volume "/dev/cciss/c0d8" not found in Volume Group "VGONVD4"
But I am sure I created a physical volume using this device name like this:
pvcreate /dev/cciss/c0d8
And strange things: when I issue a command "pvscan" it shows me the following:
PV /dev/block/104:178 VG pve lvm2 [8.80 GB / 1.11 GB free]
PV /dev/block/104:480 VG VGONVD4 lvm2 [5.46 TB / 5.28 TB free]
PV /dev/block/104:97 VG VGONVD4 lvm2 [1.59 TB / 1.59 TB free]
not the disk labels (/dev/cciss/c0d8 and /dev/cciss/c0d6) I used by "pvcreate" command
I need to free up a disk with 5.46TB storage but what do these labels mean: /dev/block/104:* ?
When I'm trying to issue the "pvmove" command using the name "PV /dev/block/104:480" I see the same result:
Physical volume /dev/block/104 not found
Run `pvmove --help' for more information.
How should I treat these names of my disks and how should I move my VG to another (faster) disk (not using a long backup and restore procedure but online migration to another storage)?
 
The result is the same:
pvmove /dev/block/104\:480
Physical volume /dev/block/104 not found
Run `pvmove --help' for more information.
The same result with pvmove "/dev/block/104\:480" (in quotes)
Here is the result of "ls":
ls
104:0 104:19 104:245 104:352 104:421 104:51 104:592 104:656 254:10
104:1 104:192 104:256 104:353 104:432 104:512 104:593 104:66 254:11
104:112 104:193 104:257 104:354 104:433 104:513 104:594 104:67 254:12
104:113 104:194 104:258 104:368 104:434 104:528 104:595 104:672 254:2
104:114 104:195 104:259 104:369 104:435 104:529 104:597 104:673 254:6
104:115 104:197 104:261 104:370 104:437 104:53 104:608 104:688 254:7
104:117 104:2 104:272 104:371 104:448 104:530 104:609 104:689 254:8
104:128 104:208 104:288 104:373 104:464 104:544 104:610 104:69 254:9
104:144 104:21 104:289 104:384 104:465 104:545 104:611 104:80 7:0
104:145 104:224 104:290 104:400 104:466 104:546 104:613 104:81 7:1
104:16 104:225 104:291 104:401 104:467 104:547 104:624 104:82 7:2
104:160 104:226 104:293 104:402 104:469 104:549 104:64 104:83 7:3
104:161 104:227 104:304 104:403 104:48 104:560 104:640 104:85 7:4
104:17 104:229 104:32 104:405 104:480 104:576 104:641 104:96 7:5
104:176 104:240 104:320 104:416 104:49 104:577 104:642 104:97 7:6
104:177 104:241 104:321 104:417 104:496 104:578 104:643 105:0 7:7
104:178 104:242 104:336 104:418 104:497 104:579 104:645 254:0
104:18 104:243 104:337 104:419 104:50 104:581 104:65 254:1
 
Last edited:
The result is the same:
pvmove /dev/block/104\:480
Physical volume /dev/block/104 not found
Run `pvmove --help' for more information.
The same result with pvmove "/dev/block/104\:480" (in quotes)
Here is the result of "ls":
ls
104:0 104:19 104:245 104:352 104:421 104:51 104:592 104:656 254:10
104:1 104:192 104:256 104:353 104:432 104:512 104:593 104:66 254:11
104:112 104:193 104:257 104:354 104:433 104:513 104:594 104:67 254:12
104:113 104:194 104:258 104:368 104:434 104:528 104:595 104:672 254:2
104:114 104:195 104:259 104:369 104:435 104:529 104:597 104:673 254:6
104:115 104:197 104:261 104:370 104:437 104:53 104:608 104:688 254:7
104:117 104:2 104:272 104:371 104:448 104:530 104:609 104:689 254:8
104:128 104:208 104:288 104:373 104:464 104:544 104:610 104:69 254:9
104:144 104:21 104:289 104:384 104:465 104:545 104:611 104:80 7:0
104:145 104:224 104:290 104:400 104:466 104:546 104:613 104:81 7:1
104:16 104:225 104:291 104:401 104:467 104:547 104:624 104:82 7:2
104:160 104:226 104:293 104:402 104:469 104:549 104:64 104:83 7:3
104:161 104:227 104:304 104:403 104:48 104:560 104:640 104:85 7:4
104:17 104:229 104:32 104:405 104:480 104:576 104:641 104:96 7:5
104:176 104:240 104:320 104:416 104:49 104:577 104:642 104:97 7:6
104:177 104:241 104:321 104:417 104:496 104:578 104:643 105:0 7:7
104:178 104:242 104:336 104:418 104:497 104:579 104:645 254:0
104:18 104:243 104:337 104:419 104:50 104:581 104:65 254:1
Hi,
normaly it's not helpful to open new threads about the same issue!
This is also not proxmox related only Linux and HP...

I have also one of this ugly raidcards here...
Code:
# pvdisplay "/dev/block/104:2"                                                                                                                                   
  --- Physical volume ---                                                                                                                                                  
  PV Name               /dev/block/104:2                                                                                                                                   
  VG Name               pve                                                                                                                                                
  PV Size               67,33 GB / not usable 3,58 MB                                                                                                                      
  Allocatable           yes                                                                                                                                                
  PE Size (KByte)       4096                                                                                                                                               
  Total PE              17236
  Free PE               1023
  Allocated PE          16213
  PV UUID               HQygTy-EXfS-e0VB-GJaC-HjA2-MYfD-GPZhYw
   
home-srv:~# ls -lsa /dev/block/104:2
0 lrwxrwxrwx 1 root root 15  8. Jul 17:19 /dev/block/104:2 -> ../cciss/c0d0p2
Have you tried (in my case) "pvmove /dev/block/cciss/c0d0p2"??

Udo
 
pvscan
PV /dev/block/104:178 VG pve lvm2 [8.80 GB / 1.11 GB free]
PV /dev/block/104:481 VG VGONVD3 lvm2 [2.00 TB / 1.82 TB free] (This is what I need)
PV /dev/block/104:449 VG VGONVD3 lvm2 [1.59 TB / 1.59 TB free]

pvdisplay "/dev/block/104:481"
--- Physical volume ---
PV Name /dev/block/104:481
VG Name VGONVD3
PV Size 2.00 TB / not usable 1.23 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 524287
Free PE 477951
Allocated PE 46336
PV UUID 0B2r04-MnT2-pJ4u-fA8R-o7zB-TdOG-CbFXyO

ls -lsa /dev/block/104:481
0 lrwxrwxrwx 1 root root 16 Aug 16 14:06 /dev/block/104:481 -> ../cciss/c0d30p1
pvmove -v -i 20 /dev/block/cciss/c0d30p1
Physical volume /dev/block/cciss/c0d30p1 not found
Run `pvmove --help' for more information.

Should I give up? :-)
 
...
0 lrwxrwxrwx 1 root root 16 Aug 16 14:06 /dev/block/104:481 -> ../cciss/c0d30p1
...
Hi,
i'm wondering that this device show the first partition (p1) but you wrote in the first posting that you use the whole device (/dev/cciss/c0d6).
Is all right with your partitions? "fdisk -l".
Another try is to use pvmove with "-n lvname /dev/destinationpv".

Udo
 
The partition is OK. I just followed somebody's advice to make a partition across the whole disk to make sure that no other OS would try to initialize the disk as an empty one. Then I made the same VG and continued working on it.
Another try with pvmove failed with the same result:
pvmove -v -i 10 -n /dev/VGONVD3/vm-103-disk-1 /dev/cciss/c0d6p1 (/dev/cciss/c0d6p1 is the destination PV device with 1.59TB space as I understood)

Physical Volume "/dev/cciss/c0d6p1" not found in Volume Group "VGONVD3"

As I understand LVM recognized the two PV's on my external SAS-controller MSA 2012 using other naming convention (not what I used when creating the VG) and the result of pvscan command is another proof for it because I didn't find any decent info in the web about "/dev/block/..." naming.

Strange thing: "pvremove" command works OK when /dev/cciss/c0d6p1 is used. After that I got an "unknovn pv" in my VG and non-working VG so I had to restore the VG from the backup file (after removing some strings in it mentioning problematic pv :-)
But the main problem remains: all vg* commands expect something other from me than /dev/cciss/c0d......
 
Every disk drives can be found by several means in /dev/ directory.
LVM commands can b told which ones to prefer in /etc/lvm/lvm.conf.

Fot my HP and Dell servers, I use this :
in devices {} section :
preferred_names = [ "^/dev/vg", "^/dev/mapper", "^/dev/[hs]d", "^/dev/cciss" ]