Sunday 29 September 2024

My Current MDADM Setup

Just some notes on my current MDADM setup, so I do not forget.

So my current hard drives are:

# lsscsi
[0:0:0:0]    disk    ATA      Samsung SSD 860  1B6Q  /dev/sda 
[4:0:0:0]    disk    ATA      WDC WD4003FZEX-0 1A01  /dev/sdb 
[5:0:0:0]    disk    ATA      WDC WD5000AAKS-0 3B01  /dev/sdc 
[5:0:1:0]    disk    ATA      ST2000DM001-1CH1 CC29  /dev/sdd 
[10:0:0:0]   disk    WD       Ext HDD 1021     2021  /dev/sde 
[11:0:0:0]   disk    WD       Ext HDD 1021     2021  /dev/sdf 

The first one is my primary and Operating Systems and all that. Seems obvious.

The second one contains a large partition for my /home on sdb1.

Partition sdc1 of the sdc drive is a simple 500Gb partition containing some odds and ends. Not big enough for the RAID, not fast enough for the operating system.

Starting my raid setup I can do with:

# mdadm --assemble /dev/md127 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdb2 mdadm: /dev/md127 has been started with 4 drives.

Just so you know, it's a simple mirror setup, so I am using 4 drives to mirror a 2 TB partition.

And then I simple mount the damn thing with:

# mount /dev/md127 /mnt/raid/

Then I can watch the status with detail:

mdadm --detail /dev/md127

Tuesday 10 September 2024

ORM Hate

I came upon an article1 of Martin Fowler, regarding ORM, and how a lot of people tend to dislike it?

It makes things a lot clearer for me.

Also because I see now that the CQRS way of working is actually used in our company, where we use JPA/QueryDSL for updating, and SQL/QueryDSL for reading.

References

[1] MartinFowler.com - Orm Hate
https://martinfowler.com/bliki/OrmHate.html