Make sure to observe the sequence of operations flow.
pvs
PV VG Fmt Attr PSize PFree
/dev/sda5 mediavg lvm2 a- 6,24G 0
/dev/sda6 mediavg lvm2 a- 48,30G 0
/dev/sdb2 linux lvm2 a- 32,49G 5,86G
/dev/sdb5 media lvm2 a- 200,20G 0
/dev/sdc1 media lvm2 a- 596,17G 0
We can see that the LVM on media must be reduced by more than 200Gb, otherwise /dev/sdb5 can not be removed
vgs
VG #PV #LV #SN Attr VSize VFree
linux 1 2 0 wz--n- 32,49G 5,86G
media 2 1 0 wz--n- 796,36G 0
mediavg 2 1 0 wz--n- 54,54G 0
lvs
LV VG Attr LSize Origin Snap% Move Log Copy%
ubuntu linux -wi-a- 6,63G
var linux -wi-ao 20,00G
media4 media -wi-a- 796,36G
home mediavg -wi-ao 54,54G
The first thing to do is to convert EXT3 to EXT2, otherwise resize2fs will not be able to reduce it properly - we remove the transaction log
tune2fs -O ^has_journal /dev/media/media4
fsck -n /dev/media/media4
We reduce EXT2; this operation is time-consuming, requires the file system to be unmounted and there must enough free space
resize2fs /dev/media/media4 590G
If you can not unmount, it is possible to find a utility that uses this partition like this
lsof -n|grep media
Having reduced EXT2, you need to perform a long check using
e2fsck -f /dev/media/media4
Then we reduce LVM
lvreduce -L-205G /dev/media/media4
We have to respond with Y to the warning
lvs
LV VG Attr LSize Origin Snap% Move Log Copy%
ubuntu linux -wi-a- 6,63G
var linux -wi-ao 20,00G
media4 media -wi-a- 591,36G
home mediavg -wi-ao 54,54G
vgs
VG #PV #LV #SN Attr VSize VFree
linux 1 2 0 wz--n- 32,49G 5,86G
media 2 1 0 wz--n- 796,36G 205,00G
mediavg 2 1 0 wz--n- 54,54G 0
We remove it from VG
vgreduce media /dev/sdb5
and, if necessary, remove the physical partition
pvmove /dev/sdb5
If EXT2 does not fit into a single PV, these commands will not work and you will have to reduce the EXT2 once again
Now there only remains to extend LVM and convert EXT2 to EXT3
lvextend -l +100%FREE /dev/media/media4
resize2fs /dev/media/media4
tune2fs -j /dev/media/media4