Re: [DNG] install on a raid 1 array

2022-06-23 Thread Simon
o1bigtenor via Dng  wrote:

> First attempt
> set up 2 raid 1s
> except now I can't partition the drives

You don’t partition the drives after creating an array with them - you 
partition the array (or just use it as a filesystem of LVM PV).

> second attempt
> set up 2 drives with some spacer partitions (4.0 MB each) and some 8 
> partitions

You don’t need the spacers.

> set up 2 drives with same spacer partitions and a large /home partition
> then wanted to make 2 raid arrays
> - - - - except I'm only allowed to use 2 partitions  - - - -  one from
> each member
>   of the array.
>   (There was also complaining that there were 2 /root partitions
> before I tried to
>create the array.)

I’m not quite following what you are describing here.


> So - - - how do I achieve 2 raid 1 arrays?
> #1 has partitions for /efi, /boot, /root/, swap, /tmp, /var, /usr, /usr/local
>   with a spacer of 4.0 MB between (and before the first and after each)
> #2 has a partition for /home
>   with a spacer of 4.0 MB between (and before the first and after)

To be clear, you want array #1 to use all of the first pair of disks, and 
partition it with those partitions ?

Partition each disk with just one partition, and set it to type RAID. So lets 
assume you have sda1 and sdb1.
Create a RAID 1 array, 2 members, using the two partitions
Partition the array.

Let me show you the setup on one of my machines (it’s a Xen host) :

# fdisk -lu /dev/sda

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002427f

   Device Boot  Start End  Blocks   Id  System
/dev/sda1   *  64  204863  102400   fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sda2  204864 4399167 2097152   fd  Linux raid autodetect
Partition 2 does not end on cylinder boundary.
/dev/sda3 4401810   473146379   234372285   fd  Linux raid autodetect

Here I have a dedicated boot partition, which ends up as part of an array, a 
dedicated swap partition (also part of an array), and a main partition that 
will be part of an array and then an LVM PV.
sdb is partitioned identically.


# cat /proc/mdstat 
Personalities : [raid1] 
md125 : active raid1 sda3[0] sdb3[2]
  234371125 blocks super 1.2 [2/2] [UU]
  
md126 : active raid1 sda2[0] sdb2[1]
  2096116 blocks super 1.2 [2/2] [UU]
  
md127 : active raid1 sda1[0] sdb1[1]
  102336 blocks [2/2] [UU]

So the 3 arrays, all healthy.



# ls -l /dev/md/
total 0
lrwxrwxrwx 1 root root 8 Jan 22  2021 boot -> ../md127
lrwxrwxrwx 1 root root 8 Jan 22  2021 main -> ../md125
lrwxrwxrwx 1 root root 8 Jan 22  2021 swap -> ../md126

When I created the arrays I gave them names - in most situations I can refer to 
them as /dev/md/name which is a lot easier than trying to remember the numbers.



# lvm pvdisplay
  --- Physical volume ---
  PV Name   /dev/md125
  VG Name   vgmain
  PV Size   223.51 GiB / not usable 2.05 MiB
  Allocatable   yes 
  PE Size   4.00 MiB
  Total PE  57219
  Free PE   28291
  Allocated PE  28928
  PV UUID   h0JXAi-y6Uq-cKGn-1AxH-1FfY-DWiD-eWqjsc

Here’s the single LVM PV defined.


# lvm vgdisplay -C
  VG #PV #LV #SN Attr   VSize   VFree  
  vgmain   1   9   0 wz--n- 223.51g 110.51g

The VG that’s using it


# lvm lvdisplay -C
  LV   VG Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  root vgmain -wi-ao  2.00g  
  var  vgmain -wi-ao 20.00g  

And some of the LVs defined on it.



# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#  
proc/proc   procdefaults  0   0
LABEL=root  /   ext3errors=remount-ro 0   1
LABEL=boot  /boot   ext3defaults  0   2
LABEL=var   /varext3defaults  0   2

My personal preference is to use filesystem labels - though there are some 
potential security issues there (specifically, what if a guest applies a 
matching filesystem label to one of it’s filesystems ?) when it’s a host for 
untrusted VMs. But as all the VMs are my own, it’s not a problem.



# mount
/dev/mapper/vgmain-root on / type ext3 (rw,errors=remount-ro)
/dev/md127 on /boot type ext3 (rw)
/dev/mapper/vgmain-var on /var type ext3 (rw)

And here’s what I have mounted (with the irrelevant bits omitted). Yeah I’m a 
bit old school and still use ext3 !



Re: [DNG] install on a raid 1 array

