The officially official Devuan Forum!

You are not logged in.

#1 2023-05-08 12:32:33

mclien
Member
Registered: 2020-02-29
Posts: 99  

[solved] partioning server/NAS

I'm a bit lost about my partition concept.
Hardware:
1 ssd (240GB) for the OS
2 HDD (14TB each) as the data storage as RAID 1

So the RAID is easy, that will be a encrypted Volume

I will just use a minimal install, plus nfs and cups (for the 2 printers).

The OS should also be encrypted, but I'm unsure weather to do just an encryoted partition or manual.  And do I set up a swap partition at all (do you do this at all nowadays and with ssd?)

Last edited by mclien (2023-05-22 15:40:22)

Offline

#2 2023-05-08 18:09:01

nahkhiirmees
Member
Registered: 2022-07-24
Posts: 261  

Re: [solved] partioning server/NAS

What kind of installation media are you planning to use? Those which have Refractainstaller or netinstall ?

Offline

#3 2023-05-09 10:47:58

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,481  

Re: [solved] partioning server/NAS

If you want encryption and you want a swap partition, it's easier to do it with encrypted lvm. Then the OS partition(s) and swap will all be part of the encrypted volume. If you just want a single partition, you could use a swap file.

As an example, I use a 256MB swapfile on a laptop. None of that is being used at the moment. On my desktop machine I have a 1GB swapfile, and 16 MB of that are in use. On a server that runs radio automation software (constantly playing music from a playlist) that has LVM and RAID, the 256MB swapfile is about half full. These machines have 6 or 8 GB RAM.

Note: Encryption only works when the computer is turned off. It's useful in case someone steals your computer or you have to send the hard drive out for replacement or repair.

If you're worried about writes to the  ssd, you could put the swap on one or both of the spinning disks. You would need to make the RAID from partitions instead of the whole drive, to leave room for a swap partition. Oh, I suppose you could put a swapfile inside the RAID. That might be easier. Then you don't need to make the extra partition.

Offline

#4 2023-05-09 18:50:00

mclien
Member
Registered: 2020-02-29
Posts: 99  

Re: [solved] partioning server/NAS

That seems to be a good idea. So System on the ssd without swap. RAID assembled from the 2 hdd and a swap file on that. Do you know if that can be done in one run during the installation?

BTW: I use netinstall (like allways, since my first etch install). As for encryption, yes I'm aware it only works turned off, but I doubt anyone is able to unmount it from my rack inside the antique wooden desk and keep it running. My backup hdd is encrypted and usually placed inside a safe-deposid box.

Offline

#5 2023-05-10 13:09:13

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,481  

Re: [solved] partioning server/NAS

The simple answer is no, you'll have to make the swap file after the installation is finished.
The more complicated answer is that you can probably drop to a shell some time late in the install and add the swapfile manually.

Offline

#6 2023-05-10 19:23:38

mclien
Member
Registered: 2020-02-29
Posts: 99  

Re: [solved] partioning server/NAS

Well, as usual I fail to get a working installation.
I end up with "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)"

This is what I tried:
2 hdds ->md0 ->encrypted volume -> 2 logical volumes -> /data (ext4) and swap
1 ssd -> /boot (unencrypted, ext2) ; 2 partitions: encrypted -> vg -> lv -> both ext4 / and /home

Installation went through just fine (I skipped the random write on the disks since it would take ages for 16TB). Installed grub without UEFI enforced by default choice

Last edited by mclien (2023-05-10 19:53:32)

Offline

#7 2023-05-10 22:30:08

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,481  

Re: [solved] partioning server/NAS

It looks like you did things in the right order. When I do installs like that, it sometimes takes me a few tries to get it right.
Check /etc/fstab, /etc/crypttab, /etc/mdadm/mdadm.conf and /boot/grub/grub.cfg
I think something is aiming for the wrong target.

Offline

#8 2023-05-11 17:39:18

mclien
Member
Registered: 2020-02-29
Posts: 99  

Re: [solved] partioning server/NAS

Well, that will be kinda tedious. But the way would be, booting a live system, mounting the encrypted / fs
Or do I miss an easier way here?

Offline

#9 2023-05-11 18:56:10

rolfie
Member
Registered: 2017-11-25
Posts: 1,163  

Re: [solved] partioning server/NAS

Use the rescue mode in the installer.

Offline

#10 2023-05-18 17:02:12

mclien
Member
Registered: 2020-02-29
Posts: 99  

Re: [solved] partioning server/NAS

Seems it was just a failed grub install. fstab, crypttab and mdadm looked unsuspicious, so I just re-installed grub. May be I had the partition wrong. Working now, but it is really slow loading the initramfs. But since it will be my NAS, that isn't a real problem (maybe I should have spend a bit more for the RAM, it's just 4GB).

Offline

Board footer