Personally, I'd just have your encrypted filesystem not listed in /etc/fstab at all, since it can't be mounted without attaching the softraid device manually anyway. Since the password is needed in every case, just attach the softraid device with bioctl and mount the filesystem with mount when needed.

As a matter of hygiene, I like having /etc/rc.shutdown umount "extra" filesystems I may or may have not mounted. You may as well have it umount /decrypted and then de-attach the softraid device.

I don't know if OpenBSD auto-umounts filesystems not listed on fstab during its shutdown sequence. I should try it out.

04-psyche.tot...@icloud.com wrote:
Hi all,

on my main hard drive, I have a partition `p` that I have encrypted in the 
following way:

$bioctl -c C -l sd0p softraid0

-> This created the sd1 pseudo-device, on which I ran the following:

$fdisk -g sd1

$disklabel -E sd1 # created partition i, to take all the space. This is the 
unique partition on this

$newfs sd1a

I then mount this via:

$mount /dev/sd1i /decrypt


I have two questions:

- I don't want to have to unmount /decrypt before I shutdown or restart the 
computer. Does OpenBSD unmount cleanly encrypted volumes when shutting down?

- what should I do with the encrypted sd0p ? Should I remove it from my 
/etc/fstab and not even mount it? Or is it fine to keep it mounted?

Thanks!

Jake

Reply via email to