Hi List,
As a ZFS newbie, I foolishly copied my data set to the root zpool file
system (a large iSCSI SAN array). Thus:
# zpool create -f iscsi c4t19d0 c4t20d0 c4t21d0 c4t22d0 c4t23d0 c4t24d0
# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
iscsi 9.53T 64.5K 5.34T 0% ONLINE -
# zfs set mountpoint=/mydisks/iscsi iscsi
Then copied almost 6TB (uncompressed) of data into a subdirectory of the
root zpool: /mydisks/iscsi/fastdata. (I know, RTFM before using ZFS).
So, now for many obvious reasons I want to move my data into a
filesystem below my iscsi zpool (call: iscsi/fastdata). So I tried the
following:
# cd /mydisks/iscsi
# ls
fastdata/
# mv fastdata fastdata.old/
# zfs snapshot [EMAIL PROTECTED]
# zfs clone [EMAIL PROTECTED] iscsi/fastdata
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
iscsi 4.04T 5.34T 4.04T /mydisks/iscsi
[EMAIL PROTECTED] 0 - 4.04T -
iscsi/fastdata 0 5.34T 4.04T /mydisks/iscsi/fastdata
# zfs promote iscsi/fastdata
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
iscsi 4.04T 5.34T 4.04T /mydisks/iscsi
iscsi/fastdata 4.04T 5.34T 4.04T /mydisks/iscsi/fastdata
iscsi/[EMAIL PROTECTED] 0 - 4.04T -
Clean up the original subdirectory:
# pwd
/mydisks/iscsi
# rm -r fastdata.old/
.. some time later...
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
iscsi 4.04T 5.34T 27.5K /mydisks/iscsi
iscsi/fastdata 4.04T 5.34T 4.04T /mydisks/iscsi/fastdata
iscsi/[EMAIL PROTECTED] 0 - 4.04T -
And in new file system:
# pwd
/mydisks/iscsi/fastdata
# mv fastdata.old/* .
# rmdir fastdata.old
OK, so far so good. But now I want to remove the snapshot, and this is where
I'm stuck:
# zfs destroy iscsi/[EMAIL PROTECTED]
cannot destroy 'iscsi/[EMAIL PROTECTED]': dataset already exists
# zfs destroy -r iscsi/[EMAIL PROTECTED]
cannot destroy 'iscsi/[EMAIL PROTECTED]': snapshot is cloned
no snapshots destroyed
# zfs list -o origin iscsi
ORIGIN
iscsi/[EMAIL PROTECTED]
As you can see, the origin of the snapshot is the iscsi zpool root file system.
D'oh! Furthermore, if I promote the iscsi root FS, the iscsi/fastdata
subdirectory becomes a clone:
# zfs promote iscsi
# zfs list -o origin iscsi
ORIGIN
-
# zfs list -o origin iscsi/fastdata
ORIGIN
[EMAIL PROTECTED]
So, I can promote the iscsi zpool FS, but then the new iscsi/fastdata FS
becomes a clone of the snapshot. I can't have both iscsi and iscsi/fastdata
promoted so I can clean out the snapshot. Am I stuck just copying the data
into the new file system, which will take, by my calculations 12 days, or is
there another secret approach I can take here? Yes, I'm an idiot for not
creating the file system in the first place, but you learn from your mistakes,
right? Any help/suggestions would be very much appreciated.
Thanks,
Jon
--
- _____/ _____/ / - Jonathan Loran - -
- / / / IT Manager -
- _____ / _____ / / Space Sciences Laboratory, UC Berkeley
- / / / (510) 643-5146 [EMAIL PROTECTED]
- ______/ ______/ ______/ AST:7731^29u18e3
_______________________________________________
zfs-discuss mailing list
[EMAIL PROTECTED]
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss