How to partition - LVM and 2 drives?

Help with issues regarding installation of Debian

How to partition - LVM and 2 drives?

Postby nomad101 » 2019-09-30 10:25

Hi

I'm setting up a home server (converting an oldish qnap NAS) by installing debian ARM-based.
The server will have 2 drives: 60gb SSD and 2TB HD. For data/backup storage, I would want personal docs to be stored in an encrypted drive/folder space. And for music & movies encyption doesn't matter. If someone stole the server box, I wouldn't want them to be able to access my personal docs, though I want easy access for other devices on my LAN to be able to read/write to the personal doc space for daily operations.

A few questions:

1) Is there a guide to the most appropriate way of partitioning? What would be the best scheme of the partitions? Most basically, I was thinking that OS and progs etc installed on the SSD, and /home would be on the HD.

2) Should I use LVM with encryption during installation? Is there a risk if that 1 drive fails, I'd lose the whole set up?

3) Or is it easier to install the OS on the SSD. And then connect the HD and encrypt via LUKS?

Thanks for any help.
nomad101
 
Posts: 2
Joined: 2019-09-30 10:13

Re: How to partition - LVM and 2 drives?

Postby p.H » 2019-10-02 13:57

nomad101 wrote: I would want personal docs to be stored in an encrypted drive/folder space. And for music & movies encyption doesn't matter

What do you mean by "personal docs" ? Does it include user settings, web browser cache files, mailbox files... ?
What is the expected disk space usage for personal docs ?
What is the expected disk space usage for music & movies ?
p.H
 
Posts: 1160
Joined: 2017-09-17 07:12

Re: How to partition - LVM and 2 drives?

Postby nomad101 » 2019-10-02 15:05

p.H wrote:What do you mean by "personal docs" ? Does it include user settings, web browser cache files, mailbox files... ?

These would document files (odt, ppt etc), and thunderbird archive emails. And I would also include family photos/videos. Things that I wouldn't want non authorized folks to access.

p.H wrote:What is the expected disk space usage for personal docs ?

Roughly 100GB

p.H wrote:What is the expected disk space usage for music & movies ?

Rouhgly 5-700GB

Thanks
nomad101
 
Posts: 2
Joined: 2019-09-30 10:13

Re: How to partition - LVM and 2 drives?

Postby p.H » 2019-10-03 08:17

nomad101 wrote:
What is the expected disk space usage for personal docs ?

Roughly 100GB

Too big to fit in the SSD.

What you can do :
Put the system, swap (if needed) and /home on the SSD. You can create a separate /home if you like. You can use LVM with an unencrypted physical volume on the SSD if you like.
Create two partitions or logical volumes on the HDD. Use one as a filesystem for non sensitive data, use the other one as a physical volume for LUKS encryption and use the resulting encrypted volume as a filesystem for sensitive data.
Mount both filesystems wherever you see fit (not in /media or /mnt).
After installation, create subdirectories as needed and set appropriate permissions on both filesystems.
You can create symlinks pointing from /home/$USER locations (Documents, Movies, Music, Pictures...) to the related filesystems directories, or do bind mounts. If you don't set up symlinks or bind mounts you will have to configure Thunderbird to store its files in the encrypted filesystem.
p.H
 
Posts: 1160
Joined: 2017-09-17 07:12

Re: How to partition - LVM and 2 drives?

Postby CwF » 2019-10-04 14:36

I use a single whole disk encrypted LVM as a bae in a system that uses extra 5-7 disk. One thing for sure is I never encumber that boot image disk, the lvm disk, with extra disk dependencies. I use a few ways to attach those extra disk after boot, how and when needed. Since I only reboot this 24/7 host every so often it is not an issue to click a few things to mount up after boot.
As p.H laid out there are many ways to organize. In my way the host image disk is confirmed to boot in multiple machines. The extra disk are mounted by-label, so they are transferable easily without confusion. All extra disk are basic file systems and hold the file types mentioned here, mounted how I like. Anything personally important stays on the encrypted host disk and it's not all that much. Most of the crap we collect doesn't deserve to be encrypted!
CwF
 
Posts: 502
Joined: 2018-06-20 15:16


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest

fashionable