For the life of me, I cannot figure out the syntax unless it's my configuration. Zone path is /zpool/zones/oracle11zone2 It is not running.
-bash-3.00# zfs snapshot zpool/zones/oracle11zone2@prepatch
cannot open 'zpool/zones/oracle11zone2': dataset does not exist
-bash-3.00# zfs snapshot /zpool/zones/oracle11zone2@prepatch
cannot snapshot '/zpool/zones/oracle11zone2@prepatch': leading slash in name
-bash-3.00# zpool status
pool: rpool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c1t1d0s0 ONLINE 0 0 0
errors: No known data errors
pool: zpool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
zpool ONLINE 0 0 0
raidz2 ONLINE 0 0 0
c1t0d0 ONLINE 0 0 0
c1t2d0 ONLINE 0 0 0
c1t3d0 ONLINE 0 0 0
errors: No known data errors
-bash-3.00#
What am I missing?
cannot snapshot '/zpool/zones/oracle11zone2@prepatch': leading slash in name
this is your clue...
try:
zfs snapshot zpool/zones/oracle11zone2@prepatch
-bash-3.00# zfs snapshot zpool/zones/oracle11zone2@prepatch
cannot open 'zpool/zones/oracle11zone2': dataset does not exist
Already tried that but thanks.
yes, and this time the clue is:
cannot open 'zpool/zones/oracle11zone2': dataset does not exist
so, what is the name of the dataset you are trying to use? have a look at:
zfs list
I guess I just don't see it. "zpool" is the one where the zone exists.
-bash-3.00# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 27.0G 34.6G 6.99G /rpool
rpool/ROOT 11.1G 34.6G 18K legacy
rpool/ROOT/s10s_u7wos_08 11.1G 34.6G 7.76G /
rpool/ROOT/s10s_u7wos_08/var 3.36G 34.6G 3.36G /var
rpool/dump 1.00G 34.6G 1.00G -
rpool/export 42K 34.6G 22K /export
rpool/export/home 20K 34.6G 20K /export/home
rpool/swap 7.86G 39.9G 2.52G -
zpool 63.1G 3.55G 63.1G /zpool
-bash-3.00# zfs snapshot zpool/zones/oracle11zone2@prepatch
cannot open 'zpool/zones/oracle11zone2': dataset does not exist
-bash-3.00# pwd
/
-bash-3.00# ls /zpool/zones/
oracle11zone2
oracle11zone2clone1
-bash-3.00#
you can not take a snapshot from a zone. only from a zfs filesystem or zpool. "oracle11zone2" is just a directory inside your filesystem and not a zfs filesystem!
Understood. What am I missing below, then when trying to snapshot the filesystem?
-bash-3.00# zfs snapshot zpool/zones/@prepatch
cannot snapshot 'zpool/zones/@prepatch': empty component in name
---------- Post updated at 05:57 PM ---------- Previous update was at 05:54 PM ----------
I figured it out, I think?
-bash-3.00# zfs snapshot zpool@prepatch
-bash-3.00#
you can not snapshot a filesystem! you can create a zone inside an own zfs filesystem and take a snapshot from this!
Well, I just want to create a snapshot of an existing zone. I want to be able to roll back if needed. Are you telling me there is no way to snapshot this pool?
you can snapshot the whole pool... but you need to have the zone inside a zfs filesystem to take a snapshot from the zone only.
The zone is on a zfs filesystem so I think I'm good. So for the future, I need to create the zones on their own respective filesystems in order to snapshot them individually, correct?
the zone is inside the zpool "zpool" which is a zfs filesystem. but yes, to take a snapshot of one zone only, it has to be in a zfs filesystem for itself. read the zones admin guide for more information!
You need to first create a zfs filesystem, then install your zone into the zfs filesystem. Then you can snapshot the zfs filesystem that contains your zone. For instance: zfs create zpool/hereIsMyZoneFilesystem
you don't need to create the filesystem. the zone creation routine will handle this. but you can do it if you like special names or something else...