Network and Storage Protocols

Create/destroy LUN

TAIF_TYPHOONS
7,271 Views

We are experiencing great difficulty is trying to create a LUN as the file already exists!!! The error reported is: `lun_path must not be in use as a file` Also we cannot destroy the lun as `no such lun exists`. The lun was previously there (snapmirrored and in-sync) but due to a hard disk failure we had to swap the disk out and as a result of this swap the lun seems to have disappeared. Any help in resolving this issue would be greatly appreciated.

16 REPLIES 16

radek_kubka
7,229 Views

Hi and welcome to the Community!

Can you mount a volume containing this left-over LUN via either CIFS, or NFS & check whether you can see this LUN as a file & consequently delete it?

Regards,

Radek

aborzenkov
7,229 Views

Actually it is possible to create LUN from a file. May be worth a try before finally removing it

TAIF_TYPHOONS
7,229 Views

Radek

Thank you for your reply.

I have very little experience with netapp.  Pretty much self taught!  The system I am working on is a test system,so I can play around with it.  Do I have to create a new volume to mount and how do I go about mounting it?  I can find no mount command in filer view orin my terminal window under help!  I have tried to recreate my missing LUN named /vol/vol_dc03/dc03.lun but get the error “lun_path must not be in use as a file”. When I try to destroy the LUN I get the error “lun does not exist”.  I must admit I am at a bit baffled by it now.  This LUN was up and running until afew days ago until we had a hardware failure.

How do you create a LUN form file?

My time zone is GMT plus 3 so I had left work before I received your last reply.

Thank you for your help.

aborzenkov
7,229 Views

I can find no mount command in filer view orin my terminal window

You mount volume on host, not on filer. On filer you share it (CIFS) or export it (NFS)

How do you create a LUN form file?

Just specify file path when creating a LUN. Beware, LUN content will be whatever garbage happens to be in file right now But in the worst case you may be able to delete it again using "lun destroy"

lun create -f <file_path> -t <ostype> [ -o noreserve ] [ -e space_alloc ] <lun_path>

TAIF_TYPHOONS
7,229 Views

aborzenkov

Thank you for your help.

Here is the command I used and the error.

MSSTRNGNAC1S1>lun create -f /vol/vol_dc03/ -t windows -o noreserve /vol/vol_dc03/dc03.lun

luncreate: File already exists at /vol/vol_dc03/dc03.lun

luncreate: lun_path must not be in use as a file

MSSTRNGNAC1S1>

Is there a Netapp for Dummies, because I don't know what this is telling me HELP!!!!

aborzenkov
7,230 Views

Please show result of “lun show -v” on filer.

TAIF_TYPHOONS
7,230 Views

MSSTRNGNAC1S1>lun show -v

        /vol/vol_dc01/dc01.lun      15.0g (16113323520)   (r/w, online, mapped)

                Serial#: P3X7K4W-jP3s

                Share: none

                Space Reservation: enabled

                Multiprotocol Type: windows

                Maps: group_FC=1

        /vol/vol_grid/grid.lun      25.0g (26847313920)   (r/w, online, mapped)

                Serial#: P3X7K4W-jsge

                Share: none

                Space Reservation: enabled

                Multiprotocol Type: windows

                Maps: group_FC=5

        /vol/vol_iSCSI/bd_ora.lun  400.1g (429557022720)  (r/w, online, mapped)

                Comment: "ASM LUN Site1for Oracle RAC"

                Serial#: P3X7K4StA0mL

                Share: none

                Space Reservation: enabled

                Multiprotocol Type: windows

                Maps: Group_ISCSI=13

        /vol/vol_iSCSI/ocr1.lun      1.0g (1077511680)    (r/w, online, mapped)

                Comment: "OCR LUN Site1for Oracle RAC"

                Serial#: P3X7K4StA0mJ

               Share: none

                Space Reservation: enabled

                Multiprotocol Type: windows

                Maps: Group_ISCSI=17

        /vol/vol_iSCSI/voting1.lun    1.0g (1077511680)    (r/w, online, mapped)

                Comment: "Voting LUN Site1for Oracle RAC"

                Serial#: P3X7K4StA0tH

                Share: none

                Space Reservation: enabled

                Multiprotocol Type: windows

                Maps: Group_ISCSI=15

        /vol/vol_ifmb/ifmb.lun      25.0g (26847313920)   (r/w, online, mapped)

                Serial#: P3X7K4W-k-Gm

                Share: none

                Space Reservation: enabled

                Multiprotocol Type: windows

                Maps: group_FC=7

        /vol/vol_rac01/rac01.lun    25.0g (26847313920)   (r/w, online, mapped)

                Serial#: P3X7K4W-kEY8

                Share: none

                Space Reservation: enabled

                Multiprotocol Type: windows

                Maps: group_FC=3

        /vol/vol_rac02/rac02.lun    25.0g (26847313920)   (r/o, online)

                Serial#: P3X7K4UuJmjy

                Share: none

                Space Reservation: enabled (nothonored by containing Aggregate)

                Multiprotocol Type: windows

MSSTRNGNAC1S1>lun show

        /vol/vol_dc01/dc01.lun      15.0g (16113323520)   (r/w, online, mapped)

        /vol/vol_grid/grid.lun      25.0g (26847313920)   (r/w, online, mapped)

        /vol/vol_iSCSI/bd_ora.lun  400.1g (429557022720)  (r/w, online, mapped)

        /vol/vol_iSCSI/ocr1.lun      1.0g (1077511680)    (r/w, online, mapped)

        /vol/vol_iSCSI/voting1.lun    1.0g (1077511680)    (r/w, online, mapped)

        /vol/vol_ifmb/ifmb.lun      25.0g (26847313920)   (r/w, online, mapped)

        /vol/vol_rac01/rac01.lun    25.0g (26847313920)   (r/w, online, mapped)

        /vol/vol_rac02/rac02.lun    25.0g (26847313920)   (r/o, online)

