Lost home directory

Hi,
It's weird, my FreeBSD 13.2 lost my home folder.
Could not chdir to home directory /home/xxx: No such file or directory
I did'nt do anything to the system and it just lost.
I'm using ZFS and have FreeBSD pot on it anyway.
 
Is your /home on a separate filesystem that simply isn't mounted?

What does zfs list -o name,canmount,mounted,mountpoint show?
 
I think by default a ZFS install creates a /usr/home dataset and puts home directories there, then creates a symlink to it in root directory so you have
lrwxr-xr-x 1 root wheel 8 Dec 6 2019 home -> usr/home

I've seen a few reports over the years that the symlink doesn't get created so if you try to cd /home/xxx you can't but if you cd /usr/home/xxx you can.

Along with what SirDice asks, what happens if you do
cd ~xxx
 
I think by default a ZFS install creates a /usr/home dataset and puts home directories there
Yep. This is a system I recently reinstalled:
Code:
dice@maelcum:~ % zfs list -r -o name,canmount,mounted,mountpoint zroot
NAME                CANMOUNT  MOUNTED  MOUNTPOINT
zroot               on        yes      /zroot
zroot/ROOT          on        no       none
zroot/ROOT/default  noauto    yes      /
zroot/usr           off       no       /usr
zroot/usr/home      on        yes      /usr/home
zroot/usr/ports     on        yes      /usr/ports
zroot/usr/src       on        yes      /usr/src
zroot/var           off       no       /var
zroot/var/audit     on        yes      /var/audit
zroot/var/crash     on        yes      /var/crash
zroot/var/log       on        yes      /var/log
zroot/var/mail      on        yes      /var/mail
zroot/var/tmp       on        yes      /var/tmp
 
Is your /home on a separate filesystem that simply isn't mounted?

What does zfs list -o name,canmount,mounted,mountpoint show?
I didn't know. It installed by default ZFS FreeBSD 13.2.
It's weird because the PC was running for several months and I didn't change to much.
I just did update by "pkg update" and running some jails by BSDpot.
I just want to know why things changed and I can prevent this in future.
And sorry I was install new FreeBSD 14 then zfs send/recv all my jails to it. It's running well.
Seams the home dataset has its new location:
zroot/home 312K 170G 312K /home
 
Code:
saigon/backups/koala/zroot/tmp                                      200K   372G   200K  /saigon/backups/koala/zroot/tmp
saigon/backups/koala/zroot/usr                                     2.15G   372G    96K  /saigon/backups/koala/zroot/usr
saigon/backups/koala/zroot/usr/home                                1.15G   372G  1.15G  /saigon/backups/koala/zroot/usr/home
saigon/backups/koala/zroot/usr/ports                               1.00G   372G  1.00G  /saigon/backups/koala/zroot/usr/ports
saigon/backups/koala/zroot/usr/src                                   96K   372G    96K  /saigon/backups/koala/zroot/usr/src
saigon/backups/koala/zroot/var                                     2.74M   372G   128K  /saigon/backups/koala/zroot/var
saigon/backups/koala/zroot/var/audit                                 96K   372G    96K  /saigon/backups/koala/zroot/var/audit
saigon/backups/koala/zroot/var/crash                                100K   372G   100K  /saigon/backups/koala/zroot/var/crash
saigon/backups/koala/zroot/var/log                                 2.21M   372G  2.21M  /saigon/backups/koala/zroot/var/log
saigon/backups/koala/zroot/var/mail                                 120K   372G   120K  /saigon/backups/koala/zroot/var/mail
saigon/backups/koala/zroot/var/tmp                                   96K   372G    96K  /saigon/backups/koala/zroot/var/tmp
Hi thanks for your comments.
This is my zroot backup ZFS. It didn't have /home. Maybe the symlink you told me didn't work.
My system was 13.2 ZFS and latest repos pkg on it.
 
Seams the home dataset has its new location:
And are the files at the new location /home?

In any case, good, that you have a backup.

I think by default a ZFS install creates a /usr/home dataset and puts home directories there, then creates a symlink to it in root directory so you have
lrwxr-xr-x 1 root wheel 8 Dec 6 2019 home -> usr/home

I suspect, the program that create uses makes the link, then it depend on what program he used. But I am
not sure.
 
And are the files at the new location /home?

In any case, good, that you have a backup.



I suspect, the program that create uses makes the link, then it depend on what program he used. But I am
not sure.
Hi, thank for you help.
I think I found something.
I did a remote backup of other machine on this PC and the backup dataset /usr/home has exact the same mount point. So that maybe the cause of the break.
I did zfs send/recv for backup in not correct way @@.
Can fix it by:
Code:
Set property canmount=noauto
 
  • Like
Reactions: mer
OP thanks for the update that's good information. Going by memory, default was always to create a partition for /usr/home (all the way back to UFS) and then a symlink from /usr/home to /home was created.
A lot of people would create the partition and them simply mount it at /home instead of doing the symlink, there was probably a lot of discussion on which was correct, on systems where I've had the user home on separate devices I always mounted them at /home.
 
Back
Top