ONTAP Discussions
ONTAP Discussions
I am getting this error on cloning a flexvol iscsi lun. any idea?
lun clone create /vol/flexvol0/iscsi_vol1 -o noreserve -b /vol/flexvol0/iscsi_vol1_clone clone_flexclone
lun clone create: A LUN exists at the path
Looking at the name of your paths I think you have the clone and parent path reversed in your command. It should be:
lun clone create /vol/flexvol0/iscsi_vol1_clone -o noreserve -b /vol/flexvol0/iscsi_vol1 clone_flexclone
BTW, it is iscsi_vol1 the name of your lun? You need to provide the full path including the name of the lun itself as you can't clone a qtree.
it still doesnt work
lun clone create /vol/flexvol0/iscsi_vol0_clone -o noreserve -b /vol/flexvol0/iscsi_vol0 clone_flexclone
lun clone create: No such snapshot
dataontap> df -h
Filesystem total used avail capacity Mounted on
/vol/vol0/ 647MB 190MB 457MB 29% /vol/vol0/
/vol/vol0/.snapshot 161MB 128MB 33MB 79% /vol/vol0/.snapshot
/vol/flexvol0/ 6216MB 45MB 6170MB 1% /vol/flexvol0/
/vol/flexvol0/.snapshot 1554MB 1540KB 1552MB 0% /vol/flexvol0/.snapshot
/vol/iscsi/ 8192MB 8112MB 79MB 99% /vol/iscsi/
/vol/iscsi/.snapshot 2048MB 351MB 1696MB 17% /vol/iscsi/.snapshot
dataontap> lun show -v
/vol/flexvol0/iscsi_vol0 3.0g (3224309760) (r/w, online, mapped)
Serial#: idWqJ4eE8V32
Share: none
Space Reservation: disabled
Multiprotocol Type: windows_2008
Maps: iscsi_test=1
Occupied Size: 39.1m (40992768)
Creation Time: Tue Jul 26 05:23:00 GMT 2011
Cluster Shared Volume Information: 0x0
/vol/iscsi/iscsi_qtr/iscsi_vol0 7.9g (8488488960) (r/w, online, mapped)
Comment: "iscsi test"
Serial#: idWqJ4eBac0J
Share: none
Space Reservation: enabled
Multiprotocol Type: windows
Maps: iscsi_test=0
Occupied Size: 117.9m (123613184)
Creation Time: Mon Jul 25 23:51:55 GMT 2011
Cluster Shared Volume Information: 0x0
you have to specify a snapshot name that will be used as the base of creating the clone
lun clone create <clone_lunpath> [-o noreserve] -b <parent_lunpath> <parent_snap>
if there are no snapshots for the volume, you can create one.
regards,
Mladen
Looking at the first error message:
lun clone create: A LUN exists at the path
And you lun show -v... then the error message is correct. the LUN already exists!
If you clone a LUN, you need to clone it to a location where no LUN exists.
Peter
In your original post you used clone_flexclone as a snapshot. You did not specify the snapshot in this example.
i have not created any snapshot. so you are saying in order to clone a lun (not a volume) I need to create a snapshot of the volume first?
snap list shows
dataontap> snap list
Volume vol0
working...
%/used %/total date name
---------- ---------- ------------ --------
2% ( 2%) 1% ( 1%) Jul 26 16:00 hourly.0
10% ( 8%) 3% ( 2%) Jul 26 12:00 hourly.1
16% ( 8%) 5% ( 2%) Jul 26 08:01 hourly.2
22% ( 8%) 7% ( 2%) Jul 26 00:00 nightly.0
27% ( 8%) 9% ( 2%) Jul 25 20:00 hourly.3
31% ( 8%) 11% ( 2%) Jul 25 16:00 hourly.4
35% ( 8%) 13% ( 2%) Jul 25 12:00 hourly.5
38% ( 8%) 15% ( 2%) Jul 25 00:00 nightly.1
Volume flexvol0
working...
%/used %/total date name
---------- ---------- ------------ --------
2% ( 2%) 0% ( 0%) Jul 25 20:00 hourly.0
2% ( 0%) 0% ( 0%) Jul 25 16:00 hourly.1
2% ( 0%) 0% ( 0%) Jul 25 12:00 hourly.2
3% ( 0%) 0% ( 0%) Jul 25 08:00 hourly.3
3% ( 0%) 0% ( 0%) Jul 25 00:00 nightly.0
3% ( 0%) 0% ( 0%) Jul 24 20:00 hourly.4
3% ( 0%) 0% ( 0%) Jul 24 16:00 hourly.5
3% ( 0%) 0% ( 0%) Jul 24 00:00 nightly.1
ok so looks like I need to create a snapshot of the entire volume before I can do a do a clone of the lun?
I cannot snapshot the lun right? only a volume?
snapshot is ALWAYS the whole volume.
so a lun clone can only be created from a snapshot of a volume and not from the lun itself?
can i restore a lun only and not a whole volume?
I created a lun clone. how do I restore a lun clone but not entire volume?
so, you want to perform a "restore" of a LUN? not a clone, for temporary use?
if the above is what you want, then, the process our products take is called "LCSR" - LUN Clone Split Restore for a LUN type restore/recovery. For this, and if you are doing manual, then first, you do "LUN clone", and then followed by split the clone! This will place the recovered LUN in the same FlexVol as original!!!
k i was able to split the lun clone from the parent lun with
lun clone split start -d /vol/flexvol0/iscsi_vol0_clone
now i have 2 luns occupying the same amount of space. how do i copy this lun over the other one? or restore the data to the original lun?
that was expected! So, what you ahve done is, you had the old lun, and performed a clone, followed by split, this recovered a LUN from a specific snapshot, but now you have two luns! Here, if there recovered LUN has all the data you need, then just destroy the OLD lun whcih is not required!
Obviously you are executing all this manually, if you were to use SnapDrive for example, all you need is using the GUI, right-click and restore a LUN from a specific snapshot. IT will do exactly the above, and it will not retain the old LUN.
Thanks, balbeer
the reason is, you have been taking snapshots at the storage layer, not using SnapDrive!!!
simuate this:
use snapdrive to create a snapshot, select the drive, right-click, and click on create snapshot
once the snapshot is created, expand the disks, and snapshots, and you will see a snapshot which is NOT greyed, this means it is created usign SnapDrive
right-click on the snapshot you have created using snapdrive, and select restore!
so if i create a lun in the storage layer, i should not use snapdrive to manager that lun and vice versa?
Correct, it can be done if you know what you're doing but it's not Best Practice.