Mounted home directory on RAID has lost all users and Profiles

Hi,

I am facing 1 major issue with NS7. I have installed NS os on NVMe disk and attached 2 more HDD disks. I have configured software RAID 1 with Both HDD and mounted on /var/lib/nethserver/home directory on /dev/md0 device.
df -Th - OUTPUT
/dev/mapper/VolGroup-lv_root xfs 224G 4.3G 220G 2% /
/dev/nvme0n1p2 xfs 1014M 195M 820M 20% /boot
/dev/nvme0n1p1 vfat 200M 12M 189M 6% /boot/efi
/dev/md0 xfs 1.4T 33M 1.4T 1% /var/lib/nethserver/home

Issue - When i am creating any user via GUI, its not creating user’s home directory and user profile. Even /home and /var/lib/nethserver/home is empty folder and all related system users and etc is missing.
So Kindly help me out where i am lacking to this config. Prompt Reply would be highly appreciated. Thanks a lot.

Regards
Hitesh D

Please check RAID status.

Hi Mr. Markuz,

Thanks for your prompt reply ! RAID has no error. Please refer output.

[root@mc ~]# mdadm --query /dev/md0
/dev/md0: 1397.13GiB raid1 2 devices, 0 spares. Use mdadm --detail for more detail.
[root@mc ~]# mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Tue Aug 11 19:30:20 2020
Raid Level : raid1
Array Size : 1464999616 (1397.13 GiB 1500.16 GB)
Used Dev Size : 1464999616 (1397.13 GiB 1500.16 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent

 Intent Bitmap : Internal

   Update Time : Mon Oct 12 16:59:24 2020
         State : clean 
Active Devices : 2

Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Consistency Policy : bitmap

          Name : mc.xxxxx.com:0  (local to host mc.xxxxxxx.com)
          UUID : 58b38562:fb558473:2424f479:af4a8d11
        Events : 2468

Number   Major   Minor   RaidDevice State
   0       8        1        0      active sync   /dev/sda1
   1       8       17        1      active sync   /dev/sdb1

Please check content of the dir:

ls -l /var/lib/nethserver/home

[root@mc ~]# ls -l /var/lib/nethserver/home

total 0

[root@mc ~]#
No one directory !! this is the main issue

Did you try remount or reboot?

Yes Many Times !!!

Please try to unmount /var/lib/nethserver/home and check again, maybe it was never mounted correctly and the files are still at /

i have already checked /home as well its also empty !

[root@mc ~]# ls -l /home

total 0

Are you able to create files/folders in /var/lib/nethserver/home ?

What about restore from backup?

Yes, i have created 2 files and successfully created. There has no permission issue. Even i have mounted in FSTAB. its permanently mounted.
There is no backup, newly system has created and few users created only

@Hitesh_Dubey

Hi

On NethServer, the folder /home is usually empty.
Correct would be:
/var/lib/nethserver/home

However, if you’ve mounted anything (like your RAID-Disk) here, you won’t see what’s really in this folder, you’ll only see your empty RAID-Disk…

That’s why, as MrMarkuz said, you should unmount the RAID-DISK

umount /var/lib/nethserver/home

and then check again with eg ls:

ls -l /var/lib/nethserver/home/

There should be something shown now!

My 2 cents
Andy

1 Like

Hi Andy,

Thanks for reply…

i have unmounted and again run following command. But no output .

Screenshot 2020-10-13 at 5.10.57 PM

If you create a user in the GUI, is any folder created here?

If you have eg AD installed and enabled, you should at least have an admin folder here…

Yes on GUI just created new user. But nothing came under this directory. On GUI 3-4 users are present but /home and /var/…/home is empty.

Have a look …

Screenshot 2020-10-13 at 5.19.54 PM

Are you using AD or LDAP?

I am using AD.

Are any errors shown in the logs (eg /var/log/messages) ?

This is the only strange that it has no error.

tail /var/log/messages

Oct 13 13:46:58 mc esmith::event[17802]: Changed password OK

Oct 13 13:46:58 mc esmith::event[17802]: Action: /etc/e-smith/events/password-modify/S30nethserver-dc-password-set SUCCESS [0.554151]

Oct 13 13:46:58 mc esmith::event[17802]: Enabled user ‘newtestuser’

Oct 13 13:46:58 mc esmith::event[17802]: Action: /etc/e-smith/events/password-modify/S40nethserver-dc-user-unlock SUCCESS [0.261902]

Oct 13 13:46:58 mc esmith::event[17802]: Action: /etc/e-smith/events/password-modify/S90password-cleanup SUCCESS [0.026138]

Oct 13 13:46:58 mc esmith::event[17802]: Event: password-modify SUCCESS

Oct 13 13:48:30 mc dbus[1020]: [system] Activating via systemd: service name=‘org.freedesktop.timedate1’ unit=‘dbus-org.freedesktop.timedate1.service’

Oct 13 13:48:30 mc systemd: Starting Time & Date Service…

Oct 13 13:48:30 mc dbus[1020]: [system] Successfully activated service ‘org.freedesktop.timedate1’

Oct 13 13:48:30 mc systemd: Started Time & Date Service.

@Hitesh_Dubey

This looks REALLY strange!
Seems as something is badly screwed up on your setup…

Maybe a good idea, before further setup, to reinstall the whole box!

Your setup is very similiar to several I’ve done in the past, including later on adding in another disk for enlarging the storage.
A Symlink was enough for that.

Never had any such issues like you’re having now!