View previous topic :: View next topic |
Author |
Message |
Proinsias Tux's lil' helper
Joined: 06 Oct 2014 Posts: 133 Location: Scotland
|
Posted: Sat Nov 10, 2018 2:42 pm Post subject: SDD & HDD partitioning, lvm & luks & too many di |
|
|
I ditched my gentoo desktop for calculate, alpine & debian whilst surviving for a few months on a mobile hotspot with grim reception. I now have a decent internet connection again, have picked up some extra storage and am back on gentoo.
Hardware:
120GB SSD
1TB HDD
2x2TB HDD (new addition)
Intel Haswell 4130
Gigabyte Z87-HD3
Corsair CX430
Previously I had gentoo with ext4 on the 120GB sdd and had the 1TB hdd as ext4 general media storage.
I've picked up 2x2TB hhd's and started playing with lvm and luks. I used my debian install on the ssd to install gentoo on my 1TB hdd, once I had a comfortable environment for a few weeks I nuked debian, got out my additional 2x2tb hard drives and started installing gentoo on the ssd.
Code: | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
├─sda1 8:1 0 512M 0 part /mnt/gentoo/boot
└─sda2 8:2 0 111.3G 0 part
└─sddlvm 253:7 0 111.3G 0 crypt
├─ssdlvm-swap 253:8 0 2G 0 lvm
├─ssdlvm-root 253:9 0 25G 0 lvm /mnt/gentoo
└─ssdlvm-home 253:10 0 20G 0 lvm /mnt/gentoo/home
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 1G 0 part /boot
└─sdb2 8:18 0 930.5G 0 part
└─root 253:0 0 930.5G 0 crypt
├─mylvm-swap 253:1 0 8G 0 lvm [SWAP]
├─mylvm-gentoo--home 253:2 0 25G 0 lvm /home
├─mylvm-gentoo--root 253:3 0 25G 0 lvm /
├─mylvm-usr--portage 253:4 0 40G 0 lvm /usr/portage
├─mylvm-downloads 253:5 0 80G 0 lvm /mnt/downloads
└─mylvm-windows 253:6 0 30G 0 lvm
sdc 8:32 0 1.8T 0 disk
└─sdc1 8:33 0 1.8T 0 part /mnt/storage
sr0 11:0 1 1024M 0 rom |
so, functional gentoo I'm posting from is sdb 1TB hdd, sda is the ssd with a fresh gentoo which boots nicely but has been living in a chroot the past few days. I should be good to move to it shortly.
First issue is the power, just realized my psu has only 4 sata connectors and I now have 4 hard drives and an optical drive. I was planning to use the 2x2TB in some sort of raid or btrfs type system to store mainly media files, backups & cover against drive failure but not sure this is feasible if I need to unplug a drive anytime I want to rip or burn a cd. I've not used raid, or any redundancy with btrfs before....and not sure if I should be looking at hardware or software raid. I could just use one drive and periodically plug in the other and cp -a or rsync stuff over but it would be nice if the system could just mirror the data when the extra drive is available.
The other thing is lvm on luks. I've put the whole gentoo install on the sdd with lvm on luks for now but would like to have it spread over the 1TB hdd too. I'm using openrc, grub2, manual kernel method with initramfs by genkernel and unlocking the luks container with a pasphrase at boot. It would be nice if I could have an encrypted lvm container on the 1TB hdd for /usr/portage/, extra kernel sources, dumping ground for temporary media, torrents, vm's and whatnot which will automount at boot.....but not sure this is feasible to add, can I use one passphrase to unlock two luks containers or extend my current sdd container over the hdd?
I'm trying to keep the gentoo install on the ssd space efficient as I'd like to have room for a windows VM on there and another linux distro or two, probably alpine, void or debian. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Nov 10, 2018 3:57 pm Post subject: |
|
|
Proinsias,
You need a SATA power splitter cable or Molex (old IDE) to SATA convertor power cable, if you have spare old style connectors.
Put "sata power splitter" into an amazon search and you will find both sorts. StarTech and Ugreen isn't usually lowest cost but its good stuff.
Lets leave aside LUKS for a second.
lvm can merge several real block devices into one in lots of different ways, including some raid levels. You can even add or remove devices too, space permitting.
Raid is not a backup. Code: | rm very_important_file | does just that to a raid set.
Don't think about hardware raid. With two drives, you can do raid0 or raid1 With raid0 there is no redendency
raid1 is mirroring, it writes the same data to all members of the raid set. There is almost nothing for raid to do.
Do not use BIOS raid, unless windows is involved.
I'm not a LUKS user. I know the layer order will make a difference though.
Why would you encrypt Quote: | /usr/portage/, extra kernel sources | ? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 21706
|
Posted: Sat Nov 10, 2018 5:22 pm Post subject: |
|
|
You cannot directly unlock two LUKS volumes from one passphrase. You can use the same passphrase on multiple volumes and configure your unlock tooling to unlock each of them with one copy of the passphrase entered by the user, which is almost as good from a usability perspective. You could also arrange that one locked volume has a copy of the passphrase or key that unlocks the other volume, so you unlock one with a passphrase, then use the now-unlocked volume to unlock the other volume. |
|
Back to top |
|
|
Proinsias Tux's lil' helper
Joined: 06 Oct 2014 Posts: 133 Location: Scotland
|
Posted: Tue Nov 13, 2018 10:50 pm Post subject: |
|
|
Thanks,
I'm gonna pick up some sata & molex adaptors, looks ideal.
Will leave raid for the moment.
Quote: | Quote: | Why would you encrypt | /usr/portage/, extra kernel sources
| One encrypted lvm group for each drive ssd/hdd seemed simpler to allow for partition growth and flexibility, not for security of my kernel sources . I'd read one lvm over hdd/sdd won't take much advantage of the ssd but haven't tested this.
I'm using the shiny new gentoo on the ssd, which is nice. I'm going to try some of the luks unlocking methods Hu mentioned whilst I shop for cables, or remove excess cables from my basket, and shuffle things around.
Code: | sda 8:0 0 111.8G 0 disk
├─sda1 8:1 0 512M 0 part
└─sda2 8:2 0 111.3G 0 part
└─root 252:0 0 111.3G 0 crypt
├─ssdlvm-swap 252:1 0 2G 0 lvm [SWAP]
├─ssdlvm-root 252:2 0 25G 0 lvm /
└─ssdlvm-home 252:3 0 20G 0 lvm /home |
|
|
Back to top |
|
|
|
|
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
|
|