NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re-transmission: Re: Prepping to install



On 06/09/15 17:36, William A. Mahaffey III wrote:
On 06/09/15 09:00, William A. Mahaffey III wrote:
On 06/09/15 08:56, Martin Husemann wrote:
On Tue, Jun 09, 2015 at 08:50:12AM -0453, William A. Mahaffey III
wrote:
Thanks for the reply. My RAID1 raid[1,2] devices are defined from
16 GiB
partitions of the underlying HDD's, 2 each per raid device. They
are not
intended to be subdivided, AFAIK. Therefore, I'm guessing
/dev/raid[1,2]a, right :-) ?
Not subdivided == use the raw partition, so probably /dev/raid[1,2]d

Martin


Gads, this pilot's all over the sky :-/ ....

Would the eventually/hopefully created RAID10 device be
autoconfigurable during boot ? TIA & thanks again.


Well, a more careful re-read of the raidctl online man page informs me
that a RAID10 is in fact *not* autoconfigurable, so I switched to a
4-device (4 X 16 GiB partitions that I was going to make into a
RAID10) RAID0 for /usr. I also redid the parameters of my RAID5
configuration, which I had chosen poorly/invalidly before, & it's
initializing its parity for about the next 5 hours. I just post this
for anyone who might follow the thread in the future. I'll be off to
disklabel-ing the 3 RAID's tomorrow & (hopefully) installing ....


OK, I'm up to the (try to) install, & hit a minor snag. I prepped my various filesystems closely following the attached notes, posted earlier in this thread & now cleaned up to reflect what I actually did in the last part of the install (as well as I can from memory). In particular, I prepped the root filesystem to be bootable. I then rebooted the box & removed the USB key, hopefully to reboot into an install environment upon reboot. Instead, I get an endless string of messages:

init: can't exec getty (/usr/libexec/getty) for port /dev/console: no such file or directory.


I rebooted again (hit the reset button) & inserted the USB install er back into the USB drive. It was acknowleged during boot, & I have the BIOS set to try to boot from the USB device 1st, then try hard drives next. Nonetheless, it still apparently tries to boot from the HDD's, & returns to that endless string of init messages. More pilot, error, I assume, but how do I get around this ? Any clues appreciated. TIA & have a good one.

--

	William A. Mahaffey III

  ----------------------------------------------------------------------

	"The M1 Garand is without doubt the finest implement of war
	 ever devised by man."
                            -- Gen. George S. Patton Jr.


Creating filesystems

We will go with FFSv2 filesystems. The RAID5 raid was created with 32 sector (16K) per component stripes, so it is important to use a 64k blocksize to avoid writes suffering an expensive read/modify/write cycle, and the other raids will fit a 32k blocksize nicely, so:

onyx# newfs -O2 -b32k raid0a
onyx# newfs -O2 -b32k raid1a
onyx# newfs -O2 -b32k -I dk0 

Installing

Now that we have all these wonderful raid filesystems, it would be nice to have an operating system to use them. (Unless you have the social life of a kumquat in which case just creating them may be goal enough in itself.)

First we mount them - during install we can use "-o async" to maximise the write speed, as at this point we do not have any data we care about in the event of a crash. Once install is complete we'll use "-o log" for data security. Note also the mount_ffs used for dk0 as we have not yet rebooted to "fix" its issue. Mounting /tmp is not strictly needed, but its a nice test:

onyx# mount -o async /dev/raid0a /altroot
onyx# mkdir /altroot/usr ; mount -o async /dev/raid1a /altroot/usr
onyx# mkdir /altroot/home ; mount_ffs -o async /dev/dk0 /altroot/home

 A quick df -to see how much space we have:

onyx# df -h
Filesystem        Size       Used      Avail %Cap Mounted on
/dev/sd0a          14G       6.0G       7.7G  43% /
tmpfs             905M       4.0K       905M   0% /tmp
tmpfs             905M       4.0K       905M   0% /var/tmp
/dev/raid0a        16G       8.0K        37G   0% /altroot
/dev/raid1a        63G       8.0K        37G   0% /altroot/usr
/dev/dk0          2.7T       8.0K       6.7T   0% /altroot/home


Next, extract NetBSD to /altroot - if you've booted from USB key and are happy to use that install as a base then just run

onyx# cd / ; pax -rw -pe -X / /altroot

Alternatively extract a NetBSD release *.tgz files into /altroot

Setup /altroot/etc/fstab - a sample might be:

# /etc/fstab
/dev/raid0a	/		ffs	rw,log	1 1
/dev/raid1a	/usr		ffs	rw,log	1 2
/dev/wd0e	swap		swap	sw	0 0
/dev/wd0e	swap		swap	sw	0 0
/dev/wd1e	swap		swap	sw	0 0
/dev/wd3e	swap		swap	sw	0 0
/dev/wd4e	swap		swap	sw	0 0
/dev/wd5e	swap		swap	sw	0 0
/dev/dk0	/home		ffs	rw,log	1 3
/proc		/proc		procfs	rw
kernfs		/kern		kernfs	rw
ptyfs		/dev/pts	ptyfs	rw

Install boot blocks - we need to do this on *both* wd0 and wd1 so the system can still boot in the event of a single disk failure:

onyx# cd /altroot ; cp usr/mdec/boot .
onyx# installboot /dev/rwd0a usr/mdec/bootxx_ffsv2
onyx# installboot /dev/rwd1a usr/mdec/bootxx_ffsv2

Finally setup raid0 to automatically configure as the root filesystem

onyx# raidctl -A root raid0

... and we're done. Setup apache to serve webdav for your xbmc machines, samba, netatalk, and nfs as required :)



Home | Main Index | Thread Index | Old Index