0% found this document useful (0 votes)
270 views

How To Use Zpool Split To Split Rpool in Solaris 11 x86x64

The document describes how to use the 'zpool split' command in Solaris 11 to split a mirrored zpool called rpool into two separate pools. It shows the commands to split rpool into newrpool using one of the mirrors, import the new pool, mount the zfs filesystem, and configure grub to add boot options for the new pool.

Uploaded by

vijayen123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
270 views

How To Use Zpool Split To Split Rpool in Solaris 11 x86x64

The document describes how to use the 'zpool split' command in Solaris 11 to split a mirrored zpool called rpool into two separate pools. It shows the commands to split rpool into newrpool using one of the mirrors, import the new pool, mount the zfs filesystem, and configure grub to add boot options for the new pool.

Uploaded by

vijayen123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.

com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

1 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

2 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

config:

NAME STATE READ WRITE CKSUM


rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c7t0d0 ONLINE 0 0 0
c7t1d0 ONLINE 0 0 0

# zpool split rpool newrpool c7t1d0

3 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

# zpool import
pool: newrpool
id: 6439596171322377858
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

newrpool ONLINE
c7t1d0 ONLINE

4 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

newrpool 26.8G 39.6G 4.58M /newrpool/newrpool


newrpool/ROOT 2.09G 39.6G 31K legacy
newrpool/ROOT/solaris 2.09G 39.6G 1.95G /newrpool
newrpool/ROOT/solaris/var 138M 39.6G 136M /newrpool/var
newrpool/VARSHARE 59K 39.6G 59K /newrpool/var/share
newrpool/dump 20.6G 40.2G 20.0G -
newrpool/export 98K 39.6G 32K /newrpool/export
newrpool/export/home 66K 39.6G 32K /newrpool/export/home
newrpool/export/home/jack 34K 39.6G 34K /newrpool/export/home/jack
newrpool/swap 4.13G 39.7G 4.00G -

# zfs mount -vO -o mountpoint=/newrpool newrpool

5 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

# DO NOT EDIT THIS FILE DIRECTLY. CHANGES MAY NOT BE PRESERVED.


# Changes to this file can be made indirectly via bootadm(1M) subcommands.
#
[global]
console = text
timeout = 30

[meta]
order = SolarisDiskBootInstance|0

[SolarisDiskBootInstance|0]
kernel = /platform/i86pc/kernel/amd64/unix
title = Oracle Solaris 11.1
default = True
bootfs = newrpool/ROOT/solaris
fstype = zfs
boot_archive = /platform/i86pc/amd64/boot_archive

6 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

search --no-floppy --fs-uuid --set=root a7df389a817b7ae1


--- and ---
if [ "$target" = "i386_pc" ]; then
search --no-floppy --fs-uuid --set=root_newrpool a7df389a817b7ae1

# /usr/lib/grub2/bios/sbin/grub-mkconfig -o /newrpool/boot/grub/grub.cfg

# chmod u+w /newrpool/boot/grub/grub.cfg

7 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

#
# It is automatically generated by grub-mkconfig using templates
# from /usr/lib/grub2/bios/etc/grub.d and settings from /usr/lib/grub2/bios/etc/default/grub
#

### BEGIN /usr/lib/grub2/bios/etc/grub.d/00_header ###


if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

8 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

if loadfont "/@/boot/grub/unicode.pf2" ; then


set gfxmode="auto"
load_video
insmod gfxterm
fi
terminal_output gfxterm
set timeout=5
### END /usr/lib/grub2/bios/etc/grub.d/00_header ###

### BEGIN /usr/lib/grub2/bios/etc/grub.d/10_solaris ###


menuentry "Oracle Solaris 11.1" {
insmod part_msdos
insmod part_sunpc
insmod part_gpt

insmod zfs

search --no-floppy --fs-uuid --set=root 595e0a9970a2c682


zfs-bootfs /ROOT/solaris/@/ zfs_bootfs
load_video
set kern=/platform/i86pc/kernel/amd64/unix
echo -n "Loading ${root}/ROOT/solaris/@$kern: "
$multiboot /ROOT/solaris/@/$kern $kern -B $zfs_bootfs

9 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

if [ "$target" = "i386_pc" ]; then


search --no-floppy --fs-uuid --set=root_newrpool 595e0a9970a2c682
if [ -s "($root_newrpool)/@/boot/grub/menu.lst" ]; then
submenu "Legacy GRUB Menu (from root pool newrpool)" "($root_newrpool)/@/boot/grub/menu.lst" {
extract_legacy_entries_source "$2"
}
fi
fi

menuentry "Oracle Solaris 11.1" {


insmod part_msdos
insmod part_sunpc
insmod part_gpt

insmod zfs

search --no-floppy --fs-uuid --set=root a7df389a817b7ae1


zfs-bootfs /ROOT/solaris/@/ zfs_bootfs
load_video
set kern=/platform/i86pc/kernel/amd64/unix
echo -n "Loading ${root}/ROOT/solaris/@$kern: "
$multiboot /ROOT/solaris/@/$kern $kern -B $zfs_bootfs
insmod gzio

10 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

if [ "$target" = "i386_pc" ]; then


search --no-floppy --fs-uuid --set=root_rpool a7df389a817b7ae1
if [ -s "($root_rpool)/@/boot/grub/menu.lst" ]; then
submenu "Legacy GRUB Menu (from root pool rpool)" "($root_rpool)/@/boot/grub/menu.lst" {
extract_legacy_entries_source "$2"
}
fi
fi

### END /usr/lib/grub2/bios/etc/grub.d/10_solaris ###

### BEGIN /usr/lib/grub2/bios/etc/grub.d/41_custom ###


if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /usr/lib/grub2/bios/etc/grub.d/41_custom ###

# chmod u-w /newrpool/boot/grub/grub.cfg

11 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

# zfs mount -vO -o mountpoint=/newrpool newrpool/ROOT/solaris


# cd /newrpool
# ls
bin devices home kernel mnt opt root share tmp ws
boot etc homedir lib net platform rpool shared usr xfn
dev export import media nfs4 proc sbin system var

# rm /newrpool/etc/zfs/zpool.cache

12 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

# touch /newrpool/reconfigure

# bootadm update-archive -v -R /newrpool


cannot find: /newrpool/etc/cluster/nodeid: No such file or directory
cannot find: /newrpool/etc/devices/mdi_ib_cache: No such file or directory
changed /newrpool/etc/devices/mdi_scsi_vhci_cache
cannot find: /newrpool/etc/devices/retire_store: No such file or directory
cannot find: /newrpool/etc/rtc_config: No such file or directory
updating /newrpool/platform/i86pc/boot_archive
Unable to extend /newrpool/platform/i86pc/boot_archive... rebuilding archive
Successfully created /newrpool/platform/i86pc/boot_archive
updating /newrpool/platform/i86pc/amd64/boot_archive
Unable to extend /newrpool/platform/i86pc/amd64/boot_archive... rebuilding archive
Successfully created /newrpool/platform/i86pc/amd64/boot_archive

13 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

# zpool export newrpool

# reboot -p

14 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

15 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

16 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

17 of 18 9/4/2017 11:31 AM
How To Use zpool split to Split rpool in solaris 11 (x86/x64) http://thegeekdiary.com/how-to-use-zpool-split-to-split-rpool-in-solaris-11-x86x64/

18 of 18 9/4/2017 11:31 AM

You might also like