I?m trying to create a new ZFS pool from an existing one (the new one is 4k aligned and the old one is legacy 512b). But, I can?t get it to boot! Not sure what I?m doing wrong. I thought I could create the new pool, and use ?zfs send/recv? to copy the existing pool and then boot onto the new disk, but the kernel doesn?t load? :(. Does anyone know what I?m doing wrong? Here?s my recipe: # gpart create -s gpt diskid/DISK-NEW-DISK # gpart add -s 64K -t freebsd-boot diskid/DISK-NEW-DISK # gpart add -t 8G freebsd-swap diskid/DISK-NEW-DISK # gpart add -t freebsd-zfs diskid/DISK-NEW-DISK # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 diskid/DISK-NEW-DISK # zfs create copy /dev/diskid/DISK-NEW-DISKp3 # zfs send -R oldpool at 20141226 | zfs receive -duvF copy # zpool set bootfs=copy/ROOT/default copy That ought to do it, right? But, if I remove all the existing drives and try and boot on just the new drive, it gets nowhere. I see the ?/?, but it doesn?t spin and doesn?t time out. :(. Any clues would be gratefully received. Many thanks, Joe
Unfortunately send / receive doesn't maintain the pool bootfs, so simply setting that should be all you need e.g. zpool set bootfs=tank/root tank On 27/12/2014 14:37, Dr Josef Karthauser wrote:> I?m trying to create a new ZFS pool from an existing one (the new one is 4k aligned and the old one is legacy 512b). > > But, I can?t get it to boot! Not sure what I?m doing wrong. > > I thought I could create the new pool, and use ?zfs send/recv? to copy the existing pool and then boot onto the new disk, but the kernel doesn?t load? :(. > > Does anyone know what I?m doing wrong? > > Here?s my recipe: > > # gpart create -s gpt diskid/DISK-NEW-DISK > # gpart add -s 64K -t freebsd-boot diskid/DISK-NEW-DISK > # gpart add -t 8G freebsd-swap diskid/DISK-NEW-DISK > # gpart add -t freebsd-zfs diskid/DISK-NEW-DISK > # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 diskid/DISK-NEW-DISK > > # zfs create copy /dev/diskid/DISK-NEW-DISKp3 > # zfs send -R oldpool at 20141226 | zfs receive -duvF copy > # zpool set bootfs=copy/ROOT/default copy > > That ought to do it, right? But, if I remove all the existing drives and try and boot on just the new drive, it gets nowhere. I see the ?/?, but it doesn?t spin and doesn?t time out. :(. > > Any clues would be gratefully received. > > Many thanks, > Joe > _______________________________________________ > freebsd-stable at freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
On Sat, 27 Dec 2014, Dr Josef Karthauser wrote:> I?m trying to create a new ZFS pool from an existing one (the new one is 4k aligned and the old one is legacy 512b). > > But, I can?t get it to boot! Not sure what I?m doing wrong. > > I thought I could create the new pool, and use ?zfs send/recv? to copy the existing pool and then boot onto the new disk, but the kernel doesn?t load? :(. > > Does anyone know what I?m doing wrong? > > Here?s my recipe: > > # gpart create -s gpt diskid/DISK-NEW-DISK > # gpart add -s 64K -t freebsd-boot diskid/DISK-NEW-DISK > # gpart add -t 8G freebsd-swap diskid/DISK-NEW-DISK > # gpart add -t freebsd-zfs diskid/DISK-NEW-DISK > # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 diskid/DISK-NEW-DISKThose partitions are probably not aligned to 4K. Add "-a4k" to the gpart add commands. (Remember that ashift is filesystem block size, not alignment.)
On 28/12/2014 01:07, Dr Josef Karthauser wrote:> I?m trying to create a new ZFS pool from an existing one (the new > one is 4k aligned and the old one is legacy 512b). > > But, I can?t get it to boot! Not sure what I?m doing wrong. > > I thought I could create the new pool, and use ?zfs send/recv? to > copythe existing pool and then boot onto the new disk, but the kernel > doesn?t load? :(. > > Does anyone know what I?m doing wrong? > Here?s my recipe: > > # gpart create -s gpt diskid/DISK-NEW-DISK > # gpart add -s 64K -t freebsd-boot diskid/DISK-NEW-DISK > # gpart add -t 8G freebsd-swap diskid/DISK-NEW-DISK > # gpart add -t freebsd-zfs diskid/DISK-NEW-DISK > # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 diskid/DISK-NEW-DISK > > # zfs create copy /dev/diskid/DISK-NEW-DISKp3 > # zfs send -R oldpool at 20141226 | zfs receive -duvF copy > # zpool set bootfs=copy/ROOT/default copy >Are you sure diskid/DISK-NEW-DISK is correct? Do you have /dev/diskid/ ? Do you mean /dev/gpt/ ? DISK-NEW-DISK - variable name should have a $ in front? $DISK-NEW-DISK Check partition table with gpart show Is the bios set to boot from this disk? -- FreeBSD - the place to B...Serving Data Shane Ambler