Hi Xiao.
Thank you for reaching out.
These are the steps I used to create my homed-managed user on MD RAID1 block device:
- I created MD RAID1 block device
/dev/md0
using 2 Micron 5400 1.92TB SATA SSDs:
sudo mdadm -C /dev/md0 --level=raid1 --raid-devices=2 /dev/sdc1 /dev/sdd1
- I configured systemd-homed following this excellent tutorial - Building a new home with systemd-homed on fedora. Important part of this is to configure custom SELinux policies for systemd-homed, as Fedora’s OOTB policies still will not cover what’s required to function homed properly.
- Next, I created my homed-managed user:
sudo homectl create <my user name> --storage=luks --disk-size=500G --fs-type=ext4 --luks-extra-mount-options=defcontext=system_u:object_r:user_home_dir_t:s0 -G wheel --real-name="<real name of my user>" --image-path=/dev/md0
- I rebooted and tried to log in to my new user. GUI login timed out. I found out that the discard took 6-8 minutes to complete by trying to activate my new user via homectl CLI while I’m logged in as old user and analyzing system log.
- My next attempt was to turn discard off:
sudo homectl update <my user name> --luks-offline-discard=0
sudo homectl update <my user name> --luks-discard=0
- Now I could log in normally. But I didn’t like that I had to disable discard.
Please let me know If you need anything else.
Note - I had to drop the idea of using homed-managed user this time and I converted my normal user home dir to simple “home on MD RAID1” without the systemd-homed until homed implementation gets more mature.