Disappearing files in FreeBSD 13.0-R2

Matthias Fechner idefix at fechner.net
Tue Mar 23 16:37:35 UTC 2021


Am 23.03.2021 um 16:40 schrieb Waitman Gobble:
> What's basic? I've done this many times with UFS systems but maybe the
> first time with ZFS. Maybe creating a pool named "home" mucked things
> up for me. The solution was simply deleting /home, an empty directory.
> After deleting the backup files I decrypted the second drive, imported
> it and it magically showed up on /usr/home where I wanted it. Then I
> made a symlink from /usr/home to /home, just because it's always been
> that way that I remember. When I have time I'll check out that ZFS
> book somebody pointed out.

be very careful here.
If you use the standard configuration and you create a "directory" in 
your pool, zfs automatically mount it based on the configuration of your 
pool.
So if your zroot mounts to / and you create zroot/home it will be 
mounted to /home.

If you want to migrate an old UFS to ZFS make sure you mount your new 
zpool to an alternative root, to not shadow your current data:
zpool create -f -o altroot=/mnt zroot /dev/gpt/... (your disc label)

If you have already a pool you can them import to an alternative root:
zpool import -f -o altroot=/mnt -d /dev/gpt zroot

Replace zroot with your poolname.

Gruß
Matthias

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook




More information about the freebsd-questions mailing list