Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Back again with an LVM install partitioning question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Fri Jul 20, 2018 9:32 pm    Post subject: [SOLVED]Back again with an LVM install partitioning question Reply with quote

So, I've been playing with various install things, making notes, and now I think I'm finally ready to make the lasting install on this desktop machine.

I have 2 SSDs on the Marvell SATA Rev III ports, 1 a SanDisk Ultra II 960GB and the other a Crucial MX100 256 GB. My idea is to use them together in one LV, giving me a total space of ~1.1 TB of space to partition to my heart's content and store all the little things I want to (particularly to get things off my platters so I can wipe them clean and perhaps form a RAID on them down the road as the mobo natively supports it).

But my question is this: am I better off with my plan for a single LV under a single VG, or should I make each drive a separate LV (or, rather, each a separate VG, with each VG having its own LV)? My idea is to be able to have multiple partitions as I feel like (yeah, not gonna make the full available space into one big / ), but I might benefit from having particular partitions on one or the other drive. My rationale is as follows:

Initially when I decided to come back to Gentoo, I knew that I would want multiple partitions, but I had forgotten all of the recommendations on what should go where, and my previous setups were as guided setups (by namely BillP and a few others) rather from my own knowledge. When I went to Windows, I achieved some of this by using sysprep to move my \Users\ tree off the main boot drive (which eventually became the SanDisk) and onto a second drive (which eventually became the Crucial), and then I also relocated those 'special folders' in Windows (Docs, Music, Pics, & Vids) out from under \Users\ and onto the platters I mentioned earlier (started with a pair of 500 GB Seagate 7200.11s, now a pair of Seagate 1TB 7200.12s). Now, I kinda want to do the same thing, at least with the special folders that I have moved to the platters - I want all that data to stay there as is, so that I can access them no matter what happens to the SSDs / LVs.

But with the moving the the \Users\ tree (I suppose the analogous in Linux would be a separete /home partition on a separate physical disc) am I even able to force which PV I make certain partitions on in the LV? My reading suggest no - that it is completely linear, so if it starts with the PV on the SanDisk it uses all the space on the first PV before moving to the next PV. Which leads to a second question - when using multiple PVs in an VG, does the order in which they are added determine which PV gets used first?

I think I've answered my own question, in a manner of speaking - if it is linear, then in order to put partitions on separate PVs, I need multiple VGs, one per PV, and each with its own LV on it (making it easier to manipulate partitions).

Does this sound correct?

I've also seen more than a couple of posts here for folks with both SSD and HDD setups, and where to locate various partitions (SSD vs HDD), but I'm not in a place to be able to use the platters yet, as they still have data on them that I need on a daily basis, and until I can migrate them somewhere safe that I also have daily access to, I'm not playing with those partitions). So, that is for another day and time.

Also, since I am only booting off one SSD, the SanDisk, from the pvcreate man page, it says that for full disk PVs the partition table must be erased - is it easier for me to just remove all partitions and not create any and make a pv on the entire drive, or should I create a single partition and then dd /dev/zero the 1 512byte block as it says to in man? I have no idea if this has changed, as I'm reading this off the man page for pvcreate from the Gentoo Live DVD .ISO (via USB), but thus far it's the first I've run across this note - I'll search more in the meantime.

Finally, one other thing - at the very end of the pvcreate man, it says that is the 2nd SCSI is a 4KiB sector drive that compensates for Windows partitioning, I nee to account for this - I also read about this type of stuff in more than a couple of the SSD guides (most of which were at minimum 5 years old). Would that even apply to my drives being rather matured SSDs (both are within 2 years old)?
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.


Last edited by johngalt on Sat Jul 21, 2018 4:51 am; edited 1 time in total
Back to top
View user's profile Send private message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Sat Jul 21, 2018 4:51 am    Post subject: Reply with quote

It just hit me - while in the shower, no less....

I only need to clear out the partition info on full drive PVs if it they going to be a part of a VG that has other drives in it - to allow for the continuity.

No idea why I didn't figure that out before.

Marking solved.
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 665

PostPosted: Sat Jul 21, 2018 5:32 am    Post subject: Reply with quote

Personally I would keep one PV per VG. I don't trust or understand what happens when a PV fails in a multi-volume VG. I prefer adding multiple devices to RAID for reliability, and then using the RAID as the PV.

