Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: installboot fails where upgrading to 5.3 (and 5.2) with softraid RAID 1

4 views
Skip to first unread message

Stefan Sperling

unread,
May 14, 2013, 5:07:01 AM5/14/13
to
On Sun, May 12, 2013 at 05:27:31PM +0200, gian...@neomedia.it wrote:
> I had to go to "/dev" and execute "sh /dev/MAKEDEV" with all the sd0, sd1, sd2, sd3, sd4 (maybe only sd2 was required), and then restart the upgrade script.

That's somewhat expected. The installer doesn't support softraid yet.

Strictly speaking, setups where system partitions (other than /home
or other user data partitions) are hosted on softraid should currently
be considered experimental. Manual intervention is required for such
setups, and that includes creating disk device files that are missing
from the ramdisk.

Perhaps the install script could easily be fixed to create the necessary
device files. But it needs a non-trivial amount of work to support
installing to a softraid volume and also upgrading them (I've tried to
write support for that a while back, it's not very simple). Also, not
many architectures can currently boot from softraid, and I'm not sure
whether all architectures can already host the root filesystem on it.

BTW, I found that on sparc64, the ramdisk is so starved for inodes that
creating device nodes for one or two additional disks will cause problems
while downloading the sets. Fix is to remove unneeded devices from the /dev
directory as well as creating the needed ones.

Federico Giannici

unread,
May 14, 2013, 6:16:57 AM5/14/13
to
Apart from the MAKEDEV of the missing disk devices, the upgrade script
apparently worked correctly in two amd64 PCs with softraid 1 boot. What
other things I have to pay attention to, and what else could go wrong?

I'm asking this because I was thinking to do other amd64 machines with
softraid 1 boot. But maybe it's still better to wait before doing this?

Thanks.

--
___________________________________________________
__
|- gian...@neomedia.it
|ederico Giannici http://www.neomedia.it
___________________________________________________

Stefan Sperling

unread,
May 14, 2013, 8:21:21 AM5/14/13
to
On Tue, May 14, 2013 at 12:16:57PM +0200, Federico Giannici wrote:
> Apart from the MAKEDEV of the missing disk devices, the upgrade
> script apparently worked correctly in two amd64 PCs with softraid 1
> boot.

Yes, I believe that works. installboot will already handle what's
needed so the upgrade script doesn't need any special logic.

> What other things I have to pay attention to, and what else
> could go wrong?

softraid setups other than RAID1 boot might need additional steps,
depending on configuration. Full-disk crypto setups, for instance.

Kenneth R Westerback

unread,
May 14, 2013, 8:39:26 AM5/14/13
to
On Tue, May 14, 2013 at 12:16:57PM +0200, Federico Giannici wrote:
> On 05/14/13 11:07, Stefan Sperling wrote:
> >On Sun, May 12, 2013 at 05:27:31PM +0200, gian...@neomedia.it wrote:
> >>I had to go to "/dev" and execute "sh /dev/MAKEDEV" with all the sd0, sd1, sd2, sd3, sd4 (maybe only sd2 was required), and then restart the upgrade script.
> >
> >That's somewhat expected. The installer doesn't support softraid yet.
> >
> >Strictly speaking, setups where system partitions (other than /home
> >or other user data partitions) are hosted on softraid should currently
> >be considered experimental. Manual intervention is required for such
> >setups, and that includes creating disk device files that are missing
> >from the ramdisk.
> >
> >Perhaps the install script could easily be fixed to create the necessary
> >device files. But it needs a non-trivial amount of work to support
> >installing to a softraid volume and also upgrading them (I've tried to
> >write support for that a while back, it's not very simple). Also, not
> >many architectures can currently boot from softraid, and I'm not sure
> >whether all architectures can already host the root filesystem on it.
> >
> >BTW, I found that on sparc64, the ramdisk is so starved for inodes that
> >creating device nodes for one or two additional disks will cause problems
> >while downloading the sets. Fix is to remove unneeded devices from the /dev
> >directory as well as creating the needed ones.
>
> Apart from the MAKEDEV of the missing disk devices, the upgrade
> script apparently worked correctly in two amd64 PCs with softraid 1
> boot. What other things I have to pay attention to, and what else
> could go wrong?
>
> I'm asking this because I was thinking to do other amd64 machines
> with softraid 1 boot. But maybe it's still better to wait before
> doing this?
>
> Thanks.
>
> --
> ___________________________________________________
> __
> |- gian...@neomedia.it
> |ederico Giannici http://www.neomedia.it
> ___________________________________________________
>

The upgrade process scans fstab and creates the devices needed to
mount any ffs filesystems. So I imagine sd4 would have been created
but constituent devices that don't appear in fstab or have no ffs
filesystems specified will not be created.

In the new RAID world it needs another check. Probably the easiest
is to create all devices up to the highest disk encountered. This
does, as pointed out, have some implications for inode starved
install media on some architectures.

Doing disklabel on all devices and looking for RAID partitions might
be possible too. Which would minimize inode starvation.

Deep thought. Hmmm.

.... Ken

Kenneth R Westerback

unread,
May 14, 2013, 9:31:28 AM5/14/13
to
Something like the (untested) diff below might work.

.... Ken

Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.675
diff -u -p -r1.675 install.sub
--- install.sub 25 Mar 2013 21:35:45 -0000 1.675
+++ install.sub 14 May 2013 13:27:22 -0000
@@ -1725,6 +1725,16 @@ getdevname() {
fi
}

+# Scan disks for RAID partitions and create required devices so
+# they can be assembled if required.
+check_raid() {
+ local _dk
+
+ for _dk; do
+ disklabel $_dk | grep " ^[a-p]: " | grep -wq RAID && makedev $_dk
+ done
+}
+
# Preen all filesystems in /etc/fstab that have a /sbin/fsck_XXX and a
# fs_passno > 0, showing individual results, but skipping $ROOTDEV. This was
# already fsck'ed successfully.
Index: upgrade.sh
===================================================================
RCS file: /cvs/src/distrib/miniroot/upgrade.sh,v
retrieving revision 1.72
diff -u -p -r1.72 upgrade.sh
--- upgrade.sh 21 Apr 2012 10:17:26 -0000 1.72
+++ upgrade.sh 14 May 2013 13:06:01 -0000
@@ -77,6 +77,10 @@ startftplist
# Create fstab for use during upgrade.
munge_fstab

+# Check for disks with RAID partitions and create required devices
+# for assembling them.
+check_raid $(get_dkdevs)
+
# fsck -p non-root filesystems in /etc/fstab.
check_fs

0 new messages