• Specific mdadm instructions for Gene [WAS Re: new computer arriving soo

    From Andrew M.A. Cater@21:1/5 to gene heskett on Thu Jan 2 17:00:01 2025
    On Tue, Dec 31, 2024 at 06:54:55PM -0500, gene heskett wrote:

    Good question Marc. I'm searching for someone who knows how to combine 4
    ea 4T SSD's into one volume for use with amanda, the lvm docs are somewhat confusing, lacking the context that actually teaches.


    NOTE: This is not guaranteed advice. Armbian is NOT Debian and the version
    name you quote is based on Ubuntu 24.04 LTS.

    This advice is largely taken from Jeff Geerling - who spends a lot of
    time with ARM based single board computers at https://www.jeffgeerling.com/blog/2021/htgwa-create-raid-array-linux-mdadm

    Operating system: Armbian Noble - you don't say whether this is a version
    with a desktop or not. I'm assuming the minimal server version from their website - from 17th November 2024 - 472MB download.

    Assumptions:
    ============

    Assuming you want RAID 10 (from a later reply in this thread) and you're
    going to *just* use one single RAID volume and not also use LVM.
    Assuming also that you're going to format the disks as GPT, use the full
    extent of the disks and format the partition on each one of them as a RAID partition.
    [The alternative is to mark the whole disk as usable by RAID which means that you may need to remember to zero superblocks and so on if/when you re-use
    them elsewhere].

    All commands below are given as sudo commands

    Run the command lsblk to list all the drives on your system.

    sudo lsblk

    Note down the device names of the drives you wish to use.
    For the purposes of the command I give below, I'm assuming they are
    /dev/sda to /dev/sdd and that partitions will be /dev/sda1, sdb1 and so on.

    Jeff uses wipefs to wipe the drives - if they've never had anything on
    them, you may not need to do this.

    He also uses a command called sgdisk to partion the disks - I suspect
    that there are equivalents with parted.

    sudo apt install sgdisk

    sudo sgdisk -n 1:0:0 /dev/sda
    sudo sgdisk -n 1:0:0 /dev/sdb
    sudo sgdisk -n 1:0:0 /dev/sdc
    sudo sgdisk -n 1:0:0 /dev/sdd

    Run lsblk again and you should see /dev/sda1, /dev/sdb1 and so on.

    You may already have mdadm - if not, install it with

    sudo apt install mdadm

    Creating the RAID10 with mdadm
    ==============================

    sudo mdadm --create --verbose /dev/md0 --level=10 --raid-devices=4 /dev/sd[a-d]1

    (This is one line - if it gets reformatted, all the commands with dashes are
    -- double dashes. Similarly in the following commands)

    Verifying the RAID10 exists and is working ==========================================

    sudo mdadm --detail /dev/md0

    Make the array persistent by adding it to /etc/mdadm/mdadm.conf ===============================================================

    sudo mdadm --detail --scan --verbose | sudo tee -a /etc/mdadm/mdadm.conf

    Format the array - this is using "lazy" formatting to avoid long initialisation ===============================================================================

    sudo mkfs.ext4 -m 0 -E lazy_itable_init=0,lazy_journal_init=0 /dev/md0

    Check with lsblk for md0 and mount the array ============================================

    lsblk should show the individual elements of /dev/md0

    Make a mount point and mount the array

    sudo mkdir /mnt/raid0
    sudo mount /dev/md0 /mnt/raid0

    sudo df -h should show it

    Add it to /etc/fstab
    ====================

    If you don't add the mount to /etc/fstab, it won't be mounted after you reboot!

    $ sudo blkid
    ...
    /dev/md0: UUID="5d3b012c-e5f6-49d1-9014-1c61e982594f" TYPE="ext4"

    Then, edit /etc/fstab (e.g. sudo nano /etc/fstab) and add a line like the following to the end:

    UUID=5d3b012c-e5f6-49d1-9014-1c61e982594f /mnt/raid0 ext4 defaults 0 0

    Save that file and reboot.

    Note: If genfstab is available on your system, use it instead. Much less likely to asplode things:

    sudo genfstab -U /mnt/raid0 >> /etc/fstab.

    banana pi-m5. so far armbian noble has it covered. The only thing I haven't tried on them is linuxcnc as it depends on a specific version of gpio for some of its 50 microsecond IRQ response time.

    I have found another post from a Debian developer whose experience with specifically the BananaPi M-5 was not useful who specifically suggested
    against it and similar SBCs with Amlogic chipsets.

    How are you connecting your SSDs? Via USB3 or via good quality SATA leads and high quality power supply?


    If you find that connection via USB3 doesn't work well for you and that
    the board seems underpowered, you will be completely out on your own again
    I think.


    Hope this helps - all the very best, as ever,
    Andy Cater
    (amacater@debian.org).
    Thanks Andy, Bookmarked FFR.

    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    .
    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    .

    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gene heskett@21:1/5 to Andrew M.A. Cater on Thu Jan 2 23:10:02 2025
    On 1/2/25 10:53, Andrew M.A. Cater wrote:
    On Tue, Dec 31, 2024 at 06:54:55PM -0500, gene heskett wrote:
    Good question Marc. I'm searching for someone who knows how to combine 4
    ea 4T SSD's into one volume for use with amanda, the lvm docs are >>>>>>> somewhat confusing, lacking the context that actually teaches.

    NOTE: This is not guaranteed advice. Armbian is NOT Debian and the version name you quote is based on Ubuntu 24.04 LTS.

    This advice is largely taken from Jeff Geerling - who spends a lot of
    time with ARM based single board computers at https://www.jeffgeerling.com/blog/2021/htgwa-create-raid-array-linux-mdadm

    Operating system: Armbian Noble - you don't say whether this is a version with a desktop or not. I'm assuming the minimal server version from their website - from 17th November 2024 - 472MB download.

    Assumptions:
    ============

    Assuming you want RAID 10 (from a later reply in this thread) and you're going to *just* use one single RAID volume and not also use LVM.
    Assuming also that you're going to format the disks as GPT, use the full extent of the disks and format the partition on each one of them as a RAID partition.
    [The alternative is to mark the whole disk as usable by RAID which means that you may need to remember to zero superblocks and so on if/when you re-use them elsewhere].

    All commands below are given as sudo commands

    Run the command lsblk to list all the drives on your system.

    sudo lsblk

    Note down the device names of the drives you wish to use.
    For the purposes of the command I give below, I'm assuming they are
    /dev/sda to /dev/sdd and that partitions will be /dev/sda1, sdb1 and so on.

    Jeff uses wipefs to wipe the drives - if they've never had anything on
    them, you may not need to do this.

    He also uses a command called sgdisk to partion the disks - I suspect
    that there are equivalents with parted.

    sudo apt install sgdisk
    unforch sgdisk does not appear to be available on armbian. Suitable
    substitute? Display is wayland so X is out. root not allowed.

    sudo sgdisk -n 1:0:0 /dev/sda
    sudo sgdisk -n 1:0:0 /dev/sdb
    sudo sgdisk -n 1:0:0 /dev/sdc
    sudo sgdisk -n 1:0:0 /dev/sdd

    Run lsblk again and you should see /dev/sda1, /dev/sdb1 and so on.

    You may already have mdadm - if not, install it with

    sudo apt install mdadm

    Creating the RAID10 with mdadm
    ==============================

    sudo mdadm --create --verbose /dev/md0 --level=10 --raid-devices=4 /dev/sd[a-d]1

    (This is one line - if it gets reformatted, all the commands with dashes are -- double dashes. Similarly in the following commands)

    Verifying the RAID10 exists and is working ==========================================

    sudo mdadm --detail /dev/md0

    Make the array persistent by adding it to /etc/mdadm/mdadm.conf ===============================================================

    sudo mdadm --detail --scan --verbose | sudo tee -a /etc/mdadm/mdadm.conf

    Format the array - this is using "lazy" formatting to avoid long initialisation
    ===============================================================================

    sudo mkfs.ext4 -m 0 -E lazy_itable_init=0,lazy_journal_init=0 /dev/md0

    Check with lsblk for md0 and mount the array ============================================

    lsblk should show the individual elements of /dev/md0

    Make a mount point and mount the array

    sudo mkdir /mnt/raid0
    sudo mount /dev/md0 /mnt/raid0

    sudo df -h should show it

    Add it to /etc/fstab
    ====================

    If you don't add the mount to /etc/fstab, it won't be mounted after you reboot!

    $ sudo blkid
    ...
    /dev/md0: UUID="5d3b012c-e5f6-49d1-9014-1c61e982594f" TYPE="ext4"

    Then, edit /etc/fstab (e.g. sudo nano /etc/fstab) and add a line like the following to the end:

    UUID=5d3b012c-e5f6-49d1-9014-1c61e982594f /mnt/raid0 ext4 defaults 0 0

    Save that file and reboot.

    Note: If genfstab is available on your system, use it instead. Much less likely to asplode things:

    sudo genfstab -U /mnt/raid0 >> /etc/fstab.

    banana pi-m5. so far armbian noble has it covered. The only thing I haven't >> tried on them is linuxcnc as it depends on a specific version of gpio for
    some of its 50 microsecond IRQ response time.
    I have found another post from a Debian developer whose experience with specifically the BananaPi M-5 was not useful who specifically suggested against it and similar SBCs with Amlogic chipsets.

    How are you connecting your SSDs? Via USB3 or via good quality SATA leads >>> and high quality power supply?

    If you find that connection via USB3 doesn't work well for you and that
    the board seems underpowered, you will be completely out on your own again
    I think.

    Hope this helps - all the very best, as ever,
    Andy Cater
    (amacater@debian.org).
    Thanks Andy, Bookmarked FFR.
    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    .
    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable. >>>> - Louis D. Brandeis

    .
    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    .

    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Thu Jan 2 23:30:02 2025
    Andy Smith (12025-01-02):
    Can you remind us why you do not ask the Armbian folks how to use their operating system instead of us poor uninformed Debian folks?

    But… do we really car?

    It is a staple of online mutual help forums that people who are rude and disparaging or people who post wrong answers will get more help than
    people who just ask politely. It is probably driven by a need to prove
    them wrong and have them publicly admit it. Spoiler: they will not, and
    the only remedy is to not ignore them.

    Regards,

    --
    Nicolas George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to gene heskett on Thu Jan 2 23:20:01 2025
    Hi Gene,

    On Thu, Jan 02, 2025 at 05:01:19PM -0500, gene heskett wrote:
    On 1/2/25 10:53, Andrew M.A. Cater wrote:
    sudo apt install sgdisk
    unforch sgdisk does not appear to be available on armbian.

    Can you remind us why you do not ask the Armbian folks how to use their operating system instead of us poor uninformed Debian folks?

    After all, as you pointed out in [gene-knows-best], 99% of us just
    aren't on your level.

    [gene-knows-bnest]: https://bit.ly/gene-knows-best

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Stone@21:1/5 to Nicolas George on Fri Jan 3 00:10:02 2025
    On Thu, Jan 02, 2025 at 11:24:10PM +0100, Nicolas George wrote:
    But… do we really car?

    We kinda do when one person one person can generate 10% of list traffic
    and drive another 20%, especially if the results of all that traffic is basically nothing positive. (For year after year after year.) If the
    system we're talking about is not a debian system, often modified in unspecified ways, and on esoteric hardware, the normal answers won't
    work. Then a lot of well-meaning people throw in their 2c, much of which
    is either duplicative, outdated, or just wrong (maybe right sometimes
    but wrong in context, maybe just a mistake). Then other people find this
    stuff in a search, and have no idea about the context and no way to sort
    the wheat from the chaff and can't believe how complicated things are
    (when really, they generally aren't). I have seen this play out in this
    very thread, but I don't think anyone has the energy to curate this mess
    and even if they did, how would anyone find it in all the noise?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gene heskett@21:1/5 to Andy Smith on Fri Jan 3 05:00:01 2025
    On 1/2/25 17:16, Andy Smith wrote:
    Hi Gene,

    On Thu, Jan 02, 2025 at 05:01:19PM -0500, gene heskett wrote:
    On 1/2/25 10:53, Andrew M.A. Cater wrote:
    sudo apt install sgdisk
    unforch sgdisk does not appear to be available on armbian.
    Can you remind us why you do not ask the Armbian folks how to use their operating system instead of us poor uninformed Debian folks?

    Igor is busy, often answering his email long after I've solved the
    problem with some else's help. Or figured out a workaround... Pure
    serendipity has put this guy with an 8h grade education in some unusual
    places, like when the navy's trieste went to the bottom of the mohole,
    37k feet deep in the pacific, in Feb 1959, the tv cameras that let them
    see outside, had my fingerprints in them, I was the bench tech that
    assembled them.  Switched to broadcasting in '62.  Spent the rest of my working life as the Chief, often the only engineer/tech in the facility
    at a series of tv stations scattered over the next 40 years. Tech tests
    I've aced cold include that CET after my name.  That's special, 95% of
    the EE's I've hired cannot pass it, but laid on the GM's desk has got me
    every job I've applied for, and job offers I'd never touch for any
    amount of money. OTOH, if I made a mistake, I've owned it. You have all
    seen that too. If you choose to remember.

    Now I'm 90, and fading into the sunset, fighting with a poor short term memory.  My advice to all? Take care of #1.


    After all, as you pointed out in [gene-knows-best], 99% of us just
    aren't on your level.

    [gene-knows-bnest]: https://bit.ly/gene-knows-best

    Thanks,
    Andy

    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gene heskett@21:1/5 to Max Nikulin on Fri Jan 3 05:10:01 2025
    On 1/2/25 21:32, Max Nikulin wrote:
    On 03/01/2025 05:01, gene heskett wrote:
    sudo apt install sgdisk
    unforch sgdisk does not appear to be available on armbian. Suitable
    substitute? Display is wayland so X is out. root not allowed.

    Gene, have you tried to type this command name into a search engine
    prompt?

    no and now yes. no mention of any arm support, looks like a fedora src'd
    thing.

    fdisk, the gpt version can likely do it too. Will take some study. Thank
    you.


    Have you read "man man" to discover search facilities provided by man database? I insist on this particular way with hope that it will help
    to recall these options or commands next time.

    Never execute unknown commands before reading its description.

    .

    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrew M.A. Cater@21:1/5 to gene heskett on Fri Jan 3 12:40:02 2025
    On Thu, Jan 02, 2025 at 05:01:19PM -0500, gene heskett wrote:

    sudo apt install sgdisk

    apt-get install gdisk

    unforch sgdisk does not appear to be available on armbian. Suitable substitute? Display is wayland so X is out. root not allowed.




    Gdisk is the fdisk eqivalent that works with GPT

    It needs to be run as root or with sudo

    sgdisk is then available to you

    All the very best, as ever,

    Andy Cater
    (amacater@debian.org)


    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to gene heskett on Fri Jan 3 14:00:01 2025
    Hello,

    On Thu, Jan 02, 2025 at 10:52:14PM -0500, gene heskett wrote:
    On 1/2/25 17:16, Andy Smith wrote:
    Can you remind us why you do not ask the Armbian folks how to use their operating system instead of us poor uninformed Debian folks?

    Igor is busy, often answering his email long after I've solved the problem with some else's help.

    So you've picked an operating system with just one person who can provide support for it, and then expect us to be able to help you with it even
    though most of us know nothing about it?

    It doesn't seem like a very good choice for you.

    put this guy with an 8h grade education in some unusual places, like when
    the navy's trieste went to the bottom of the mohole, 37k feet deep in the pacific, in Feb 1959, the tv cameras that let them see outside, had my fingerprints in them, I was the bench tech that assembled them.

    Yes, like you said: 99% of us are not capable of dealing with your
    brilliance. Yet you have so many questions for us anyway, so it is a
    mystery to me why you keep having to tell us about how you are so
    brilliant we shouldn't even try to understand.

    if I made a mistake, I've owned it. You have all seen that too. If you
    choose to remember.

    Perhaps that was true during the period of your life before your arrival
    on debian-user, I cannot say. I have a very different recollection of
    numerous occasions here where you have made flat out incorrect
    statements, shown us obviously broken config files, made wild assertions
    that you were unable to back up, and not admitted any personal error in
    any of that. The most we got on most of those were, "I don't remember
    what I did now".

    Regards,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gene heskett@21:1/5 to Andrew M.A. Cater on Fri Jan 3 17:40:01 2025
    On 1/3/25 06:38, Andrew M.A. Cater wrote:
    On Thu, Jan 02, 2025 at 05:01:19PM -0500, gene heskett wrote:
    sudo apt install sgdisk
    apt-get install gdisk
    Thank you, a lot, Andy.
    unforch sgdisk does not appear to be available on armbian. Suitable
    substitute? Display is wayland so X is out. root not allowed.

    Gdisk is the fdisk eqivalent that works with GPT

    It needs to be run as root or with sudo

    sgdisk is then available to you

    All the very best, as ever,

    Andy Cater
    (amacater@debian.org)


    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    .

    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)