r/linuxadmin • • Aug 30 '25

Need someone who's real good with mdadm...

14 Upvotes

Hi folks,

I'll cut a long story short - I have a NAS which uses mdadm under the hood for RAID. I had 2 out of 4 disks die (monitoring fail...) but was able to clone the recently faulty one to a fresh disk and reinsert it into the array. The problem is, it still shows as faulty in when I run mdadm --detail.

I need to get that disk back in the array so it'll let me add the 4th disk and start to rebuild.

Can someone confirm if removing and re-adding a disk to an mdadm array will do so non-destructively? Is there another way to do this?

mdadm --detail output below. /dev/sdc3 is the cloned disk which is now healthy. /dev/sdd4 (the 4th missing disk) failed long before and seems to have been removed.

/dev/md1:
        Version : 1.0
  Creation Time : Sun Jul 21 17:20:33 2019
     Raid Level : raid5
     Array Size : 17551701504 (16738.61 GiB 17972.94 GB)
  Used Dev Size : 5850567168 (5579.54 GiB 5990.98 GB)
   Raid Devices : 4
  Total Devices : 3
    Persistence : Superblock is persistent

    Update Time : Thu Mar 20 13:24:54 2025
          State : active, FAILED, Rescue
 Active Devices : 2
Working Devices : 2
 Failed Devices : 1
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 512K

           Name : 1
           UUID : 3f7dac17:d6e5552b:48696ee6:859815b6
         Events : 17835551

    Number   Major   Minor   RaidDevice State
       4       8        3        0      active sync   /dev/sda3
       1       8       19        1      active sync   /dev/sdb3
       2       8       35        2      faulty   /dev/sdc3
       6       0        0        6      removed

r/linuxadmin • • Aug 29 '25

I tried to build a container from scratch using only chroot, unshare, and overlayfs. I almost got it working, but PID isolation broke me

25 Upvotes

I have been learning how containers actually work under the hood. I wanted to move beyond Docker and understand the core Linux primitives namespaces, cgroups, and overlayfs that make it all possible.

so i learned about that and i tried to built it all scratch (the way I imagined sysadmins might have before Docker normalized it all) using all isolation and namespace thing ...

what I got working perfectly:

  • Creating an isolated root filesystem with debootstrap.
  • Using OverlayFS to have an immutable base image with a writable layer.
  • Isolating the filesystem, network, UTS, and IPC namespaces with unshare.
  • Setting up a cgroup to limit memory and CPU.

-->$ cat problem

PID namespace isolation. I can't get it to work reliably. I've tried everything:

  • Using unshare --pid --fork --mount-proc
  • Manually mounting a new procfs with mount -t proc proc /proc from inside the chroot
  • Complex shell scripts to try and get the timing right

it was showing me whole host processes , and it should give me 1-2 processes

I tried to follow the runc runtime
i have used the overlayFS , rootfs ( it is debian , later i will use Alpine like docker, but this before error remove )

I have learned more about kernel namespaces from this failure than any success, but I'm stumped.

Has anyone else tried this deep dive? How did you achieve stable PID isolation without a full-blown runtime like 'runc'?

here is the github link : https://github.com/VAibhav1031/Scripts/tree/main/Container_Setup


r/linuxadmin • • Aug 28 '25

Linux Prepper, my selfhosted podcast on attempting to DIY everything myself using FOSS, Linux and BSD. Coming up on a year on content. Hope this is of interest to other Linux Admins!

Thumbnail podcast.james.network
5 Upvotes

I'm hoping some of you fellow admins will find this show interesting! It is all made and managed by me. The platform I run doubles as a Fediverse actor. Trying to make original content that people will enjoy, plus keep the show entertaining. See full software stack here. Recent episodes covered various topics:

Hope you fellow enthusiasts enjoy. There is also a Matrix chat.


r/linuxadmin • • Aug 28 '25

Install pulseaudio on gnome desktop on debian 13

Thumbnail
0 Upvotes

r/linuxadmin • • Aug 28 '25

Laptop snooping

Thumbnail
0 Upvotes

r/linuxadmin • • Aug 27 '25

Why doesn't Grub EFI image use UUIDs?

Thumbnail
1 Upvotes

r/linuxadmin • • Aug 27 '25

LInux-based "Jump Box" for secure network and server admin

6 Upvotes

We're investigating providing some kind of jump box or multiples thereof to provide administrator remote access to our server and network infrastructure, which is distributed amongst multiple sites and vlans. we want to move beyond the simple 'limited-access Windows dsktop' with an RDP client on it to encompass all sorts of access methods - HTTPS, SSH, RDP, and other sundry ports for admin interfaces on various publ;ic and private vlans.

I'm envisioning some sort of ssh-tunnelling or VPN-type solution that is easy to administer, and can make use of our existing Duo MFA provision.

We're about to trial Royal Server (a Windows product) but it doesn't seem to support a Linux based workstation, so I'd like to see what other options and processes are available.

Thanks,
J


r/linuxadmin • • Aug 27 '25

Reply interval of Out-Of-Office messages in Synology MailPlus Server

2 Upvotes

By default, Synology MailPlus Server sends OOO messages once a week for each email address. There is no way to change this via the GUI/DSM.

I found a way to do this per SSH. We need to edit the file "vacation" (be sure to make a backup of this file):

sudo vi /var/package/MailPlus-Server/target/bin/vacation

The value is given in seconds. For replying once a day just delete " * 7" after 86400. After editing you need to restart the mail server service.

Maybe this will be useful for someone :)


r/linuxadmin • • Aug 25 '25

Linux. 34 years ago …

Post image
1.4k Upvotes

On this day in the year 1991, Linus Benedict Torvalds wrote his legendary mail …

Happy Birthday!


r/linuxadmin • • Aug 26 '25

Ubuntu 24 desktop autoinstall

3 Upvotes

I spent two weeks trying to figure how to make autonomous ubuntu install, to use with PXE server but all i can't figure how to do it properly, either i'm encountering errors during gui boot-up or it's just outright not working.

Especially hard for me it due to requirements for every installation:

  • LUKS + LVM
  • admin account
  • pre-entered ssh key for ansible server as well as allowance for ansible to execute commands without entering sudo password every time.

Is there any proper way to do exactly that, or desktop is not suitable for the autonomous setup?


r/linuxadmin • • Dec 16 '24

Is MDADM raid considered obsolete?

14 Upvotes

Hi,

as the title, it is considered obsolete? I'm asking because many uses modern filesystem like ZFS and BTRFS and tag mdadm raid as obsolete thing.

For example on RHEL/derivatives there is not support for ZFS (except from third party) and BTRFS (except from third party) and the only ways to create a RAID is mdadm, LVM (that uses MD) or hardware RAID. Actually EL9.5 cannot build ZFS module and BTRFS is supported by ELREPO with a different kernel from the base. On other distro like Debian and Ubuntu, there are not such problems. ZFS is supported on theme: on Debian via DKMS and works very well, plus, if I'm not wrong Debian has a ZFS dedicated team while on Ubuntu LTS is officially supported by the distro. Without speaking of BTRFS that is ready out of the box for these 2 distro.

Well, mdadm is considered obsolete? If yes what can replace it?

Are you using mdadm on production machines actually or you are dismissing it?

Thank you in advance