Root on ZFS RAIDZ1
iwama at t3.rim.or.jp
iwama at t3.rim.or.jp
Fri May 4 09:15:39 UTC 2018
I want Sun Fire V245 to use FreeBSD-11.1-RELEASE with Root on ZFS RAIDZ1.
The installation procedure of Root on ZFS is as follow page:
https://wiki.freebsd.org/RootOnZFS/VTOC8ZFSBoot/9.x-RELEASE
I finished the installation without any problem, but it was some problems
at reboot.
1) It do not boot at all
2) boot takes a very long time, more than 3 HOURS
3) It takes some time for boot, about 10 minutes
I tried RAIDZ1 with 9.3-RELEASE, RAIDZ2, RAIDZ10 and mirror with
11.1-RELEASE,
the results were as follows, da0-3 are the name of boot disk. (Fire V245 has
four disks):
RAIDZ1(zpool create -o altroot=/mnt -O canmount=off zroot raidz1 da0a da1a
da2a da3a)
da0 da1 da2 da3
11.1-RELEASE NG NG SLOW SLOW
9.3-RELEASE NG NG SLOW SLOW
RAIDZ2(zpool create -o altroot=/mnt -O canmount=off zroot raidz2 da0a da1a
da2a da3a)
da0 da1 da2 da3
11.1-RELEASE SLOW SLOW SLOW SLOW
RAIDZ10(zpool create -o altroot=/mnt -O canmount=off zroot mirror da0a da1a
mirror da2a da3a)
da0 da1 da2 da3
11.1-RELEASE slow slow slow slow
mirror(zpool create -o altroot=/mnt -O canmount=off zroot mirror da0a da1a
da2a da3a)
da0 da1 da2 da3
11.1-RELEASE OK OK OK OK
OK: OK(boot at normal speed), NG: 1), SLOW: 2), slow: 3)
From the above results and the logs below, there is no problem with
mirror, but it is a big
problem in RAIDZ1 or RAIDZ2.
Has anyone been running Root on RAIDZ1 on the sparc64 platform?
Install steps(only the part entered manually):
===
# zpool labelclear -f /dev/da0a
# zpool labelclear -f /dev/da1a
# zpool labelclear -f /dev/da2a
# zpool labelclear -f /dev/da3a
#
# sysctl kern.disks
kern.disks: cd0 da3 da2 da1 da0
# gpart destroy -F da0
da0 destroyed
# gpart destroy -F da1
da1 destroyed
# gpart destroy -F da2
da2 destroyed
# gpart destroy -F da3
da3 destroyed
# gpart create -s VTOC8 da0
da0 created
# gpart create -s VTOC8 da1
da1 created
# gpart create -s VTOC8 da2
da2 created
# gpart create -s VTOC8 da3
da3 created
#
# gpart add -s 270G -t freebsd-zfs da0
da0a added
# gpart add -s 270G -t freebsd-zfs da1
da1a added
# gpart add -s 270G -t freebsd-zfs da2
da2a added
# gpart add -s 270G -t freebsd-zfs da3
da3a added
# gpart add -t freebsd-swap da0
da0b added
# gpart add -t freebsd-swap da1
da1b added
# gpart add -t freebsd-swap da2
da2b added
# gpart add -t freebsd-swap da3
da3b added
#
***The following lines differ depending on the RAID method
# zpool create -o altroot=/mnt -O canmount=off zroot raidz1 da0a da1a da2a
da3a
#
# zpool export zroot
# gpart bootcode -p /boot/zfsboot da0
# gpart bootcode -p /boot/zfsboot da1
# gpart bootcode -p /boot/zfsboot da2
# gpart bootcode -p /boot/zfsboot da3
# sysctl kern.geom.debugflags=0x10
kern.geom.debugflags: 0 -> 16
# dd if=/boot/zfsloader of=/dev/da0a bs=512 oseek=1024 conv=notrunc,sync
466+1 records in
467+0 records out
239104 bytes transferred in 2.845066 secs (84042 bytes/sec)
# dd if=/boot/zfsloader of=/dev/da1a bs=512 oseek=1024 conv=notrunc,sync
466+1 records in
467+0 records out
239104 bytes transferred in 2.832603 secs (84411 bytes/sec)
# dd if=/boot/zfsloader of=/dev/da2a bs=512 oseek=1024 conv=notrunc,sync
466+1 records in
467+0 records out
239104 bytes transferred in 2.815799 secs (84915 bytes/sec)
# dd if=/boot/zfsloader of=/dev/da3a bs=512 oseek=1024 conv=notrunc,sync
466+1 records in
467+0 records out
239104 bytes transferred in 2.828102 secs (84546 bytes/sec)
# zpool import -o altroot=/mnt zroot
#
# zfs set checksum=fletcher4 zroot
# zfs set atime=off zroot
#
# zfs create -o mountpoint=/ zroot/ROOT
#
# zpool set bootfs=zroot/ROOT zroot
#
# cat << EOF > /tmp/bsdinstall_etc/fstab
> # Device Mountpoint FStype Options Dump Pass#
> /dev/da0b none swap sw 0 0
> /dev/da1b none swap sw 0 0
> /dev/da2b none swap sw 0 0
> /dev/da3b none swap sw 0 0
> ^D#
#
# exit
# echo 'zfs_enable="YES"' >> /etc/rc.conf
#
# cat /boot/loader.conf
zfs_load="YES"
***Except for 9.3-RELEASE, since the line of "zfs_load="YES"" is originally
in
***/boot/loader.conf, addition is unnecessary
#
# zpool set cachefile=/boot/zfs/zpool.cache zroot
# exit
***In 11.1-RELEASE, the last "zpool set cachefile=/boot/zfs/zpool.cache
zroot" failed,
shown as "internal error: failed to initialize ZFS library"
===
NOT boot log:
===
{1} ok boot disk0
SC Alert: Host System has Reset
Probing system devices
Probing memory
Probing I/O buses
screen not found.
keyboard not found.
Keyboard not present. Using ttya for input and output.
Probing system devices
Probing memory
Probing I/O buses
Sun Fire V245, No Keyboard
Copyright 2006 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.22.22, 16384 MB memory installed, Serial #XXXXXXXX.
Ethernet address 0:14:4f:XX:XX:XX, Host ID: XXXXXXXX.
Initializing 1MB of memory at addr 137ff0a000
Initializing 1MB of memory at addr 137ff06000
Initializing 1MB of memory at addr 137ff00000
Initializing 1MB of memory at addr 137fee0000
Initializing 1MB of memory at addr 137fe90000
Initializing 1MB of memory at addr 137fdea000
Initializing 14MB of memory at addr 137f000000
Initializing 2032MB of memory at addr 1300000000
Initializing 2048MB of memory at addr 1200000000
Initializing 2048MB of memory at addr 1100000000
Initializing 2048MB of memory at addr 1000000000
Initializing 2048MB of memory at addr 300000000
Initializing 2048MB of memory at addr 200000000
Initializing 2048MB of memory at addr 100000000
Initializing 2048MB of memory at addr 0
Rebooting with command: boot disk0
Boot device: /pci at 1e,600000/pci at 0/pci at a/pci at 0/pci at 8/scsi at 1/disk at 0,0 File
and args:
>> FreeBSD/sparc64 ZFS boot block
Boot path: /pci at 1e,600000/pci at 0/pci at a/pci at 0/pci at 8/scsi at 1/disk at 0,0:a
Consoles: Open Firmware console
ZFS: i/o error - all block copies unavailable
ZFS: can't read MOS object directory
ZFS: can't find root filesystem
FreeBSD/sparc64 ZFS enabled bootstrap loader, Revision 1.0
(Fri Jul 21 08:44:42 UTC 2017 root at releng2.nyi.freebsd.org)
bootpath=""
can't load 'kernel'
Type '?' for a list of commands, 'help' for more detailed help.
OK reboot
Rebooting...
Program terminated
{1} ok
===
VERY SLOW boot log:
===
{1} ok boot disk3
SC Alert: Host System has Reset
Probing system devices
Probing memory
Probing I/O buses
screen not found.
keyboard not found.
Keyboard not present. Using ttya for input and output.
Probing system devices
Probing memory
Probing I/O buses
Sun Fire V245, No Keyboard
Copyright 2006 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.22.22, 16384 MB memory installed, Serial #XXXXXXXX.
Ethernet address 0:14:4f:XX:XX:XX, Host ID: XXXXXXXX.
Initializing 1MB of memory at addr 137ff0a000
Initializing 1MB of memory at addr 137ff06000
Initializing 1MB of memory at addr 137ff00000
Initializing 1MB of memory at addr 137fee0000
Initializing 1MB of memory at addr 137fe90000
Initializing 1MB of memory at addr 137fdea000
Initializing 14MB of memory at addr 137f000000
Initializing 2032MB of memory at addr 1300000000
Initializing 2048MB of memory at addr 1200000000
Initializing 2048MB of memory at addr 1100000000
Initializing 2048MB of memory at addr 1000000000
Initializing 2048MB of memory at addr 300000000
Initializing 2048MB of memory at addr 200000000
Initializing 2048MB of memory at addr 100000000
Initializing 2048MB of memory at addr 0
Rebooting with command: boot disk3
Boot device: /pci at 1e,600000/pci at 0/pci at a/pci at 0/pci at 8/scsi at 1/disk at 3,0 File
and args:
>> FreeBSD/sparc64 ZFS boot block
Boot path: /pci at 1e,600000/pci at 0/pci at a/pci at 0/pci at 8/scsi at 1/disk at 3,0:a
Consoles: Open Firmware console
***Slow from here(\|/-\|/- animation)***
FreeBSD/sparc64 ZFS enabled bootstrap loader, Revision 1.0
(Fri Jul 21 08:44:42 UTC 2017 root at releng2.nyi.freebsd.org)
bootpath="zfs:zroot/ROOT:"
Loading /boot/defaults/loader.conf
/boot/kernel/kernel data=0xc47740+0xf4078 syms=[0x8+0xd5a38+0x8+0xc746a]
/boot/entropy size=0x1000
/boot/kernel/zfs.ko text=0x25cc60 data=0xb9d0+0x90050
|syms=[0x8+0x1bd38/-+0x8+0x16db2]
loading required module 'opensolaris'
/boot/kernel/opensolaris.ko text=0x3730 data=0x2c8+0x1a30
syms=[0x8+0xe10+0x8+0x968]
***It is slow until the above is displayed.***
Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel] in 9 seconds... Booting [/boot/kernel/kernel]
in 8 seconds... Booting [/boot/kernel/kernel] in 7 seconds... Booting
[/boot/kernel/kernel] in 6 seconds... Booting [/boot/kernel/kernel] in 5
seconds... Booting [/boot/kernel/kernel] in 4 seconds... Booting
[/boot/kernel/kernel] in 3 seconds... Booting [/boot/kernel/kernel] in 2
seconds... Booting [/boot/kernel/kernel] in 1 second... Booting
[/boot/kernel/kernel]...
-\|/-\|/-\|/-\|/-\|jumping to kernel entry at 0xc00b0000.
===
---
Yoshihiko Iwama
More information about the freebsd-sparc64
mailing list