Error trying to promote ZFS clone - what do I need to do to troubleshoot this?


 
Thread Tools Search this Thread
Operating Systems Solaris Error trying to promote ZFS clone - what do I need to do to troubleshoot this?
# 1  
Old 03-07-2018
Error trying to promote ZFS clone - what do I need to do to troubleshoot this?

Steps taken:-
1. Snapshot an existing ZFS filesystem.
2. Created clone from snapshot.
3. Updated files on cloned ZFS filesystem.
4. Snapshot of cloned ZFS filesystem.
5. Attempted to promote clone ZFS and get error message. See below.


Code:
 #zfs list -rt all /rpool/ai 
 NAME                         USED  AVAIL  REFER  MOUNTPOINT 
 rpool/ai                    28.2G  26.3G  19.3G  /rpool/ai 
 rpool/ai@aisnap               54K      -  19.3G  - 
 rpool/ai/aiclone            8.98G  26.3G  27.2G  /rpool/ai/aiclone 
 rpool/ai/aiclone@clonesnap      0      -  27.2G  - 
 rpool/ai/aiclone%               -      -      -  /rpool/ai/aiclone

Code:
# zfs promote rpool/ai/aiclone 
 cannot determine dependent datasets: recursive dependency at 'rpool/ai'

Moderator's Comments:
Mod Comment Please use code tags


---------- Post updated at 09:06 AM ---------- Previous update was at 06:07 AM ----------

Ah doesnt work if you create a clone that is sub-directory of the existing one. i.e. rpool/ai/clone from rpool/ai. Only works if you use /rpool/aiclone.

Last edited by jim mcnamara; 03-07-2018 at 08:23 AM..
# 2  
Old 03-07-2018
Hi,

Yes, you get the same message sometimes when you are destroying clones - it seems to be something to do with the inherited names.

Regards

Gull04
# 3  
Old 03-08-2018
Which is understandable.
You have created a clone of rpool/ai filesystem as a descendant filesystem of of rpool/ai filesystem.
While this is possible and working, you will not be able to promote that filesystem rpool/ai/my_new_ai_clone due to above condition.
But you will be able to use it as you see fit.


This will work, as you noticed :

Code:
somezpool/ai/filesystem1 # filesystem1 is mounted under /somezpool/ai/filesystem1 and contains data.
somezpool/ai/filesystem1@today # take snap
somezpool/ai/filesystem1_clone # create clone under somezpool/ai/filesystem1_clone

zfs promote of filesystem1_clone to filesystem1 will now work.

Do not confuse directories and filesystems in zfs.
zfs will create nested filesystems on top of each other and mount them like that due to mount point inheritance behavior.
/mypool -> zfs create mypool/dump/somefilesystem

Result :

A zfs filesystem mypool/dump/somefilesystem is created and mounted under /mypool/dump/somefilesystem, unless overridden with -o mountpoint=/some/other/mountpoint during zfs create command.

Of course, mountpoint can be changed anytime with zfs set, as long as nothing is accessing the mountpoint.

rollback/promotion/cloning of entire filesystem hierarchy (dataset) is not possible, only one filesystem at the time.
While snapshots, destroy and sending will work on entire dataset recursively if -r is ran against the parent dataset.

Hope that helps
Regards
Peasant.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Solaris

ZFS receive error

trying to clone a zfs file system on the same system using zfs send -r root/branch@snapshot |zfs receive root/newbranch and get the following error :parent does not exist. How do I fix this? (1 Reply)
Discussion started by: os2mac
1 Replies

2. Solaris

Repeated error - "se_hdlc: clone device must be attached before use" in /var/adm/messages

Below is the error being repeated on my Solaris 9 Sun-Fire-V890 machine. SAN team confirmed as everything is fine from their end. I did google and found that some people say its a known Oracle bug when you have Oracle 10G installed on your system but I kind of disagree with them. Please see below... (2 Replies)
Discussion started by: vikkash
2 Replies

3. UNIX for Dummies Questions & Answers

Help to troubleshoot and correct

Reference (to previous post title): Help_Beginner in Unix I need assistance in terms of troubleshooting this codes.Though it not complete for the required task,shedding of any idea will be appreciated. the information about the code is the thread referenced above Code: #!/bin/ksh touch... (1 Reply)
Discussion started by: moraks007
1 Replies

4. AIX

troubleshoot

Dear friends, is there any kind of scripts that will damage aix than we can troubleshoot what was the reason :-) just for having fun :-) (2 Replies)
Discussion started by: Vit0_Corleone
2 Replies

5. Solaris

Remove the zfs snapshot keeping the original volume and clone

I created a snapshot and subsequent clone of a zfs volume. But now i 'm not able to remove the snapshot it gives me following error zfs destroy newpool/ldom2/zdisk4@bootimg cannot destroy 'newpool/ldom2/zdisk4@bootimg': snapshot has dependent clones use '-R' to destroy the following... (7 Replies)
Discussion started by: fugitive
7 Replies
Login or Register to Ask a Question