At the source server:
zfs snapshot zones/testzone@today
zfs send zones/testzone@today | gzip > /snappie.gz
At the destination server:
gzcat snappie.gz | zfs receive -F zones/testzone
some Unix notes
At the source server:
zfs snapshot zones/testzone@today
zfs send zones/testzone@today | gzip > /snappie.gz
At the destination server:
gzcat snappie.gz | zfs receive -F zones/testzone
cfgadm -al | grep -i fabric | awk '{ print $1 }'| while read hba;do luxadm -e forcelip /dev/cfg/${hba} done
My jumpstart install uncompresses the flar but leaves the server without bootblock or zfs bootpool, to fix this i install the bootblock and set the zpool’s bootfs property
# zpool status
pool: rpool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c0t0d0s0 ONLINE 0 0 0
c0t1d0s0 ONLINE 0 0 0
# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c0t0d0s0
# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c0t1d0s0
# zpool set bootfs=rpool/ROOT/sol10u11sparc rpool
Then just… reboot
This time, kraftek.com is running in a webserver inside an appletv 🙂
During its lifetime it has run in various x86 and x86_64 slackware linux boxes+laptops, a couple of ubuntu laptops, a rikomagic ARM cpu device running picuntu linux, and now, an appletv running a jailbroken iOS. Next, i’d like it to run in a dd-wrt router, which i already own…. 🙂
# grep VOL vxdisplay_s.txt| awk '{print "vxassist -g rez2_datadg make "$3 " " int($(NF -1)*1024)"m" }'
# echo “PLATFORM_GROUP=sun4v” >> /var/sadm/system/admin/.platform
# nohup flarcreate -n `uname -n` -U “content_architectures=sun4u,sun4v” -c -S -R / /b/`uname -n`.flar &
# haconf -dump -makero
# hastop -all -force
# cd /etc/VRTSvcs/conf/config
# vi main.cf
# hacf -verify .
# hastart
If your server doesn’t have a CDOM, you could create one by running something like this (create_config.ksh):
ldm add-vdiskserver primary-vds0 primary ldm add-vconscon port-range=5000-5100 primary-vcc0 primary ldm add-vswitch net-dev=igb0 primary-vsw0 primary ldm add-vswitch net-dev=nxge0 primary-vsw1 primary ldm set-vcpu 4 primary ldm set-memory 1g primary ldm add-config initial ldm list-config
Reboot the server.
Now let’s say you want to create an LDOM in that server, login to the cdom and do something like this (create_myldom.ksh):
ldm add-domain myldom ldm set-vcpu 16 myldom ldm set-memory 13G myldom ldm add-vnet vnet1 primary-vsw0 myldom ldm add-vnet vnet2 primary-vsw1 myldom ldm add-vdsdev /dev/dsk/
c0t600601605A203100A44CDC74C08 2E211d0s2 vol2@primary-vds0 ldm add-vdisk vdisk0 vol2@primary-vds0 myldom ldm bind myldom ldm set-var auto-boot?=true myldom ldm start-domain myldom
Remove a volume
# vxassist -g <dg> remove volume <volume>
Create a volume
# vxassist -g <dg> make <volume> <size>
Change a volume’s owner and permissions
# vxedit -g <dg> set user=<user> group=<group> mode=<perms> <vol>
– rdircio
# flar split flarfile.flar
# mv archive archive.Z
# uncompress archive.Z
# cat archive | cpio -ivt
# cpio -ivdm opt/tivoli/* < archive