MSSTRNGNAC1S1>

aborzenkov
7,231 Views

Is volume vol_dc03 online? “vol status”?

TAIF_TYPHOONS
7,231 Views

Yes it is online.  Should I take it offline?

radek_kubka
5,776 Views

It looks like the file is there, but it's not recognised as a LUN.

There is a rm command in advanced mode - I think this is the way you can get rid of the file in question without using CIFS or NFS mounts:

> priv set advanced

> rm /vol/vol_dc03/dc03.lun

> priv set

Regards,

Radek

TAIF_TYPHOONS
5,777 Views

Radek

If I use this command, will it get rid of the information contained on this LUN or is the information on my vol_dc03 ?

DC03 was my domain controller, so I would like to recreate this LUN if possible.

Thanks for your reply

radek_kubka
5,777 Views

That would destroy your LUN & all the data it holds. If you want to preserve it, then it's a different kettle of fish.

Have you got any snapshots of this volume?

> snap list vol_dc03

If there is nothing else in that volume, you may try doing volume snap restore & see whether your LUN becomes usable again.

aborzenkov
5,777 Views

It could also be possible to do lun clone (or flex clone) which is less destructive.

TAIF_TYPHOONS
5,777 Views

aborzenkov / radek

Thanks for your help today.

I am about to finish for the day and I do not work Thursday/Friday.  I will be back in on Saturday.

If we clone or flex clone the LUN can I keep the same name?  As I said before DC03 was my domain controller, so I would like to try and recover it somehow.

Here is the output from snap list vol_dc03

MSSTRNGNAC1S1>snap list vol_dc03

Volumevol_dc03

working...

  %/used      %/total  date          name

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

  0% ( 0%)   0% ( 0%)  Aug 17 14:14  MSSTRNGNAC1S1(0135055424)_vol_dc03.64

  0% ( 0%)   0% ( 0%)  Aug 17 14:11  MSSTRNGNAC1S1(0135055424)_vol_dc03.63

  0% ( 0%)   0% ( 0%)  Aug 17 14:00  hourly.0

  0% ( 0%)   0% ( 0%)  Aug 17 13:00  hourly.1

  0% ( 0%)   0% ( 0%)  Aug 17 12:00  hourly.2

  0% ( 0%)   0% ( 0%)  Aug 17 11:00  hourly.3

  0% ( 0%)   0% ( 0%)  Aug 17 09:00  hourly.4

  0% ( 0%)   0% ( 0%)  Aug 17 08:00  hourly.5

  0% ( 0%)   0% ( 0%)  Aug 17 07:00  hourly.6

  0% ( 0%)   0% ( 0%)  Aug 17 06:00  hourly.7

  0% ( 0%)   0% ( 0%)  Aug 17 05:00  hourly.8

  0% ( 0%)   0% ( 0%)  Aug 17 04:00  hourly.9

  0% ( 0%)   0% ( 0%)  Aug 17 03:00  hourly.10

  0% ( 0%)   0% ( 0%)  Aug 17 02:00  hourly.11

  0% ( 0%)   0% ( 0%)  Aug 17 01:00  hourly.12

  0% ( 0%)   0% ( 0%)  Aug 17 00:00  nightly.0

  0% ( 0%)   0% ( 0%)  Aug 16 23:00  hourly.13

  0% ( 0%)   0% ( 0%)  Aug 16 22:00  hourly.14

  0% ( 0%)   0% ( 0%)  Aug 16 21:00  hourly.15

  0% ( 0%)   0% ( 0%)  Aug 16 20:00  hourly.16

  0% ( 0%)   0% ( 0%)  Aug 16 19:00  hourly.17

  0% ( 0%)   0% ( 0%)  Aug 16 18:00  hourly.18

  0% ( 0%)   0% ( 0%)  Aug 16 17:00  hourly.19

  0% ( 0%)   0% ( 0%)  Aug 16 16:00  hourly.20

  0% ( 0%)   0% ( 0%)  Aug 16 15:00  hourly.21

  0% ( 0%)   0% ( 0%)  Aug 16 14:00  hourly.22

  0% ( 0%)   0% ( 0%)  Aug 16 13:00  hourly.23

  0% ( 0%)   0% ( 0%)  Aug 15 00:00  weekly.0

MSSTRNGNAC1S1>

There does not appear to be anything in them!  Is this normal? Are the two at the top a baseline?  This problem has been on the system for over a week.  It is not stopping me from working as it is a test system but I would like to fix it.

Once again thank you both for your help.

radek_kubka
5,777 Views

OK, so you can first delete the corrupted LUN / file as per commands already listed & then do LUN clone:

http://now.netapp.com/NOW/knowledge/docs/ontap/rel733/html/ontap/bsag/GUID-3044DAB1-02C1-4915-85CF-E16DD8883C04.html

There is a KB article along these lines, which may explain why the issue have occurred, but it is not accessible at the moment (for whatever reason):

LUN does not show up in lun show output after it is restored from tape

... of the volume containing the LUN file. Perform a lun clone create from that snapshot LUN file. This will recreate the metadata. lun clone create [ -o noreserve ] -b

https://kb.netapp.com/support/index?page=content&id=2012496

Content Source: Knowledgebase Articles

aborzenkov
4,887 Views

If I read this KB correctly, LUN is not necessarily corrupt. So may be deleting could still be avoided. It actually suggests creating snapshot of current state and then doing lun cloning from it.

Public