You are not logged in.

#1 2014-01-13 15:42:14

Registered: 2014-01-13
Posts: 1

ZFS mirror on root, one of the two devices appears offline

Hello everybody,

I'm a new Archlinux user. I've managed to install it on a pool (called RAID1) composed of two LUKS encrypted devices (/dev/mapper/HD3 and /dev/mapper/HD10).
This is the pool:

# zpool status
  pool: RAID1
 state: ONLINE
  scan: resilvered 11.4M in 0h0m with 0 errors on Mon Jan 13 07:41:13 2014

	RAID1       ONLINE       0     0     0
	  mirror-0  ONLINE       0     0     0
	    HD10    ONLINE       0     0     0
	    HD3     ONLINE       0     0     0

errors: No known data errors

I wrote a custom hook, run before the zfs hook, which opens a small (5MB) LUKS image (/etc/keys.img) asking for its key, and mounts it under /keys. Then, for each device in /etc/earlycrypttab, it opens the device taking the respective keyfile from /keys.
Here is the code, if it could help debug the problem. Feel free to use it, if it might be useful to you. Sorry if it's not too good.   /etc/earlycrypttab   /usr/lib/initcpio/hooks/customcrypt   /usr/lib/initcpio/install/customcrypt

Now, the problem is this: for some reason, after booting, HD3 is shown as offline and the pool is shown as DEGRADED. /dev/mapper/HD3 is open and working, though. Running a simple

# zpool online RAID1 HD3

fixes the pool.
I know for sure that after the customcrypt hook is run, that LUKS device is open. I've managed to get into ash just after the customcrypt hook, and the LUKS device is open, but

# zpool list

keeps saying that HD3 is offline.

Anyway, if (still inside ash, after the customcrypt hook and before the zfs hook) I run

# zpool export RAID1
# zpool import

zpool finds both devices as online.

I first thought it could be a problem of the /etc/zfs/zpool.cache file. I tried recreating it and recreating the initram (with mkinitcpio -p linux), but still no luck.

Do you have any idea about what could be the problem?

Thank you very much for your time!


#2 2014-01-24 03:29:15

From: Connecticut, USA
Registered: 2014-01-13
Posts: 22

Re: ZFS mirror on root, one of the two devices appears offline

Is zfs configured to automount partitions?


#3 2014-04-07 21:45:06

Registered: 2014-04-07
Posts: 1

Re: ZFS mirror on root, one of the two devices appears offline

@stefa : Did you get any resolution on this?  I ran into the exact same problem two days ago and I can't seem to find the "right" fix.  I'm using a zfs mirror on top of luks and figured it was due to the luks device not being online but after reading your post... I'm not so sure.

Post boot I'm able to offline the missing device and online it without issue.  My only concern is why isn't this coming up with both disks at the time of import and will it boot if the offline drive is the only one of the two active at the time of boot?  I setup the mirror so I could have a drive fail and still boot...

@esko: I've got zfs set to auto-mount and the mount points are all working properly.


Board footer

Powered by FluxBB