You can divide up a VG into LV's to your hearts content. Don't over-do your initial lvcreate's. You can always lvextend and grow the filesystems.

I prefer to create a partition table and then one large partition, instead of using the whole device as a PV. This is similar to the typical best practices for creating mdadm RAIDs.

HTH
russK
Back to top
View user's profile Send private message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Sat Jul 21, 2018 1:56 pm    Post subject: Reply with quote

It definitely helps, thanks Russ.

That's pretty much what Ive opted to do for the nonce, as the onboard RAID is only supported on the SATA II ports, to which are attached only platters - both SSDs are on the Marvell 'makeshift' SATA III (albeit a bit crippled, as they can only do ~5.4 Gbps as opposed to a full 6, losing about 10% bandwidth).

For now I've created a PV per SSD, and a VG per PV, keeping them separate, as it will give me the best results. And when I was playing around with LVM, I was initially creating an LV that spanned the entire ~890 GB on the SanDisk, but now I've made the / LV all of 100 GB, leaving me plenty of space to create other partitions as I see fit. Same thing on the Crucial, only 100 GB (out of 240) dedicated to /home for now, in case I get a wild hair and decide to put any other partitions on there. I will probably end up making all of the Crucial a part of /home, but for now, I have options, just in case.

Thanks again.
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Sat Jul 21, 2018 2:23 pm    Post subject: Reply with quote

johngalt,

There is no need to hurry.
Mako a VG on the bigger SSD. Do not make it the entire drive. That will save you about 1Mb at the cost of not having a partition table.
Not having a partition table that fdisk and friends recognise might cost you your data later.
If its EFI bootable you need a VFAT partition outside of LVM. If its BIOS, you need a boot partition outside of LVM.

When that initial VG is full, you can either add another PV to it or make another LV group on another PV.

Rotating rust is good for large sequential files, like packages, distfiles and media files.

The onboard raid will be a variety of fakeraid. The only reason to use fakeraid is that you need to share the raid set with Windows.
Use mdadm for raid otherwise.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Sat Jul 21, 2018 5:21 pm    Post subject: Reply with quote

Hi, Neddy,

I actually use the larger SanDisk SSD as my boot drive when in Windows because it actually has faster access times, plus is also the newer drive (and thus automatically has better longevity). No, I'm not dual booting - I'm moving from Windows to Gentoo, and will then configure my former Windows install into a VM inside Gentoo.

I'm also future-proofing the machine, in that the current mobo is BIOS based, but I've used GPT on both drives anyway, and am using GRUB2 as my bootloader for the BIOS, along with having already made an ESP for later on when I move to a (u)EFI-based motherboard. I've already done this part several times in the last couple of weeks as I fine tuned my installation, both procedurally as well as systematically (for example, I finally figured out why, when I blocked systemd and related sources, that the stupid thing would not find the LVs - all because it was tying to use lvmetad, which I've verified is not a requirement to get it to boot). So, I've got the structure down pat in terms of booting.

The only reason I can see for wiping part info on a full drive would be for the LV continuity, but that is actually counter-intuitive to what I (logically) think a (logical) volume should do in the first place, so I opted not to do that. I did create a PV across the entire remaining space on the Large SSD as well as the entire space on the smaller SSD, which has a single partition since it is not boot-able, but I create 2 distinct VGs (and thus 2 distinct LVs), one per drive (partition). I've limited the LVs to 100GB each, the one on the boot drive for / and the one on the smaller SSD for /home. Once I get to a position where I can move data off the RRs (aka platterdrives), as you refer to them, I'll look into perhaps making a raid on them (they are identical drives, even bought them at the same time, with same board controller and firmware) with md as you suggest - might be worth it for large seq files. I never used the RAID setup in BIOS, thus did not know it was not an actual RAID, but a fakeraid....

I do have one question, that came up when making notes for and working through this current install - this is the first install I've done with an extra mount point (versus /boot and / only), and while I caught myself easily enough to realize that after mounting /mnt/gentoo and grabbing the stage3 archives and extracting them, I had not yet mounted my new /home partition - just to be safe, I simply deleted everything out of the mounted /mnt/gentoo partition, mounted /home, then copied the stage3 back to /mnt/gentoo and extracted again.

But, in the future, if I want to mount an existing directory onto a new partition that I create in my LV, will it automatically move the data from the existing partition to the new part upon mounting?
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum