On Thu, May 30, 2024 at 08:17:27PM +0100, 04-psyche.tot...@icloud.com wrote:
> From my reading of /etc/rc, it seems that at shutdown or reboot, the OS will 
> automatically unmount everything.
> 
> So that will unmount my encrypted partition.
> 
> However, it does not run bioctl -d sd* for the pseudo-device.
> 
> So I guess the question become, is it a problem to exit the system without 
> detaching the softraid volume via bioctl?

Don't worry, the reboot code in the kernel makes sure that disks are
properly unmounted and stopped. This includes softraid.
If you want to look then check out vfs_shutdown() and sr_quiesce() in the
source code.
 
> Thanks!
> 
> > 
> > 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
> 

-- 
:wq Claudio

Reply via email to