• 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
3,738 (1.10/day)
Likes
1,002
Location
Vietnam
System Name Gaming System / Laptop / HTPC / Miner
Processor i5 8600K @4.5Ghz / i5 540m / i7 970 / i5 2500k
Motherboard Z370 Aorus Ultra Gaming / Acer / Shuttle sx58j3/ P67 Pro 3
Cooling CM Seidon 120 XL / Laptop Cooling / SE-903 / Stock
Memory 16Gb Nighthawk 3000 MHz/ 4GB DDR3 / 16gb DDR3 / 12 GB DDR3
Video Card(s) Colorful 1080Ti / G210m / 7870XT / 2x1060 + 1080
Storage 750G MX300 + 3TB HDDs / 250G Ultra II /250G 850 EVO/ 250gb Mechanical
Display(s) Dell U2515H + Asus VX239H/ 15.6" Laptop Screen / 720p 42" Plasma TV/ None
Case Cooler master HAF 922 / Laptop Case / Corsair Air 240 / Custom
Audio Device(s) On Board Realtek
Power Supply Andyson N700 Titanium / Laptop Power / ACBell 700 W / FSP 850 W
Mouse Logitech G700s
Keyboard CM Quickfire XT (Cherry MX Reds)
Software Windows 10 x64
Benchmark Scores 3DMark Firestrike = xxxxx Timespy = 9097 Heaven = xxxx
#1
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​