| 
		
			| How to extend a volumegroup without reboot [Beitrag #2918] | Mi, 10 April 2019 09:48  |  
			| 
				
				
					|  linuxsec23 Beiträge: 3
 Registriert: April 2019
 | Junior Member |  |  |  
	| Hello Linux community 
 I will write this in english to get more requests.
 
 I have a big problem. One of our customers wanted to extend the harddisk for his server. This was extended a lot of times but one of our colleagues did this before. I never
 
 In VMWare Vsphere i have extended the storage from 540 to 640 GB. Done
 In linux i have done the rescan of the scsi devices. Done
 Creation and Extension of the new diskspace . Not possible without reboot
 
 ls -la /sys/class/scsi_host/
 ##############################################
 lrwxrwxrwx  1 root root 0 Apr  9 15:50 host0 ->  ../../devices/pci0000:00/0000:00:07.1/ata1/host0/scsi_host/h ost0
 lrwxrwxrwx  1 root root 0 Apr  9 15:50 host1 ->  ../../devices/pci0000:00/0000:00:07.1/ata2/host1/scsi_host/h ost1
 lrwxrwxrwx  1 root root 0 Apr  9 15:50 host2 -> ../../devices/pci0000:00/0000:00:10.0/host2/scsi_host/host2
 ##############################################
 
 ##############################################
 echo "- - -" > /sys/class/scsi_host/host0/scan
 echo "- - -" > /sys/class/scsi_host/host1/scan
 echo "- - -" > /sys/class/scsi_host/host2/scan
 ##############################################
 
 
 
 
 Here he is now able to show me the new diskspace which i can use but when i want to add a new disk (extended or primary) he is only able to add a 1024000Kb partition WHY??
 fdisk -l
 ##############################################
 Disk /dev/sda: 640 GiB, 687194767360 bytes, 1342177280 sectors
 Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disklabel type: dos
 Disk identifier: 0x151722cb
 
 Device     Boot      Start        End    Sectors   Size Id Type
 /dev/sda1  *          2048     999423     997376   487M 83 Linux
 /dev/sda2          1001470 1132462079 1131460610 539.5G  5 Extended
 /dev/sda5          1001472  629145600  628144129 299.5G 8e Linux LVM
 /dev/sda6        629149696  713031679   83881984    40G 8e Linux LVM
 /dev/sda7        713033728  817889279  104855552    50G 8e Linux LVM
 /dev/sda8        817891328  922746879  104855552    50G 8e Linux LVM
 /dev/sda9        922748928 1027604479  104855552    50G 8e Linux LVM
 /dev/sda10      1027606528 1132462079  104855552    50G 8e Linux LVM
 ##############################################
 
 
 This is the output of my volume group display
 
 vgdisplay -v
 ##############################################
 Using volume group(s) on command line.
 --- Volume group ---
 VG Name               01-vg
 System ID
 Format                lvm2
 Metadata Areas        6
 Metadata Sequence No  15
 VG Access             read/write
 VG Status             resizable
 MAX LV                0
 Cur LV                2
 Open LV               2
 Max PV                0
 Cur PV                6
 Act PV                6
 VG Size               539.50 GiB
 PE Size               4.00 MiB
 Total PE              138112
 Alloc PE / Size       138112 / 539.50 GiB
 Free  PE / Size       0 / 0
 VG UUID
 
 --- Logical volume ---
 LV Path                /dev/01-vg/root
 LV Name                root
 VG Name                01-vg
 LV UUID
 LV Write Access        read/write
 LV Creation host, time 01, 2017-08-15 12:23:25 +0200
 LV Status              available
 # open                 1
 LV Size                538.50 GiB
 Current LE             137857
 Segments               7
 Allocation             inherit
 Read ahead sectors     auto
 - currently set to     256
 Block device           252:0
 
 --- Logical volume ---
 LV Path                /dev/01-vg/swap_1
 LV Name                swap_1
 VG Name                ....-vg
 LV UUID
 LV Write Access        read/write
 LV Creation host, time , 2017-08-15 12:23:25 +0200
 LV Status              available
 # open                 2
 LV Size                1020.00 MiB
 Current LE             255
 Segments               1
 Allocation             inherit
 Read ahead sectors     auto
 - currently set to     256
 Block device           252:1
 
 --- Physical volumes ---
 PV Name               /dev/sda5
 PV UUID
 PV Status             allocatable
 Total PE / Free PE    76677 / 0
 
 PV Name               /dev/sda6
 PV UUID
 PV Status             allocatable
 Total PE / Free PE    10239 / 0
 
 PV Name               /dev/sda7
 PV UUID
 PV Status             allocatable
 Total PE / Free PE    12799 / 0
 
 PV Name               /dev/sda8
 PV UUID
 PV Status             allocatable
 Total PE / Free PE    12799 / 0
 
 PV Name               /dev/sda9
 PV UUID
 PV Status             allocatable
 Total PE / Free PE    12799 / 0
 
 PV Name               /dev/sda10
 PV UUID
 PV Status             allocatable
 Total PE / Free PE    12799 / 0
 ##############################################
 
 Unfortunately there is no information in the internet to solve this without a reboot. Only entries like yes its pretty ease only 2 steps or entries like yes this 100% working fine but not for this solution i have.
 
 When i calculate the sectors and sector size it should look like this
 ##############################################
 /dev/sda11
 100GB -> 209715201 Sektoren
 
 START         END
 1132464128 - 1342179329
 ##############################################
 
 
 But in real life thats not possible.
 
 
 fdisk /dev/sda
 ##############################################
 Changes will remain in memory only, until you decide to write them.
 Be careful before using the write command.
 
 
 Command (m for help): n
 Partition type
 p   primary (1 primary, 1 extended, 2 free)
 l   logical (numbered from 5)
 Select (default p): l
 
 Adding logical partition 11
 First sector (629147649-1132462079, default 629147649): 1132464128
 Value out of range.  -> how i can add this new sda11 and extend the volume group of this server. Looks like he is in a half half modus and nothing is working.
 
 the extension of the volume group should work after the creation. but creating the diskpartition /dev/sda11 is a pain with this.
 
 
 I know that after the steps i should run partprobe -s to scan for the newly created partition and if this does not work i should run partx -v -a /dev/sda
 I also know how to extend the physical volume with pvcreate /dev/sda11 and how to extend the volume group with vgextend VolGrup00 /dev/sda11
 Logical Volume extend with lvextend and then the last step with resize2fs
 
 Is there any smooth solution for this and not the quick and dirty stuff like (German Informatiksystembastelei
   
 Thanks for all who can help me with that
 
 |  
	|  |  |