WAN Boot and ZFS root
by Mark on Mar.09, 2009, under solaris
I came across an intriguing problem today whilst trying to rebuild a server. The server was physically located somewhere I couldn’t utilise a boot server, so I decided to quickly throw together a WAN Boot server (which I won’t go into here, but see ref [1] below).
Having already taken a flash archive (flar) of a Solaris 10 update 6 system the intention was to install this using WAN Boot onto a fresh system, with ZFS root. The first time I ran the install, it failed with a core dump in pfinstall. A bit of digging around [2] showed that the cause of my problem was the lack of support for flash installs and ZFS root. The only option with WAN Boot though is flash.
Hmm. So, I wondered if it would be possible to do the flash install over WAN boot to a standard UFS filesystem, then migrate it to ZFS. The answer is yes! [3]
With the target system having two disks, I did a flar install to one of the disks, then created a zpool with the other disk in when the system had booted (first of all I made sure the disk had a VTOC label rather than an EFI label, using ‘format -e’).
Once I had my zpool, I then did a LiveUpgrade of the system to the ZFS root as per the documentation in reference [3] below.
When the machine had booted from the new ZFS rooted boot environment (BE) I removed the previous BE with ludelete, formatted the first drive again to ensure it contained a VTOC label, then added it to the zpool with ‘zpool attach rpool c1t0d0s0 c1t1d0s0′. Oh, I had a weird problem here with adding the disk to the pool. ZFS kept complaining “cannot attach c1t1d0s0 to c1t0d0s0: device is too small”, which I knew was impossible as they were the same type of disk. A quick “prtvtoc /dev/rdsk/c1t0d0s0 | fmthard -s – /dev/rdsk/c1t1d0s0″ fixed this and the zpool attach worked just fine.
Sorted. System installed over WAN Boot and converted to ZFS root.
References
April 6th, 2009 on 10:14 am
I have just the same problem… I’ve tried to attach a disk to a root zfs pool to make a mirror, the disk WERE supposed to be the same BUT their from differents manufacturers, one has ….
prtvtoc /dev/rdsk/c1t1d0s0
* /dev/rdsk/c1t1d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 255 tracks/cylinder
* 16065 sectors/cylinder
* 30400 cylinders
* 30398 accessible cylinders
and the other one …
bash-3.00# prtvtoc /dev/rdsk/c1t0d0s0
* /dev/rdsk/c1t0d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 255 tracks/cylinder
* 16065 sectors/cylinder
* 30399 cylinders
* 30397 accessible cylinders
THEY HAVE 1 CYLINDER DIFFERENCE!!!!
I don’t know if that can be your problem …
Regards ..
PD=Excuse my English … ;-)