:: Re: [DNG] UEFI, software RAID1, LVM…
Forside
Slet denne besked
Besvar denne besked
Skribent: o1bigtenor
Dato:  
Til: Olaf Meeuwissen
CC: Devuan ML
Emne: Re: [DNG] UEFI, software RAID1, LVM and encryption
On Mon, Jul 25, 2022 at 6:24 AM Olaf Meeuwissen
<paddy-hack@???> wrote:
>
> Hi o1bigtenor,
>
> o1bigtenor writes:
>
> > On Sat, Jul 23, 2022 at 10:19 PM Olaf Meeuwissen via Dng
> > <dng@???> wrote:
> >>
> >> Hi list,
> >>
> >> I lost the single SSD on my mini PC and am in the process of rethinking
> >> its storage. So far, I've got myself two brand new and identical PCIe
> >> NVMe SSDs (256GB) for use in a software RAID1 setup. I think I need to
> >> enable UEFI to get access to the BIOS from the GRUB menu.
> >>
> >> I want my /home directory on a partition of its own, at a minimum, and
> >> encrypt it. I don't see a need to encrypt much else as I am not after
> >> plausible deniability. It's mostly to be able to return a broken disk
> >> for a replacement and still sleep in relative peace of mind ;-)
> >>
> >> I haven't quite made up my mind as to a need for other partitions. I
> >> use containers and VMs quite a bit. Perhaps these are better stored
> >> some place other than the partitions for / or (an encrypted) /home.
> >>
> >> With 64GB of RAM, I don't see much need for swap. If needed, I could
> >> always add a swapfile instead of a partition.
> >>
> >> Given the above,
> >>
> >> - what are your expert(?) opinions on partitioning for this?
> >
> > Well - - - expert - - - lol - - maybe in my mind but not really even
> > there - - -grin
> > but I've just done something like this!
> >
> >> - how do I make (and keep) both disks bootable?
> >
> > I used the partitions
> > 1. small (4M) empty in between each partition
> > 2. ESP on each disk (partiion #1)
> > 3. see #1
> > 4. partition on each disk
> >     rolled each partition into a raid 1 array.
> > 5. see #1
> > 6. see #4
> > 7. repeat until complete

>
> I don't really understand why you used the "small" unused partitions in
> between. Some kind of buffer to prevent "out-of-range" writes?


I first used gpt to partition a uefi setup some over 10 years ago.
At that time there was a recommendation of (IIRC) 2 MB spaces between
the partitions. Seemed to work and I moved to 4 MB as that is the (again
IIRC) block size on the items. So I have an empty block between every
partition. Given that I don't use anything smaller than 1 TB losing even
20 blocks of space imo is minimal. (Again) IIRC the idea was that if one
needed to rescue the partition have the empty space on either side was
to make things go better - - - dunno as to the legitimacy of such but
until its thoroughly debunked for me - - - I'll likely continue. (I
run a raid-10
array for my main storage (/home is more short term although I need to
do some serious cleanup) as I was serious security and like the speed
compared to raid-6 anyway. If I had need for a lot more space (would be
a lot more $$$) I think I would go to raid-60 for my main storage anyway.
>
> >> - can I put the ESP on RAID1?
> >
> > I couldn't find a practical way to do this.
> > Read of some who built their system on disc 1 and then
> > copied everything to disc 2 then did some kind of interesting and, for me
> > anyway, confusing manipulations and then they had a raid-1 array where
> > one array had everything.
>
> I came across
>
> https://wiki.archlinux.org/title/EFI_system_partition#ESP_on_software_RAID1
> https://outflux.net/blog/archives/2018/04/19/uefi-booting-and-raid1/
>
> which indicate it is possible but not without taking some extra care.
>
> >>    - if not, how do I keep the copies in sync?

> >
> > Using the copy and then manipulate to make raid1 then supposedly does
> > that but I didn't do that so - - - dunno.
> >
> >> - do I need a separate partition for /boot?
> >
> > I gave it one.
>
> In other follow up, Antony Stone and I concluded that it would not be
> needed for my needs. In that case, I prefer to go without and keep it
> simple.
>
> >>    - if so, can it be put on RAID1?

> >
> > My stuff has a raid1 array for every partition except ESP.
>
> I think that's what I'll end up using too.


IMO its not elegant to need to use a raid partition for each of my
partitions. I would think I could specify raid-1 for my partitions and
there would be one raid device instead of my bulging portemanteau
of them! But - - - I think I'm a fringe thinker for raid use. The linux
raid list denizens have at least indicated such. They see little need
for more than raid-5. Maybe I've been a business owner too long and
really really hated the last time I had to redo a years worth of data
for my business (recordkeeping) but once is enough!

>
> >>      - if not, how do I keep the copies in sync?
> >>  - should I use LVM?

> >
> > Me - - - maybe I'm just deficient but I didn't want to deal with one more
> > possible point of failure so I did NOT use LVM. (I tend to not only like
> > but practice the K.I.S.S. principle.) Maybe I should have but don't see the
> > value in adding complexity.
>
> Hmm, if I were to practice KISS (and I usually do), I'd leave out the
> unused partitions and keep /boot as part of the partition mounted on /
> :-P
>
> The main reason I might want to go with LVM is to break out additional
> partitions, eh logical volumes, or resize existing ones based on the
> observed system usage after installation.
>
> It would also allow me to just use a single RAID1 array where LVM sits
> on top of it and manages all the logical volumes I (might) need. For
> the record, I've been using LVM for a long time without any issues in
> day-to-day use. In case of special operations (adding a PV or LV and
> resizing LVs or just plain trouble shooting) I find myself hitting a
> search engine to get things done :-)
>

Thank you for the info re: LVM(2) - - - I didn't know that horse and don't
like betting a lot of work on an unknown horse!!!

Hopefully my ideas were of some help.

Regards