Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Root pool backup, ever lasting issue ashift?

NorbertBJul 12 2018 — edited Oct 12 2018

I am running a mirrored root pool "rpool" (two EFI labelled ashift=12 SATA disks) and created a clone of the complete pool in "bkpool" on another SATA disk.

Commands (after EFI labelling the other disk):

# zpool create -B bkpool <device>

# zpool export bkpool

# zfs snapshot -r rpool@bkpool

# zpool import -N bkpool

# zfs send -R rpool@bkpool | zfs receive -F bkpool

# zpool export bkpool

Every night an incremental recursive snapshot of rpool is taken, with the current date appended to the snapshot name, and bkpool is updated.

Ommitting the details here, I am reporting the most important command:

# zfs send -r -i rpool@bkpoolOLD rpool@bkpoolNEW | zfs receive -F bkpool

This way I am maintaining a daily updated clone of rpool on another device.

In case of a disaster for rpool, I can do the following:

Boot from an s11 system DVD, and then:

# zpool import -N bkpool rpool

# bootadm install-bootloader -P rpool /dev/rdsk/<device>s1

# zpool export rpool

Thereafter I can boot rpool from the other SATA disk.

After mirroring again, the former situation is re-established.

This is tested and runs fine.

I tried the same procedure with a USB connected external disk.

The only intermediate step to be added, is cloning the external disk onto an SATA disk with command "dd", because grub2 cannot boot from a USB device (and finally an internal disk is anyway needed).

This is also tested and runs fine (but only in principle!).

The problem is, I got a pool with ashift=9 !!

This is a drawback of more than at least six years!!

The external USB disk was purchased recently, is a popular model, and is sold until today.

Industry information says that all disks actually have blocks of size 4096 bytes since about 2009 but at least 2012.

Hence, external USB disks seem to lie about their actual block size until today!

My question is:

How can I set ashift to the real block size (ashift=12)?

Btw., some Solaris derivatives provided a corresponding option for "zpool create" which seems to have gone meanwhile, because it is thought to be redundant after that long time. (??)

Message was edited by: NorbertB

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 9 2018
Added on Jul 12 2018
2 comments
414 views