• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

LVM help needed

Joined
Nov 1, 2008
Messages
4,213 (0.74/day)
Location
Vietnam
System Name Gaming System / HTPC-Server
Processor i7 8700K (@4.8 Ghz All-Core) / R7 5900X
Motherboard Z370 Aorus Ultra Gaming / MSI B450 Mortar Max
Cooling CM ML360 / CM ML240L
Memory 16Gb Hynix @3200 MHz / 16Gb Hynix @3000Mhz
Video Card(s) Zotac 3080 / Colorful 1060
Storage 750G MX300 + 2x500G NVMe / 40Tb Reds + 1Tb WD Blue NVMe
Display(s) LG 27GN800-B 27'' 2K 144Hz / Sony TV
Case Xigmatek Aquarius Plus / Corsair Air 240
Audio Device(s) On Board Realtek
Power Supply Super Flower Leadex III Gold 750W / Andyson TX-700 Platinum
Mouse Logitech G502 Hero / K400+
Keyboard Wooting Two / K400+
Software Windows 10 x64
Benchmark Scores Cinebench R15 = 1542 3D Mark Timespy = 9758
Hi guys, I've been using Ubuntu server a little while now, but am still fairly inexperienced with it, having mainly survived by reading through guides and following instructions. I need a little help sorting out my LVM disks, but every guide I read gives conflicting instructions, especially when using LVM as a root partition, so I am getting a little confused with it all :(

I currently have 3 physical drives set up with LVM to be read as 1 volume group, the root volume, I believe. Two of these are USB drives and one is an internal drive (I'm using a little netbook as a server).

I have 2x 235gb drives and 1x 300gb drive making a total of around 880gb, but only 100 gb is used. I don't actually know which physical drive is set as /dev/sdxx in the system, though the 300gb drive will be easiest to figure out.

I have a couple of additional 500 gb drives and I'd like to alter my arrangement of disks. The main thing I want to do is reduce the LVM so that it is only using 1 internal drive and ideally copy this to one of the new drives. After that, I'd like to create a second LVM out of the remaining disks for backup/storage.
I can likely get the second step done easily enough, but I'm struggling to find a starting point for the first. I'd really appreciate any help that you guys (with a little more experience) might be able to provide.

My disk information is as follows:

  1. sudo lvmdiskscan
    /dev/PlexServer-vg/swap_1 [ 1.84 GiB]
    /dev/sda1 [ 487.00 MiB]
    /dev/PlexServer-vg/root [ 761.51 GiB]
    /dev/mapper/cryptswap1 [ 1.84 GiB]
    /dev/sda3 [ 121.10 GiB] LVM physical volume
    /dev/sda5 [ 111.31 GiB] LVM physical volume
    /dev/sdb1 [ 128.00 MiB]
    /dev/sdb2 [ 4.55 TiB]
    /dev/sdc1 [ 298.06 GiB] LVM physical volume
    /dev/sdd1 [ 232.88 GiB] LVM physical volume
    1 disk
    5 partitions
    0 LVM physical volume whole disks
    4 LVM physical volumes
    mark@PlexServer:~$ sudo lvmdiskscan -l
    WARNING: only considering LVM devices
    /dev/sda3 [ 121.10 GiB] LVM physical volume
    /dev/sda5 [ 111.31 GiB] LVM physical volume
    /dev/sdc1 [ 298.06 GiB] LVM physical volume
    /dev/sdd1 [ 232.88 GiB] LVM physical volume
    0 LVM physical volume whole disks
    4 LVM physical volumes
    mark@PlexServer:~$ sudo pvscan
    PV /dev/sda5 VG PlexServer-vg lvm2 [111.31 GiB / 0 free]
    PV /dev/sda3 VG PlexServer-vg lvm2 [121.09 GiB / 0 free]
    PV /dev/sdd1 VG PlexServer-vg lvm2 [232.88 GiB / 0 free]
    PV /dev/sdc1 VG PlexServer-vg lvm2 [298.06 GiB / 0 free]
    Total: 4 [763.34 GiB] / in use: 4 [763.34 GiB] / in no VG: 0 [0 ]
    mark@PlexServer:~$ sudo pvs
    PV VG Fmt Attr PSize PFree
    /dev/sda3 PlexServer-vg lvm2 a-- 121.09g 0
    /dev/sda5 PlexServer-vg lvm2 a-- 111.31g 0
    /dev/sdc1 PlexServer-vg lvm2 a-- 298.06g 0
    /dev/sdd1 PlexServer-vg lvm2 a-- 232.88g 0
    mark@PlexServer:~$ df -h
    Filesystem Size Used Avail Use% Mounted on
    udev 857M 0 857M 0% /dev
    tmpfs 177M 13M 165M 8% /run
    /dev/mapper/PlexServer--vg-root 750G 43G 677G 6% /
    tmpfs 883M 28K 883M 1% /dev/shm
    tmpfs 5.0M 0 5.0M 0% /run/lock
    tmpfs 883M 0 883M 0% /sys/fs/cgroup
    /dev/sda1 472M 404M 44M 91% /boot
    /dev/sdb2 4.6T 1.1T 3.6T 23% /media/usbhd2
    /home/mark/.Private 750G 43G 677G 6% /home/mark
    tmpfs 177M 0 177M 0% /run/user/1000​
 
Top