Internet, Unix en security

Bug ID 6843138: can not boot off of a 2.2TB and zfs root

Bij het upgraden van OpenSolaris naar build 125 werd mijn aandacht getrokken door meldingen die ik kon negeren zo bleek later. Maar mijn aandacht werd getrokken door bug ID 6843138 en met de komst van 2.5TB disken wordt deze bug werkelijkheid als GRUB wordt gebruikt.

Installed snv_144 on an about 2.2 TB disk, using zfs for root.
First reboot after install, I can boot from the disk. However
issuing a reboot while booted from the hard disk, I get the grub prompt.
doing a findroot (pool_rpool,0,a) results in

zio_read_data failed
Error 15: File not found.

I saw the problem originally with opensol 0906 111b.

One problem here is that grub has total_sectors as unsigned long instead
of unsigned long long. So if a file we need for booting falls after
the chopped off total sectors (ulong) we won’t even attempt to read
the file in rawread().
Even when I modify total_sectors to be unsigned long long and
not to chop it in get_diskinfo() I can not fully boot. Problem is
that bios is not reporting correct capacity. Based on int 13 fn 48
data, it is reporting 0x199fb000 instead of 0x1199fb000.

Removing some checks, I can boot. details in a bit.

De vraag is natuurlijk of je nu een bootdisk van 2.5TB wilt hebben, maar denkende aan een opmerking over 640kB ken ik het antwoord wel.

Internet, Unix en security

OpenSolaris 2008.11 with ZFS-mirroring

OpenSolarisBoth Sun Solaris and OpenSolaris now support ZFSboot which allows you to have your operating system on a ZFS-pool. Also the text-installer for Sun Solaris lets you define if you want your ZFSboot device to be mirrored, but with the OpenSolaris installer this option isn’t given and with the default options it isn’t even possible. This due to selection of the whole disk option for ZFS which appears to be a wise option for people who know ZFS. The truth is that you need to select Solaris partitions during installation if you want your ZFSboot environment to support mirroring.

After OpenSolaris has been installed you can turn on mirroring as in the good old days with SVM. The first step it get the VTOC the same on both disks.

$ pfexec prtvtoc /dev/rdsk/c3d0s2 | pfexec fmthard -s - /dev/rdsk/c4d1s2
fmthard: New volume table of contents now in place.

ZFS can be tolled to create a mirror and the resilvering starts.

$ pfexec zpool attach -f c3d0s0 c4d1s0

Now the last step is to install GRUB on the second disk.

$ pfexec installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c4d1s0

Afterwards I did a scrub to make sure the data on both disks was correct and the following output confirms I have mirrored my two disks.

$ zpool status
pool: rpool
state: ONLINE
scrub: scrub completed after 0h5m with 0 errors on Sat May 30 11:50:12 2009
rpool ONLINE 0 0 0
mirror ONLINE 0 0 0
c3d0s0 ONLINE 0 0 0
c4d1s0 ONLINE 0 0 0
errors: No known data errors

You’re ready to go and as long as you do a scrub on a regular basis the zpool should stay a safe place to store your data.