Partition option / LVM ignorance?

Soldato
Joined
18 Oct 2002
Posts
10,381
Location
Behind you... Naked!
Ok, on my Linux Laptop, I have a few small niggles, and I am not quite happy about the solutions.

Heck, I have written this twice now, but I keep waffling ,so I will cut it down and if I get any help, I will expand, so if you need to ask questions, please do so.

My Laptop has a 120SSD and 2x2TB HDs
I have tried LVM but I seem to be forced into its own way of doing something that I am not happy with.

Normally I have root and Swap on the SSD and .home on the 2TB but I need more room and as I have spare 2TB Drives, I have swapped out the DVD with another 2TB drive.

When I tried LLVM I ended up wioth a 50GB / and sure, I did get a 3.7TB /Home but it was very slow.

Maybe a more normal software RAID ( striped ) will be better for me, but the Laptop does not do it, and the Linux distros that I tried dont do it either.

Anyone have any ideas or advise how I can get LVM to work better for me?
 

SMN

SMN

Soldato
Joined
2 Nov 2008
Posts
2,502
Location
The ether
I would create one physical group for the 120GB SSD, with 1 volume group of 120GB in that PV, and then create your swap and root logical volumes out of that VG.

Then, i'd use mdraid to create a RAID0 or RAID1 of the 2TB drives. Then, one PG from that mdraid drive - and then onwards, with as many VG's and LV's as you like.

Edit: When I learned LVM many moons ago i wrote a blog on it, to ensure i didnt forget it: https://www.everybodyhertz.co.uk/rhce-lvm-modification/ might be helpful.
 
Last edited:
Soldato
OP
Joined
18 Oct 2002
Posts
10,381
Location
Behind you... Naked!
Ok thanks. I will have a look at the link too!
It does not seem to have much in the way of giving me control with LVM during installation, plus, I dont want to make some silly mistake in doing something that will cause me to lose data should it need reinstalling later on!
I need to do a lot of reading up clearly!
 

SMN

SMN

Soldato
Joined
2 Nov 2008
Posts
2,502
Location
The ether
Ok thanks. I will have a look at the link too!
It does not seem to have much in the way of giving me control with LVM during installation, plus, I dont want to make some silly mistake in doing something that will cause me to lose data should it need reinstalling later on!
I need to do a lot of reading up clearly!
Depends on the distro, I know Ubuntus installation is quite intuitive for LVM at setup. If you're going more 'hardcore', shall we say, it becomes trickier :) Good luck - LVM is awesome when you get it working properly. I have 4 x 2TB disks in one RAID5 array using MDRAID. This gives me a 6TB usable volume, /dev/md127.

I then have one physical group (pg), which i created via 'pgcreate ...' and specified that /dev/md127 6TB volume.

Once you've done that, you can go a million ways. I created 2 volume groups from that physical group, one being 'vgcreate {media}' (for example).

Then, in that media volume group, you can create your actual logical volumes, i.e. 'lvcreate {tv}, {films}, {music}, etc'.

That way, if your running out of space and need to give your TV volume more disk, (and there is disk available) you simply 'lvextend {tv} +200GB' (overly simplifying the syntax here). Then a quick 'resize2fs' and voila, logical volume is now 200GB bigger.

You can then obviously add more disks to the MDRAID (give it another 2TB and let it grow), pvextend, vgextend, etc. You can also migrate the entire MDRAID members to another Linux distro, mount it and all your logical volumes are still there.

[Good article here on extending LVM: https://www.tecmint.com/extend-and-reduce-lvms-in-linux/ ].
 
Last edited:
Soldato
OP
Joined
18 Oct 2002
Posts
10,381
Location
Behind you... Naked!
Thanks guys.

I have been doing quite a bit of reading up, and I am going to do a lot more before I jump into it.

What I do have, and I feel that I might just give it a proper shot now, is that my Server is currently Windows Server 2008, however, I am not using any of the server things with it, it is basicallt just a file server, and I use the CPU for Folding and nothing else.

Previous to re-building my Server, I was using 4 NAS drives. These are 4x3TB + 4x4TB + 2x2TB + 2x2TB.

What I was getting was, that my home PCs, seemingly due to Windows 10 updates, were losing sight of the NAS Drives

The NAS Drives were simply giving me lots of grief in trying to access them???

In the end, what I did, was buy all new HDs for the Server and copy the files off the NAS drives onto the Server, and use the Server instead of the NAS drives.

My main PC has its NETWORK DRives mounted just fine and when I need to, I can access the Server most of the time just fine with other PCs in the house ( Kitchen, MediaPC, Daughters PC, Laptops, Tablets etc ) while the Netgears, I had to fully wipe them and start again, and since then, even though I have set them both up as the same thing ( one large Partition with FlexRAID ) one is accessible and the other, windows gives me the error dialog stating that it cannot be accessed, even though I can get onto the admin pages on both just fine. Annoying.

Both the DLinks has 2x2TB are just disconnected.

Anyway, I have been seriously considering moving the Server to Linux and my issue is how to sort out the Drives, but the more I am reading about LVM, the more Im thinking that it will be a great option for me.

So, I mught give it a shot, perhaps on a temporary trial server first of course, but whatever I do... Im learning a great deal about this LVM and so far, nothing I have read is bad, its all good... Mostly LOL
 
Associate
Joined
3 May 2018
Posts
604
Why not just leave the 120SSD alone and partition it for / and <swap> then use whatever you need on the bulk storage array.

This way, when things go mamories up and you need to boot a USB drive to fix something you won't need to mess around with LVM you can just mount your root partition and you are done.

RAID and LVM et.al on the primary / partition does somewhat worry me for recover-ability.
 
Associate
Joined
20 Jul 2005
Posts
586
Location
the dirty souf
So I assume you created a PV on each 2TB drive, added those to a VG and created a LV mounted on /home? If performance is not great, you could consider recreating the volume as a striped volume, then restoring the data from backup - you are taking backups right? Alternatively, you could look into LVM cache. Perhaps you have an unused pcie or expresscard slot that could house another ssd?
 
Back
Top Bottom