On Fri, Mar 2, 2018 at 1:25 PM, tech-lists <tech-lists at zyxst.net> wrote:> Hi, > > Importing two zpools after a hd crash, the first pool I imported > auto-loads at boot. But the second one I'm always having to zfs mount > (zpool name) then mount the zfs subdirs. The system was like this: > > ada0 (this had the OS on. It was replaced after it crashed. Not a member > of any zpool, not zfs at all, no root-on-zfs). New > freebsd-11-stable-snapshot was installed to this disk. > > ada1 \ > ada2 -- these made up zpool0, a raidz pool. Each device is a 1TB disk. > ada3 / > > zpool1 - this is striped, one 4TB disk, attached via usb3 > > zpool1/c - this is compressed with lz4 > zpool1/important - this has copies=2 enabled > > I ran zpool import zpool0 and then zpool import zpool1 and both imported > without error. However despite setting the mountpoint for zpool1 as > /zpool1, on reboot I always have to: > > # zfs mount zpool1 > > or I won't see the drive in df -h or mount or zfs mount. > > But I *will* find it at its mountpoint /zpool1. If I do a ls -lah on > that, I can see zpool1/c and zpool1/important as dirs but not in zfs > mount or (normal) mount, nor can I see the other dirs that are not vdevs. > > If I then zfs mount zpool1 I can see all the dirs and vdevs on that disk > off its root, in ls -lah. But I dont see the vdevs in zfs mount. I have > to zfs mount zpool1/c and zfs mount zpool1/important to see the vdevs in > zfs mount. >This doesn't make sense. vdevs have nothing to do with mounting. You see your vdevs by doing "zpool status". What are you expecting to see that you don't?> > Confusingly, I didn't need to and don't have to do any of that for > zpool0. What am I doing wrong/what am I missing? Why is zpool0 > automatically loading but zpool1 is not? Before ada0 (the failed disk) > was replaced, both loaded on boot. >Please post the output of "zfs list -r -o name,mountpoint,canmount,mounted" and also the contents of /etc/fstab. Also, have you set "zfs_enable=YES" in /etc/rc.conf? -Alan
Hi, thanks for looking at this, On 02/03/2018 20:39, Alan Somers wrote:> This doesn't make sense. vdevs have nothing to do with mounting. You see > your vdevs by doing "zpool status". What are you expecting to see that you > don't?sorry, I was confusing terms. I was expecting to see similar to output of zfs list from both zpools instead of just zpool0. (just rebooted the system.) OK here's zpool status: # zpool status pool: zpool1 state: ONLINE scan: scrub repaired 0 in 0h39m with 0 errors on Mon Feb 5 22:55:31 2018 config: NAME STATE READ WRITE CKSUM zpool1 ONLINE 0 0 0 diskid/DISK-NA7DKXXF ONLINE 0 0 0 errors: No known data errors pool: zpool0 state: ONLINE scan: scrub repaired 0 in 3h46m with 0 errors on Thu Mar 1 23:01:29 2018 config: NAME STATE READ WRITE CKSUM zpool0 ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 ada1 ONLINE 0 0 0 ada2 ONLINE 0 0 0 ada3 ONLINE 0 0 0> >> Confusingly, I didn't need to and don't have to do any of that for >> zpool0. What am I doing wrong/what am I missing? Why is zpool0 >> automatically loading but zpool1 is not? Before ada0 (the failed disk) >> was replaced, both loaded on boot. >> > Please post the output of "zfs list -r -o name,mountpoint,canmount,mounted" > and also the contents of /etc/fstab.# zfs list -r -o name,mountpoint,canmount,mounted NAME MOUNTPOINT CANMOUNT MOUNTED zpool1 /zpool1 on no zpool1/compressed /zpool1/compressed on no zpool1/important /zpool1/important on no zpool0 /zpool0 on yes zpool0/home /zpool0/home on yes zpool0/usr /zpool0/usr on yes zpool0/usr/local /zpool0/usr/local on yes zpool0/usr/oldsrc /usr/oldsrc on yes zpool0/usr/ports /usr/ports on yes zpool0/usr/src /usr/src on yes zpool0/vms /zpool0/vms on yes # cat /etc/fstab # Device Mountpoint FStype Options Dump Pass# /dev/ada0s1a / ufs rw 1 1 /dev/ada0s1b none swap sw 0 0 linprocfs /compat/linux/proc linprocfs rw 0 0 tmpfs /compat/linux/dev/shm tmpfs rw,mode=1777 0 0 fdescfs /dev/fd fdescfs rw,late 0 0> Also, have you set "zfs_enable=YES" in /etc/rc.conf?yes. If I run zfs mount -a, everything zfs is mounted as expected. I'm wondering if at bootup, when zfs mount is called (I suppose it must be called from somewhere), whether it needs to specify -a. I would not know the first place to look though. thanks, -- J.