ONTAP Discussions

How to use sdcli cmd to connect a lun in snapshot

chao
5,715 Views

Would you please do me a favour?  I want to connect a lun in snapshot.  for example, there is a LUN (/vol/vol1/qtree1/lun0) and this volume has a snapshot which name is "test2".   I want to use "sdcli disk connect" to connect the lun /vol/vol1/qtree1/.snapshot/test2/lun0.  (GUI could do so).  but I met some errors.  would you please help to check that?

I use two methods but failed.  what's the option -s purpose?

C:\Documents and Settings\Administrator>sdcli disk connect -p 172.18.0.126:/vol/
vol1/qtree1/.snapshot/test2/lun0  -d e  -dtype dedicated -I D1COQ250 viaRPC.50:0
1:43:80:04:c5:b2:d4.D1COQ250
Unable to connect to the LUN
Error: The LUN name cannot be found on the target storage system volume.

C:\Documents and Settings\Administrator>sdcli disk connect -p 172.18.0.126:/vol/
vol1/qtree1/lun0 -s test2 -d e  -dtype dedicated -I D1COQ250 viaRPC.50:01:43:80:
04:c5:b2:d4.D1COQ250
Unable to connect to the LUN
Error: The specified LUN '/vol/vol1/qtree1/lun0' is already mapped to at least o
ne initiator '50:01:43:80:04:c5:b3:68'. Try disconnect the corresponding LUN usi
ng SnapDrive on the host it is connected to, or from storage system console use
'LUN unmap' command, or unmap the LUN using Storage System View.

It report the path is incorrect.  Need I do manually clone at first?

Thanks and Best Regards!

TC

5 REPLIES 5

chao
5,715 Views

I got the answer.  I need use sdcli snap mount command as following:

C:\Documents and Settings\Administrator>sdcli snap mount -r D1COQ400 -k e -s tes
t2 -d e
Initializing...D1COQ250 : Checking input parameters
D1COQ250 : Checking access control
D1COQ250 : Checking policies
D1COQ250 : Turning on space reservation
D1COQ250 : Connecting to the LUN
D1COQ250 : Mounting volume on the disk
The operation completed successfully.

It sounds could not the MPIO setting is a little difference from GUI.  some paths are disappear.

is that a way to disable space reservation?  I just want to use it to do tape backup

ctina
5,715 Views

Also the path you were using is incorrect.

You can achieve the same with sdcli disk connect command as well, but your path needs to be this :

172.18.0.126:/vol/vol1/.snapshot/test2/qtree1/lun0

chao
5,715 Views

Thanks . you are right.

D:\NetApp>sdcli disk connect -p 172.18.0.126:/vol/vol1/.snapshot/test2/qtree1/lu
n0 -d f  -dtype dedicated -IG D1COQ250 viaRPC.50:01:43:80:04:c5:b2:d4.D1COQ250
D1COQ250 : Checking input parameters
D1COQ250 : Checking access control
D1COQ250 : Checking policies
D1COQ250 : Turning on space reservation
D1COQ250 : Connecting to the LUN
D1COQ250 : Mounting volume on the disk
UNC Path: None
LUN Path: CN-COQ-Storage2:/vol/vol1/{b9b3a2d8-457d-43d4-bcc1-79b7d9310d52}.rws
        Storage System:         CN-COQ-Storage2
        Storage System Path:    /vol/vol1/{b9b3a2d8-457d-43d4-bcc1-79b7d9310d52}
.rws
        Type:                   lun
        Disk serial number:     W-PeRoVe0ZCY
        Backed by Snapshot Copy:        /vol/vol1/qtree1/.snapshot/test2/lun0
        Shared:                 No
        BootOrSystem Disk:      No
        SCSI port:              0
        Bus:                    0
        Target:                 0
        LUN:                    0
        Readonly:               No
        Size:                   61451
        Snapmirror Source:      No
        Snapvault Primary:      No
        Disk Partition Style:   GUID Partition Table (GPT)
        Clone Split Restore status: Normal
        DiskID:                 1
        Volume Name:            \\?\Volume{4f5263a6-2fef-4617-b32e-98d429e9321b}
\
        Mount points:           F:\
        IP Addresses:           172.18.0.126
The operation completed successfully.

m_kellner
5,715 Views

Hello,  i will connect fom a Server a disk via SDCLI and iscsi.

i run the command

sdcli disk connect -p netfiler02:/vol/vol_Exchange2/.snapshot/exchsnap__srv113__recent/exchange_DB2.lun -d f -dtype dedicated -IG iscsi viaRPC.iqn.1991-05.com.microsoft:srv032.ktr.ad

and see this error

SRV032 : Checking input parameters

Unable to connect to the LUN

Error: Node (?ャ?à) is not the cluster node.

i think i have an error in my command, can you help me.

Thanks mike

chao
5,715 Views

1. Could you connect via GUI?

2 -IG iscsi viaRPC.iqn.1991-05.com.microsoft:srv032.ktr.ad    why you input iscsi here?  I think it should be nodename.

CLI syntax is

sdcli disk connect [-m MachineName] -p LUNpath -d MountPoint [-I NodeMachineName InitiatorName ...] | [-IG NodeMachineName GroupName ...] -dtype {shared | dedicated} {[-e “ResourceGroupName”] | [-n “ResourceGroupName” “ResourceGroupDesc”]} [-c “ClusterName”]

3. try sdcli snap mount.  it's quite simply by my testing.

sdcli snap mount [-m MachineName] [-r LiveMachineName] -k LiveMountPoint -s SnapshotName -d MountPoint

ex. sdcli snap mount -r srv113 -k <srv113 mountpoint> -s exchsnap_srv113_recent -d f

Public