2022-06-23 Thread Hendrik Boom
On Thu, Jun 23, 2022 at 05:03:23PM +0100, Marjorie Roome via Dng wrote:
> Hi, 
> 
> On Wed, 2022-06-22 at 16:26 -0500, o1bigtenor via Dng wrote:
> > On Sat, Jun 4, 2022 at 3:03 PM Simon  wrote:
> > > 
> > > o1bigtenor via Dng  wrote:
> > > 
> > > > I have not ever installed like this so first the configuration.
> > > > 
> > > > Ryzen 7 3800X
> > > > Asus TUF Gaming X570-Pro   mobo
> > > > 64 GB ram
> > > > 2 - 1 TB M2 drives
> > > > 2 - 1 TB SSDs
> > > > 
> > > > I want to set the system up so that the drives are 2 sets of
> > > > Raid-1 with
> > > > (proposed)
> > > > set 1
> > > > /efi, /boot, /, /usr, /usr/local, /var, swap
> > > > set 2
> > > > /home
> > > > 
> > > > How do I set up the raid arrays?
> > > > Are they set up first and then the system is installed?
> > > > Or do I set up what I want on one of each of the sets and the
> > > > copy
> > > > that setup to the second (of the set) and make it raid after
> > > > system
> > > > install?
> > > > 
> > > > I can't seem to find anything done within the last 2 years
> > > > talking about this.
> > > > Don't see where it should be difficult but then - - - well I've
> > > > thought that before() and had a boat load of male bovine
> > > > excrement
> > > > to wade through!
> > > > (So I'm asking before doing to forestall issues - - - I hope!)
> > > 
> > > Others have given good information. Unless things have changed
> > > since I last did an install (couple of years I think), you can just
> > > go into manual disk partitioning and do it from there.
> > > Unfortunately, to do an optimum install means getting the
> > > calculator out as the defaults are sub-optimal …
> > > 
> > > AFAIK, all disks these days are 4k sectors, or for SSD, probably
> > > bigger. Ideally you want your partitions aligned to these
> > > boundaries. So for example, leave sectors (unix 512 byte sectors)
> > > 0-63 unused, and start your first partition at sector 64. If you
> > > know that your SSD uses (say) 64k blocks internally, then leave
> > > sectors 0-127 unused and start the first partition at sector 128.
> > > From memory the partitioning tool in the installer doesn’t do this
> > > alignment unless you manually calculate all your partition start &
> > > end blocks.
> > > Everything will work fine if things are not aligned, but
> > > performance will be sub-optimal in some situations.
> > 
> > 
> > OK - - - finally have a working system - - - -lots of joys - - -
> > first
> > a dead psu then
> > a cabling issue (the usb3.0 front panel connector on the mobo has a
> > specific
> > installation orientation) and then the mob said there was room for 8
> > SATA drives
> > and 2 M2 drives - - - well when you use the M2 slots you lose a SATA
> > drive for
> > each - - - lots of joys and time wasted - - - if only these gotchas
> > were easier to find!!!
> > 
> > Now I come to the install.
> > 
> > First attempt
> > set up 2 raid 1s
> > except now I can't partition the drives
> > second attempt
> > set up 2 drives with some spacer partitions (4.0 MB each) and some 8
> > partitions
> > set up 2 drives with same spacer partitions and a large /home
> > partition
> > then wanted to make 2 raid arrays
> > - - - - except I'm only allowed to use 2 partitions  - - - -  one
> > from
> > each member
> >    of the array.
> >    (There was also complaining that there were 2 /root partitions
> > before I tried to
> >     create the array.)
> > 
> > Neither of these options is what I want.
> > (This is only some couple hours down the drain - - - argh)
> > 
> > So - - - how do I achieve 2 raid 1 arrays?
> > #1 has partitions for /efi, /boot, /root/, swap, /tmp, /var, /usr,
> > /usr/local
> >    with a spacer of 4.0 MB between (and before the first and after
> > each)
> > #2 has a partition for /home
> >    with a spacer of 4.0 MB between (and before the first and after)
> > 
> > The destructions that I have been able to find are - - - - well - - -
> > -
> > they're mostly talking about using LVM - - - - which I have not ever
> > used.
> > 
> > So - - - please - - - - what do I do besides abandon my idea?
> > 
> > (There must be some kind of mystery step someplace - - - 
> > and I can't find it)
> > 
> OK, this is based on what I've done myself.
> 
> In the past I created multiple RAID1 partitions on the same disc pair
> for /, /home and swap. So /dev/md0 was /, /dev/md1 was /home and
> /dev/md2 was swap.
> 
> More recently I changed this to 3 LVM2 partitions in a single LVM2
> physical partition/logical volume. 
> 
> In principle the logical partition could span a number of physical
> partitions on one or more disk.
> 
> I assume that you've created two RAID1 arrays on 2 pair of disks. 
> Lets say they are named /dev/md0 and /dev/md1.
> 
> Then let dev/md1 be for /home. Just create a partition on /dev/md1 for
> /home.
> 
> On the other, dev/md0 you want to put the rest of your partitions. 
> I find the number of separate partitions you want to create somewhat
> excessive but I would 

Re: [DNG] install on a raid 1 array

2022-06-23 Thread Marjorie Roome via Dng
Hi, 

On Wed, 2022-06-22 at 16:26 -0500, o1bigtenor via Dng wrote:
> On Sat, Jun 4, 2022 at 3:03 PM Simon  wrote:
> > 
> > o1bigtenor via Dng  wrote:
> > 
> > > I have not ever installed like this so first the configuration.
> > > 
> > > Ryzen 7 3800X
> > > Asus TUF Gaming X570-Pro   mobo
> > > 64 GB ram
> > > 2 - 1 TB M2 drives
> > > 2 - 1 TB SSDs
> > > 
> > > I want to set the system up so that the drives are 2 sets of
> > > Raid-1 with
> > > (proposed)
> > > set 1
> > > /efi, /boot, /, /usr, /usr/local, /var, swap
> > > set 2
> > > /home
> > > 
> > > How do I set up the raid arrays?
> > > Are they set up first and then the system is installed?
> > > Or do I set up what I want on one of each of the sets and the
> > > copy
> > > that setup to the second (of the set) and make it raid after
> > > system
> > > install?
> > > 
> > > I can't seem to find anything done within the last 2 years
> > > talking about this.
> > > Don't see where it should be difficult but then - - - well I've
> > > thought that before() and had a boat load of male bovine
> > > excrement
> > > to wade through!
> > > (So I'm asking before doing to forestall issues - - - I hope!)
> > 
> > Others have given good information. Unless things have changed
> > since I last did an install (couple of years I think), you can just
> > go into manual disk partitioning and do it from there.
> > Unfortunately, to do an optimum install means getting the
> > calculator out as the defaults are sub-optimal …
> > 
> > AFAIK, all disks these days are 4k sectors, or for SSD, probably
> > bigger. Ideally you want your partitions aligned to these
> > boundaries. So for example, leave sectors (unix 512 byte sectors)
> > 0-63 unused, and start your first partition at sector 64. If you
> > know that your SSD uses (say) 64k blocks internally, then leave
> > sectors 0-127 unused and start the first partition at sector 128.
> > From memory the partitioning tool in the installer doesn’t do this
> > alignment unless you manually calculate all your partition start &
> > end blocks.
> > Everything will work fine if things are not aligned, but
> > performance will be sub-optimal in some situations.
> 
> 
> OK - - - finally have a working system - - - -lots of joys - - -
> first
> a dead psu then
> a cabling issue (the usb3.0 front panel connector on the mobo has a
> specific
> installation orientation) and then the mob said there was room for 8
> SATA drives
> and 2 M2 drives - - - well when you use the M2 slots you lose a SATA
> drive for
> each - - - lots of joys and time wasted - - - if only these gotchas
> were easier to find!!!
> 
> Now I come to the install.
> 
> First attempt
> set up 2 raid 1s
> except now I can't partition the drives
> second attempt
> set up 2 drives with some spacer partitions (4.0 MB each) and some 8
> partitions
> set up 2 drives with same spacer partitions and a large /home
> partition
> then wanted to make 2 raid arrays
> - - - - except I'm only allowed to use 2 partitions  - - - -  one
> from
> each member
>    of the array.
>    (There was also complaining that there were 2 /root partitions
> before I tried to
>     create the array.)
> 
> Neither of these options is what I want.
> (This is only some couple hours down the drain - - - argh)
> 
> So - - - how do I achieve 2 raid 1 arrays?
> #1 has partitions for /efi, /boot, /root/, swap, /tmp, /var, /usr,
> /usr/local
>    with a spacer of 4.0 MB between (and before the first and after
> each)
> #2 has a partition for /home
>    with a spacer of 4.0 MB between (and before the first and after)
> 
> The destructions that I have been able to find are - - - - well - - -
> -
> they're mostly talking about using LVM - - - - which I have not ever
> used.
> 
> So - - - please - - - - what do I do besides abandon my idea?
> 
> (There must be some kind of mystery step someplace - - - 
> and I can't find it)
> 
OK, this is based on what I've done myself.

In the past I created multiple RAID1 partitions on the same disc pair
for /, /home and swap. So /dev/md0 was /, /dev/md1 was /home and
/dev/md2 was swap.

More recently I changed this to 3 LVM2 partitions in a single LVM2
physical partition/logical volume. 

In principle the logical partition could span a number of physical
partitions on one or more disk.

I assume that you've created two RAID1 arrays on 2 pair of disks. 
Lets say they are named /dev/md0 and /dev/md1.

Then let dev/md1 be for /home. Just create a partition on /dev/md1 for
/home.

On the other, dev/md0 you want to put the rest of your partitions. 
I find the number of separate partitions you want to create somewhat
excessive but I would strongly recommend you set these up using LVM2,
as this will mean that you can dynamically resize them if you find the
initial sizes you have created become too small or excessively large at
some future date.

To do this you need to create a LVM2 physical partition on your
/dev/md0, which you can then put a LVM2 logical volume and then I 

Re: [DNG] install on a raid 1 array

2022-06-22 Thread o1bigtenor via Dng
On Sat, Jun 4, 2022 at 3:03 PM Simon  wrote:
>
> o1bigtenor via Dng  wrote:
>
> > I have not ever installed like this so first the configuration.
> >
> > Ryzen 7 3800X
> > Asus TUF Gaming X570-Pro   mobo
> > 64 GB ram
> > 2 - 1 TB M2 drives
> > 2 - 1 TB SSDs
> >
> > I want to set the system up so that the drives are 2 sets of Raid-1 with
> > (proposed)
> > set 1
> > /efi, /boot, /, /usr, /usr/local, /var, swap
> > set 2
> > /home
> >
> > How do I set up the raid arrays?
> > Are they set up first and then the system is installed?
> > Or do I set up what I want on one of each of the sets and the copy
> > that setup to the second (of the set) and make it raid after system
> > install?
> >
> > I can't seem to find anything done within the last 2 years talking about 
> > this.
> > Don't see where it should be difficult but then - - - well I've
> > thought that before() and had a boat load of male bovine excrement
> > to wade through!
> > (So I'm asking before doing to forestall issues - - - I hope!)
>
> Others have given good information. Unless things have changed since I last 
> did an install (couple of years I think), you can just go into manual disk 
> partitioning and do it from there. Unfortunately, to do an optimum install 
> means getting the calculator out as the defaults are sub-optimal …
>
> AFAIK, all disks these days are 4k sectors, or for SSD, probably bigger. 
> Ideally you want your partitions aligned to these boundaries. So for example, 
> leave sectors (unix 512 byte sectors) 0-63 unused, and start your first 
> partition at sector 64. If you know that your SSD uses (say) 64k blocks 
> internally, then leave sectors 0-127 unused and start the first partition at 
> sector 128. From memory the partitioning tool in the installer doesn’t do 
> this alignment unless you manually calculate all your partition start & end 
> blocks.
> Everything will work fine if things are not aligned, but performance will be 
> sub-optimal in some situations.


OK - - - finally have a working system - - - -lots of joys - - - first
a dead psu then
a cabling issue (the usb3.0 front panel connector on the mobo has a specific
installation orientation) and then the mob said there was room for 8 SATA drives
and 2 M2 drives - - - well when you use the M2 slots you lose a SATA drive for
each - - - lots of joys and time wasted - - - if only these gotchas
were easier to find!!!

Now I come to the install.

First attempt
set up 2 raid 1s
except now I can't partition the drives
second attempt
set up 2 drives with some spacer partitions (4.0 MB each) and some 8 partitions
set up 2 drives with same spacer partitions and a large /home partition
then wanted to make 2 raid arrays
- - - - except I'm only allowed to use 2 partitions  - - - -  one from
each member
   of the array.
   (There was also complaining that there were 2 /root partitions
before I tried to
create the array.)

Neither of these options is what I want.
(This is only some couple hours down the drain - - - argh)

So - - - how do I achieve 2 raid 1 arrays?
#1 has partitions for /efi, /boot, /root/, swap, /tmp, /var, /usr, /usr/local
   with a spacer of 4.0 MB between (and before the first and after each)
#2 has a partition for /home
   with a spacer of 4.0 MB between (and before the first and after)

The destructions that I have been able to find are - - - - well - - - -
they're mostly talking about using LVM - - - - which I have not ever used.

So - - - please - - - - what do I do besides abandon my idea?

(There must be some kind of mystery step someplace - - - and I can't
find it)

TIA
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] install on a raid 1 array

2022-06-04 Thread Simon
o1bigtenor via Dng  wrote:

> I have not ever installed like this so first the configuration.
> 
> Ryzen 7 3800X
> Asus TUF Gaming X570-Pro   mobo
> 64 GB ram
> 2 - 1 TB M2 drives
> 2 - 1 TB SSDs
> 
> I want to set the system up so that the drives are 2 sets of Raid-1 with
> (proposed)
> set 1
> /efi, /boot, /, /usr, /usr/local, /var, swap
> set 2
> /home
> 
> How do I set up the raid arrays?
> Are they set up first and then the system is installed?
> Or do I set up what I want on one of each of the sets and the copy
> that setup to the second (of the set) and make it raid after system
> install?
> 
> I can't seem to find anything done within the last 2 years talking about this.
> Don't see where it should be difficult but then - - - well I've
> thought that before() and had a boat load of male bovine excrement
> to wade through!
> (So I'm asking before doing to forestall issues - - - I hope!)

Others have given good information. Unless things have changed since I last did 
an install (couple of years I think), you can just go into manual disk 
partitioning and do it from there. Unfortunately, to do an optimum install 
means getting the calculator out as the defaults are sub-optimal …

AFAIK, all disks these days are 4k sectors, or for SSD, probably bigger. 
Ideally you want your partitions aligned to these boundaries. So for example, 
leave sectors (unix 512 byte sectors) 0-63 unused, and start your first 
partition at sector 64. If you know that your SSD uses (say) 64k blocks 
internally, then leave sectors 0-127 unused and start the first partition at 
sector 128. From memory the partitioning tool in the installer doesn’t do this 
alignment unless you manually calculate all your partition start & end blocks.
Everything will work fine if things are not aligned, but performance will be 
sub-optimal in some situations.


My personal “recipe”, which contains a number of hangovers from “before it all 
‘just worked’” is :
* I partition each disk with a small /boot partition, which I then put into a 
RAID-1 using the old scheme. These days it’s not required as GRUB understands 
LVM and madam RAID - but going back quite a while now, that wasn’t the case, so 
using the old format for RAID made each member appear the same (as long as you 
only use it read-only as GRUB does during boot). The separate /boot was another 
hang over from even longer ago when there was a restriction in BIOS reading 
past a certain size of disk - so you had to have a /boot to ensure that all the 
files needed by LILO were readable by BIOS.
Old habits die hard !
But, a /boot plus initrd means that you have some basic tools available should 
your root filesystemm, or the raid or LVM it’s on, get into trouble.

After finishing the install (or transfer if I’m migrating/duplicating a 
system), I then do a “grub install /dev/sdx” for each disk in the raid set (I 
once had 5 !) which means the system can boot from any disk.


Here’s where I do different things depending on setup. I don’t have many 
bare-metal installs, more VMs. And it’s one of those areas where you trade off 
different pros and cons.


* Swap
You can create this on it’s own partition(s), or on a raid array on it’s own 
partitions, or dish it out with LVM.
With 2 disks, you can create a partition on each and use both of them as native 
swap. This is optimal in terms of disk space and performance - but if a disk 
falls over then there’s a risk that your system will too if it’s used swap on 
that disk AND it needs to swap it back in. Or you can RAID-1 the partitions 
which makes you safe against disk failure, but create overhead (need to write 
to both disks when swapping) and use more physical disk space. In both cases, 
you can’t easily change the swap size - you can add an LVM volume to increase 
it, you can’t reduce is reclaim and meaningful disk space.
Or just create an LV in LVM and use that - it’s the most flexible but adds the 
most software layers between system and disks.
Ideally your systems will rarely swap, and if they do they will just swap out 
very rarely used memory - such a daemon that’s running but not getting called 
on to do anything very often.


* / (root)
On bare-metal machines I have an array (partition on each disk & RAID) just for 
/. Most of my bare-metal machines are hosts for VMs (Xen), so the size needed 
is fairly predictable - I see on one of them it’s only 2G, and less than 50% 
used.
Because / isn’t written to a lot, this makes it quite robust against various 
issues that can arise, and makes troubleshooting easier. If you root filesystem 
is on LVM, and your LVM breaks, then you’re in a world of pain to fix it - or 
boot from some sort of recovery disk.

On VMs I generally just use LVM LVs for everything since it’s easy to mount 
filesystems on the host for maintenance.


* Then I typically create a partition for the rest of the disk - less a bit - 
RAID it and use it as an LVM PV. Note the “less a bit”.
If you have a raid array and a 

Re: [DNG] install on a raid 1 array

2022-06-02 Thread tito via Dng
On Wed, 1 Jun 2022 17:16:05 -0500
o1bigtenor via Dng  wrote:

> On Wed, Jun 1, 2022 at 4:57 PM tito via Dng  wrote:
> >
> > On Wed, 1 Jun 2022 16:34:21 -0500
> > o1bigtenor via Dng  wrote:
> >
> > > Greetings
> > >
> > > When the parts get here I'm going to be installing Devuan testing on
> > > the system.
> > >
> > > I have not ever installed like this so first the configuration.
> > >
> > > Ryzen 7 3800X
> > > Asus TUF Gaming X570-Pro   mobo
> > > 64 GB ram
> > > 2 - 1 TB M2 drives
> > > 2 - 1 TB SSDs
> > >
> > > I want to set the system up so that the drives are 2 sets of Raid-1 with
> > > (proposed)
> > > set 1
> > > /efi, /boot, /, /usr, /usr/local, /var, swap
> > > set 2
> > > /home
> > >
> > > How do I set up the raid arrays?
> >
> > They could be easily setup during installation process in the disk 
> > partitioning step if I recall
> > it correctly. See https://wiki.debian.org/DebianInstaller/SoftwareRaidRoot
> > for more info (just the first part).
> 
> Interesting - - - that wiki is current as of 2012.
> That's why I wasn't trusting the information - - - - the newest stuff
> I could find was
> some 3 or 4 years old and I've found that newer stuff has different
> gotchas than
> the older versions.
> 
> The assumption is that LLVM is used on top of the array. (from the wiki)
> Is that necessary?
> (I've never used LLVM to date!)

 No.

> 
> My idea was to partition the disks just like normal after the array was built.
> Is that possible?

Yes.
 
> TIA
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] install on a raid 1 array

2022-06-01 Thread Adrian Zaugg
Hi TIA

In der Nachricht vom Thursday, 2 June 2022 00:16:05 CEST steht:
> My idea was to partition the disks just like normal after the array was
> built. Is that possible?

Yes, it's possible: You may set up a partionable md array. The installer does 
not offer partionable arrays, it just offers arrays of partions. Partionable 
arrays are built over the whole device and then the md device is partionned. 
With this, if a disk fails, you can just replace it without cloning the 
partition table fist. See man 8 mdadm  under --auto mdp for a description.

You can boot a live system prior to installing and set up your mdp array. I 
use grml since it has all tools onboard. Then start the installer and install 
Devuan. Your mdp device will appear in the partion manager. Add your partions 
as you like and install. Don't forget to tell your ext4 the correct settings 
for stride and stripe-width using tune2fs afterwards.

I've just tested this in a VM with chimaera and it worked, The Installer 
created DOS disk labels, although I had previously written a GPT disk label to 
the mdp device. The reason might be my KVM doesn't have UEFI Support. I don't 
know if it is possible with GPT/UEFI, which was at times of ascii or jessie 
not working with mdp arrays, if I remember right.

Regards, Adrian.


BTW: I would combine one M2 and one SATA SSD to a RAID1 using the mdadm 
--write-mostly flag for the SATA drives. I like to have a fast /home aswell.

BBTW: Another possibility would be to use btrfs instead of mdadm, which has 
built-in raid functionality.

signature.asc
Description: This is a digitally signed message part.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] install on a raid 1 array

2022-06-01 Thread Hendrik Boom
On Thu, Jun 02, 2022 at 09:26:21AM +1000, onefang wrote:
> On 2022-06-01 19:07:24, Hendrik Boom wrote:
> > On Wed, Jun 01, 2022 at 05:16:05PM -0500, o1bigtenor via Dng wrote:
> > > On Wed, Jun 1, 2022 at 4:57 PM tito via Dng  wrote:
> > > >
> > > > On Wed, 1 Jun 2022 16:34:21 -0500
> > > > o1bigtenor via Dng  wrote:
> > > >
> > > > > Greetings
> > > > >
> > > > > When the parts get here I'm going to be installing Devuan testing on
> > > > > the system.
> > > > >
> > > > > I have not ever installed like this so first the configuration.
> > > > >
> > > > > Ryzen 7 3800X
> > > > > Asus TUF Gaming X570-Pro   mobo
> > > > > 64 GB ram
> > > > > 2 - 1 TB M2 drives
> > > > > 2 - 1 TB SSDs
> > > > >
> > > > > I want to set the system up so that the drives are 2 sets of Raid-1 
> > > > > with
> > > > > (proposed)
> > > > > set 1
> > > > > /efi, /boot, /, /usr, /usr/local, /var, swap
> 
> From memory /efi has to be read by the BIOS / UEFI, and has to be a FAT
> partition.  It later gets mounted to /boot/efi.
> 
> > > > > set 2
> > > > > /home
> > > > >
> > > > > How do I set up the raid arrays?
> > > >
> > > > They could be easily setup during installation process in the disk 
> > > > partitioning step if I recall
> > > > it correctly. See 
> > > > https://wiki.debian.org/DebianInstaller/SoftwareRaidRoot
> > > > for more info (just the first part).
> > > 
> > > Interesting - - - that wiki is current as of 2012.
> > > That's why I wasn't trusting the information - - - - the newest stuff
> > > I could find was
> > > some 3 or 4 years old and I've found that newer stuff has different
> > > gotchas than
> > > the older versions.
> > > 
> > > The assumption is that LLVM is used on top of the array. (from the wiki)
> > > Is that necessary?
> > > (I've never used LLVM to date!)
> > > 
> > > My idea was to partition the disks just like normal after the array was 
> > > built.
> > > Is that possible?
> > 
> > Yes, it is possible.  I use LVM over RAID on my system because it offers 
> > more flexibility if I have to repartition.
> > 
> > In fact, I have two separate RAID 1's -- one for partitions that are 
> > divided up the traditional way, and the other for partitions that are done 
> > with LVM.
> > 
> > /boot is on the traditionally divided RAID.  Back when I set it up, if 
> > /boot was on a RAID it had to be a RAID of the old format, not the new.  I 
> > don't know if that still applies.
> > 
> > And, LVM is the Logical Vomume Manager.  LLVM is the Low Level Virtual 
> > Machine, used by some compilers (such as clang) in generating object code.
> > 
> > -- hendrik
> 
> Note that you can use mdadm, or LVM on top of mdadm.  I stick with mdadm
> RAID on my server coz I don't need the extra flexibility, and it's less
> complex.

mdadm is what I use for my RAIDs too,

One has LVM on it; the other a normal partition.

And I have another tiny partition on each disk, outside the RAID, in which i 
have a file whose name is the same as the label I've taped to the physical 
drive.
This saves a lot of confusion when one of my physical drives is failing and I 
have to figure out which physical rive it is.

-- hendrik

> 
> -- 
> A big old stinking pile of genius that no one wants
> coz there are too many silver coated monkeys in the world.
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] install on a raid 1 array

2022-06-01 Thread onefang
On 2022-06-01 19:07:24, Hendrik Boom wrote:
> On Wed, Jun 01, 2022 at 05:16:05PM -0500, o1bigtenor via Dng wrote:
> > On Wed, Jun 1, 2022 at 4:57 PM tito via Dng  wrote:
> > >
> > > On Wed, 1 Jun 2022 16:34:21 -0500
> > > o1bigtenor via Dng  wrote:
> > >
> > > > Greetings
> > > >
> > > > When the parts get here I'm going to be installing Devuan testing on
> > > > the system.
> > > >
> > > > I have not ever installed like this so first the configuration.
> > > >
> > > > Ryzen 7 3800X
> > > > Asus TUF Gaming X570-Pro   mobo
> > > > 64 GB ram
> > > > 2 - 1 TB M2 drives
> > > > 2 - 1 TB SSDs
> > > >
> > > > I want to set the system up so that the drives are 2 sets of Raid-1 with
> > > > (proposed)
> > > > set 1
> > > > /efi, /boot, /, /usr, /usr/local, /var, swap

From memory /efi has to be read by the BIOS / UEFI, and has to be a FAT
partition.  It later gets mounted to /boot/efi.

> > > > set 2
> > > > /home
> > > >
> > > > How do I set up the raid arrays?
> > >
> > > They could be easily setup during installation process in the disk 
> > > partitioning step if I recall
> > > it correctly. See https://wiki.debian.org/DebianInstaller/SoftwareRaidRoot
> > > for more info (just the first part).
> > 
> > Interesting - - - that wiki is current as of 2012.
> > That's why I wasn't trusting the information - - - - the newest stuff
> > I could find was
> > some 3 or 4 years old and I've found that newer stuff has different
> > gotchas than
> > the older versions.
> > 
> > The assumption is that LLVM is used on top of the array. (from the wiki)
> > Is that necessary?
> > (I've never used LLVM to date!)
> > 
> > My idea was to partition the disks just like normal after the array was 
> > built.
> > Is that possible?
> 
> Yes, it is possible.  I use LVM over RAID on my system because it offers more 
> flexibility if I have to repartition.
> 
> In fact, I have two separate RAID 1's -- one for partitions that are divided 
> up the traditional way, and the other for partitions that are done with LVM.
> 
> /boot is on the traditionally divided RAID.  Back when I set it up, if /boot 
> was on a RAID it had to be a RAID of the old format, not the new.  I don't 
> know if that still applies.
> 
> And, LVM is the Logical Vomume Manager.  LLVM is the Low Level Virtual 
> Machine, used by some compilers (such as clang) in generating object code.
> 
> -- hendrik

Note that you can use mdadm, or LVM on top of mdadm.  I stick with mdadm
RAID on my server coz I don't need the extra flexibility, and it's less
complex.

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] install on a raid 1 array

2022-06-01 Thread Hendrik Boom
On Wed, Jun 01, 2022 at 05:16:05PM -0500, o1bigtenor via Dng wrote:
> On Wed, Jun 1, 2022 at 4:57 PM tito via Dng  wrote:
> >
> > On Wed, 1 Jun 2022 16:34:21 -0500
> > o1bigtenor via Dng  wrote:
> >
> > > Greetings
> > >
> > > When the parts get here I'm going to be installing Devuan testing on
> > > the system.
> > >
> > > I have not ever installed like this so first the configuration.
> > >
> > > Ryzen 7 3800X
> > > Asus TUF Gaming X570-Pro   mobo
> > > 64 GB ram
> > > 2 - 1 TB M2 drives
> > > 2 - 1 TB SSDs
> > >
> > > I want to set the system up so that the drives are 2 sets of Raid-1 with
> > > (proposed)
> > > set 1
> > > /efi, /boot, /, /usr, /usr/local, /var, swap
> > > set 2
> > > /home
> > >
> > > How do I set up the raid arrays?
> >
> > They could be easily setup during installation process in the disk 
> > partitioning step if I recall
> > it correctly. See https://wiki.debian.org/DebianInstaller/SoftwareRaidRoot
> > for more info (just the first part).
> 
> Interesting - - - that wiki is current as of 2012.
> That's why I wasn't trusting the information - - - - the newest stuff
> I could find was
> some 3 or 4 years old and I've found that newer stuff has different
> gotchas than
> the older versions.
> 
> The assumption is that LLVM is used on top of the array. (from the wiki)
> Is that necessary?
> (I've never used LLVM to date!)
> 
> My idea was to partition the disks just like normal after the array was built.
> Is that possible?

Yes, it is possible.  I use LVM over RAID on my system because it offers more 
flexibility if I have to repartition.

In fact, I have two separate RAID 1's -- one for partitions that are divided up 
the traditional way, and the other for partitions that are done with LVM.

/boot is on the traditionally divided RAID.  Back when I set it up, if /boot 
was on a RAID it had to be a RAID of the old format, not the new.  I don't know 
if that still applies.

And, LVM is the Logical Vomume Manager.  LLVM is the Low Level Virtual Machine, 
used by some compilers (such as clang) in generating object code.

-- hendrik
> 
> TIA
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] install on a raid 1 array

2022-06-01 Thread Marjorie Roome via Dng
Hi,

On Wed, 2022-06-01 at 17:16 -0500, o1bigtenor via Dng wrote:
> On Wed, Jun 1, 2022 at 4:57 PM tito via Dng 
> wrote:
> > 
> > On Wed, 1 Jun 2022 16:34:21 -0500
> > o1bigtenor via Dng  wrote:
> > 
> > > Greetings
> > > 
> > > When the parts get here I'm going to be installing Devuan testing
> > > on
> > > the system.
> > > 
> > > I have not ever installed like this so first the configuration.
> > > 
> > > Ryzen 7 3800X
> > > Asus TUF Gaming X570-Pro   mobo
> > > 64 GB ram
> > > 2 - 1 TB M2 drives
> > > 2 - 1 TB SSDs
> > > 
> > > I want to set the system up so that the drives are 2 sets of
> > > Raid-1 with
> > > (proposed)
> > > set 1
> > > /efi, /boot, /, /usr, /usr/local, /var, swap
> > > set 2
> > > /home
> > > 
> > > How do I set up the raid arrays?
> > 
> > They could be easily setup during installation process in the disk
> > partitioning step if I recall
> > it correctly. See
> > https://wiki.debian.org/DebianInstaller/SoftwareRaidRoot
> > for more info (just the first part).
> 
> Interesting - - - that wiki is current as of 2012.
> That's why I wasn't trusting the information - - - - the newest stuff
> I could find was
> some 3 or 4 years old and I've found that newer stuff has different
> gotchas than
> the older versions.
> 
> The assumption is that LLVM is used on top of the array. (from the
> wiki)
> Is that necessary?
> (I've never used LLVM to date!)
> 
> My idea was to partition the disks just like normal after the array
> was built.
> Is that possible?
> 
I recently rebuilt my principal Devuan instance as a LVM2 on top of a
mdadm RAID1 array. 

Previously I had three mdadm RAID1 arrays md0 (/ root), md1 (/home) and
md2 Swap) on the two disks.

I now have 1 mdadm RAID array with a LVM physical partition containing
a logical volume group with / root /home and swap partitions in it. The
advantage of LVM is that I can resize the partitions easily and I can
also schedule backups from LVM snapshots, effectively off a consistent
version of the live system.

I also backed up the original / root and /home partitions and restored
then to their new homes. The UUIDs hadn't even changed though obviously
their location had (so fstab was OK). I chrooted into the new root to
run update-grub and grub-install.

Anyway as you can see you can do it either way I did it or you could,
as you suggest, just have a normal set of partitions on your new RAID1
disk.

NB. When I set up my original layout I did that as a new install using
the Devuan installer in expert mode (this was soe years ago), albeit I
then found the partitioning stage somewhat confusing as you have to
first create identical linux-raid members on the two disks first and
then assemble them into a raid array.

-- 
Marjorie




___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] install on a raid 1 array

2022-06-01 Thread o1bigtenor via Dng
On Wed, Jun 1, 2022 at 4:57 PM tito via Dng  wrote:
>
> On Wed, 1 Jun 2022 16:34:21 -0500
> o1bigtenor via Dng  wrote:
>
> > Greetings
> >
> > When the parts get here I'm going to be installing Devuan testing on
> > the system.
> >
> > I have not ever installed like this so first the configuration.
> >
> > Ryzen 7 3800X
> > Asus TUF Gaming X570-Pro   mobo
> > 64 GB ram
> > 2 - 1 TB M2 drives
> > 2 - 1 TB SSDs
> >
> > I want to set the system up so that the drives are 2 sets of Raid-1 with
> > (proposed)
> > set 1
> > /efi, /boot, /, /usr, /usr/local, /var, swap
> > set 2
> > /home
> >
> > How do I set up the raid arrays?
>
> They could be easily setup during installation process in the disk 
> partitioning step if I recall
> it correctly. See https://wiki.debian.org/DebianInstaller/SoftwareRaidRoot
> for more info (just the first part).

Interesting - - - that wiki is current as of 2012.
That's why I wasn't trusting the information - - - - the newest stuff
I could find was
some 3 or 4 years old and I've found that newer stuff has different
gotchas than
the older versions.

The assumption is that LLVM is used on top of the array. (from the wiki)
Is that necessary?
(I've never used LLVM to date!)

My idea was to partition the disks just like normal after the array was built.
Is that possible?

TIA
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] install on a raid 1 array

2022-06-01 Thread tito via Dng
On Wed, 1 Jun 2022 16:34:21 -0500
o1bigtenor via Dng  wrote:

> Greetings
> 
> When the parts get here I'm going to be installing Devuan testing on
> the system.
> 
> I have not ever installed like this so first the configuration.
> 
> Ryzen 7 3800X
> Asus TUF Gaming X570-Pro   mobo
> 64 GB ram
> 2 - 1 TB M2 drives
> 2 - 1 TB SSDs
> 
> I want to set the system up so that the drives are 2 sets of Raid-1 with
> (proposed)
> set 1
> /efi, /boot, /, /usr, /usr/local, /var, swap
> set 2
> /home
> 
> How do I set up the raid arrays?

They could be easily setup during installation process in the disk partitioning 
step if I recall
it correctly. See https://wiki.debian.org/DebianInstaller/SoftwareRaidRoot
for more info (just the first part).

> Are they set up first and then the system is installed?

Yes, in the installer.

> Or do I set up what I want on one of each of the sets and the copy
> that setup to the second (of the set) and make it raid after system
> install?

No.
 
> I can't seem to find anything done within the last 2 years talking about this.
> Don't see where it should be difficult but then - - - well I've
> thought that before() and had a boat load of male bovine excrement
> to wade through!
> (So I'm asking before doing to forestall issues - - - I hope!)
> 
> TIA
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] install on a raid 1 array

2022-06-01 Thread o1bigtenor via Dng
Greetings

When the parts get here I'm going to be installing Devuan testing on
the system.

I have not ever installed like this so first the configuration.

Ryzen 7 3800X
Asus TUF Gaming X570-Pro   mobo
64 GB ram
2 - 1 TB M2 drives
2 - 1 TB SSDs

I want to set the system up so that the drives are 2 sets of Raid-1 with
(proposed)
set 1
/efi, /boot, /, /usr, /usr/local, /var, swap
set 2
/home

How do I set up the raid arrays?
Are they set up first and then the system is installed?
Or do I set up what I want on one of each of the sets and the copy
that setup to the second (of the set) and make it raid after system
install?

I can't seem to find anything done within the last 2 years talking about this.
Don't see where it should be difficult but then - - - well I've
thought that before() and had a boat load of male bovine excrement
to wade through!
(So I'm asking before doing to forestall issues - - - I hope!)

TIA
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng