ONTAP Discussions

Snapshot - LUN

keyurjoshi
11,627 Views

Hello,

'Am sure this must have been asked a thousand of times, but let me go ahead and ask it again.

Is there a way to take snapshot of a specific LUN? I know snapshots are volume based only. But what if my volume has several LUN's and what if I'd like to restore just a single LUN? I know snapdrive would help me in some way, but is there any other option?

Is there then a way to restore just a single lun from a volume based snapshot having lots of lun's. If there is, could someone please point me out the exact syntax?

Thanks in advance!

-Keyur

1 ACCEPTED SOLUTION

RAVI_PALADUGU
11,627 Views

My answer assumes that the snapshots are taken by sanpdrive, that way you have it "consistent". This is because snapshots are volume-based, snapshot should be taken when the LUN is in a consistent state which can be accomplished by utilizing snapdrive to take the snapshot to ensure that the drive is consistent before taking the volume level snapshot.

Method:1

========

SnapRestore (requires license)- Restore an entire volume or a single LUN.

When a single LUN is restored, it must be taken offline or be unmapped prior to recovery. Using SnapRestore on a LUN, or on a volume that contains LUNs, without stopping all host access to those LUNs, can cause data corruption and system errors.

Remember, LUN restore is actually a Single File SnapRestore and is slower as WAFL has lot of work with specific blocks. This process can take longer time depending upon the LUN size.

Syntax:

-----------

snap restore [-t file] [-s snapshot_name] [-r restore_as_path] path_and_LUN_name

Example:

--------------

snap restore -t file -s snapshot.1 /vol/volA/my_luns

Method:2

========

Lun clone (requires license)- As pradeep mentioned

View solution in original post

6 REPLIES 6

jacint
11,628 Views

hi,

you can use the 'snap restore' command for single file restore e.g. for restoring a single LUN.

Jacint

CASTROJSEC
11,627 Views

snapdrive is your best bet.  simply install it on the host.  It's very easy to install and use.  Make sure your volume has enough room to support all the snapshots of the LUNs.  You could clone the volume then mount the LUNs you need but I highly recommend using snapdrive.

KURRAPRADEEP
11,627 Views

you can do this by lun clone create /vol/<actual vol name>/<lunname>clone -o noreserve -b /vol/<actual vol name>/<lun name> snapshot name, you can mount this clone to the server , make sure you have enough space on the volume before doing this

RAVI_PALADUGU
11,628 Views

My answer assumes that the snapshots are taken by sanpdrive, that way you have it "consistent". This is because snapshots are volume-based, snapshot should be taken when the LUN is in a consistent state which can be accomplished by utilizing snapdrive to take the snapshot to ensure that the drive is consistent before taking the volume level snapshot.

Method:1

========

SnapRestore (requires license)- Restore an entire volume or a single LUN.

When a single LUN is restored, it must be taken offline or be unmapped prior to recovery. Using SnapRestore on a LUN, or on a volume that contains LUNs, without stopping all host access to those LUNs, can cause data corruption and system errors.

Remember, LUN restore is actually a Single File SnapRestore and is slower as WAFL has lot of work with specific blocks. This process can take longer time depending upon the LUN size.

Syntax:

-----------

snap restore [-t file] [-s snapshot_name] [-r restore_as_path] path_and_LUN_name

Example:

--------------

snap restore -t file -s snapshot.1 /vol/volA/my_luns

Method:2

========

Lun clone (requires license)- As pradeep mentioned

aleksandar_stefanov
11,627 Views

Just to add: LUN clone doesn't require license.

RAVI_PALADUGU
11,627 Views

Thats right, it is a feature. I mixed it with flexclone.

Public