• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved Dataset lost?

circus78

Active Member

Thanks: 1
Messages: 121

#1
Hi,
I am using FreeBSD 11.1-RELEASE on a Virtualbox virtual machine.
I did some test (basically following this URL).
It seems I have not able to mount /home anymore.
Dataset is still present:

Code:
# zfs list
NAME                 USED  AVAIL  REFER  MOUNTPOINT
storage             27.2M   853M    23K  /storage
storage/home        27.1M   853M  27.1M  /mnt/tmp
zroot                475M  2.40G    88K  /zroot
zroot/ROOT           472M  2.40G    88K  none
zroot/ROOT/default   472M  2.40G   472M  /
zroot/tmp             88K  2.40G    88K  /tmp
zroot/usr            352K  2.40G    88K  /usr
zroot/usr/home        88K  2.40G    88K  /usr/home
zroot/usr/ports       88K  2.40G    88K  /usr/ports
zroot/usr/src         88K  2.40G    88K  /usr/src
zroot/var            608K  2.40G    88K  /var
zroot/var/audit       88K  2.40G    88K  /var/audit
zroot/var/crash       88K  2.40G    88K  /var/crash
zroot/var/log        168K  2.40G   168K  /var/log
zroot/var/mail        88K  2.40G    88K  /var/mail
zroot/var/tmp         88K  2.40G    88K  /var/tmp
This is my zpool history output:

Code:
2018-01-28.12:41:00 zpool create storage mirror ada1 ada2
2018-01-28.12:41:10 zfs create storage/home
2018-01-28.12:41:25 zfs set copies=2 storage/home
2018-01-28.12:41:31 zfs set compression=gzip storage/home
2018-01-28.13:02:34 zfs snapshot storage/home@phil
2018-01-28.13:09:20 zfs rollback storage/home@phil
2018-01-28.13:09:46 zfs destroy storage/home@phil
2018-01-28.19:15:27 zfs set mountpoint=/mnt/tmp storage/home
I tried to mount storage/home to a different path (/mnt/tmp) but it seems empty:

Code:
# ls -l /mnt/tmp
total 0
Any suggestions?
Thank you
 

ShelLuser

Daemon

Thanks: 807
Messages: 2,015

#2
In many cases /usr/home is linked with /home and points to the same location. Try ensuring that something didn't go wrong there. For example: could /home exist as part of the zroot/ROOT/default filesystem? So while you may have thought that you mounted storage you basically used the underlying filesystem?

Also: I would recommend against separating /home and /usr/home.
 

circus78

Active Member

Thanks: 1
Messages: 121

#3
Hi ShelLuser, thank you for your reply.
I was following official tutorial, and I remember I got some error at this stage (see arrow):

Code:
# cp -rp /home/* /storage/home
# rm -rf /home /usr/home <==============
# ln -s /storage/home /home
# ln -s /storage/home /usr/home
Unfortunately, I don't remember which error.

Code:
# file /home
/home: cannot open `/home' (No such file or directory)
[root@bsd ~]# file /usr/home
/usr/home: directory
[root@bsd ~]# zfs set mountpoint=/home storage/home
[root@bsd ~]# file /usr/home
/usr/home: directory
[root@bsd ~]# file /home
/home: directory
[root@bsd ~]# cd /home/
[root@bsd /home]# ls
user1   user2
So, it seems all is ok now.
Frankly, I am bit confused because I strictly followed that guide and I encountered such strange issue.
Maybe I could create another virtual box machine and try again :)

Thank you again