By mistakenly deleted /dev/vg01/emspi Block file. (20 Views)
Reply
Frequent Advisor
B V B Kumar
Posts: 50
Registered: ‎07-19-2007
Message 1 of 12 (20 Views)

By mistakenly deleted /dev/vg01/emspi Block file.

Hi,

By mistakenly i have deleted the /dev/vg00/emspi logical volume block file.
For creating it again with "mknod" command, i was not remembering the minor number. How do i find minor number for /dev/vg01/emspi block file?

Immediate reply is highly appreciable.

Regards
Kumar
Honored Contributor
Robert-Jan Goossens
Posts: 7,384
Registered: ‎04-04-2000
Message 2 of 12 (20 Views)

Re: By mistakenly deleted /dev/vg01/emspi Block file.

Hi Kumar,

Could you post the ll of /dev/vg00/?

# ll /dev/vg00/

Regards,
Robert-Jan
Advisor
Badri
Posts: 31
Registered: ‎11-09-2004
Message 3 of 12 (20 Views)

Re: By mistakenly deleted /dev/vg01/emspi Block file.

the minor number should same for both raw and block device files.
Frequent Advisor
B V B Kumar
Posts: 50
Registered: ‎07-19-2007
Message 4 of 12 (20 Views)

Re: By mistakenly deleted /dev/vg01/emspi Block file.

Hi

Thanks for reply..

I got output like this.

br--r----- 1 root sys 64 0x000016 Mar 6 12:11 emslv
br--r----- 1 root sys 64 0x000014 Mar 4 16:30 emsrad
crw-r----- 1 root sys 64 0x000000 Jan 8 12:07 group
brw-r----- 1 root sys 64 0x000001 Jan 8 12:07 lvol1
brw-r----- 1 root sys 64 0x000002 Jan 8 12:07 lvol2
brw-r----- 1 root sys 64 0x000003 Jan 8 12:07 lvol3
brw-r----- 1 root sys 64 0x000004 Jan 8 12:07 lvol4
brw-r----- 1 root sys 64 0x000005 Jan 8 12:07 lvol5
brw-r----- 1 root sys 64 0x000006 Jan 8 12:07 lvol6
brw-r----- 1 root sys 64 0x000007 Jan 8 12:07 lvol7
brw-r----- 1 root sys 64 0x000008 Jan 8 12:07 lvol8
br--r----- 1 root sys 64 0x000009 Jan 30 16:19 mdappl
br--r----- 1 root sys 64 0x00000e Jan 30 16:19 mdarchivec
br--r----- 1 root sys 64 0x00000f Jan 30 16:19 mdarchiver
br--r----- 1 root sys 64 0x000010 Jan 30 16:19 mdbilling01
br--r----- 1 root sys 64 0x000011 Jan 30 16:19 mdbilling02
br--r----- 1 root sys 64 0x000012 Jan 30 16:19 mdbilling03
br--r----- 1 root sys 64 0x00000c Jan 30 16:19 mdcmmdb
br--r----- 1 root sys 64 0x00000a Jan 30 16:19 mddata
br--r----- 1 root sys 64 0x00000b Jan 30 16:19 mdlogs
br--r----- 1 root sys 64 0x00000d Jan 30 16:19 mdrealtime
br--r----- 1 root sys 64 0x000013 Feb 1 18:44 oraclelv
cr--r----- 1 root sys 64 0x000016 Mar 6 12:11 remslv
cr--r----- 1 root sys 64 0x000014 Mar 4 16:30 remsrad
crw-r----- 1 root sys 64 0x000001 Jan 8 12:07 rlvol1
crw-r----- 1 root sys 64 0x000002 Jan 8 12:07 rlvol2
crw-r----- 1 root sys 64 0x000003 Jan 8 12:07 rlvol3
crw-r----- 1 root sys 64 0x000004 Jan 8 12:07 rlvol4
crw-r----- 1 root sys 64 0x000005 Jan 8 12:07 rlvol5
crw-r----- 1 root sys 64 0x000006 Jan 8 12:07 rlvol6
crw-r----- 1 root sys 64 0x000007 Jan 8 12:07 rlvol7
crw-r----- 1 root sys 64 0x000008 Jan 8 12:07 rlvol8
cr--r----- 1 root sys 64 0x000009 Jan 30 16:19 rmdappl
cr--r----- 1 root sys 64 0x00000e Jan 30 16:19 rmdarchivec
cr--r----- 1 root sys 64 0x00000f Jan 30 16:19 rmdarchiver
cr--r----- 1 root sys 64 0x000010 Jan 30 16:19 rmdbilling01
cr--r----- 1 root sys 64 0x000011 Jan 30 16:19 rmdbilling02
cr--r----- 1 root sys 64 0x000012 Jan 30 16:19 rmdbilling03
cr--r----- 1 root sys 64 0x00000c Jan 30 16:19 rmdcmmdb
cr--r----- 1 root sys 64 0x00000a Jan 30 16:19 rmddata
cr--r----- 1 root sys 64 0x00000b Jan 30 16:19 rmdlogs
cr--r----- 1 root sys 64 0x00000d Jan 30 16:19 rmdrealtime
cr--r----- 1 root sys 64 0x000013 Feb 1 18:44 roraclelv
Honored Contributor
Jeeshan
Posts: 2,084
Registered: ‎11-05-2007
Message 5 of 12 (20 Views)

Re: By mistakenly deleted /dev/vg01/emspi Block file.

i think it may be 0x000015
a warrior never quits
Honored Contributor
Robert-Jan Goossens
Posts: 7,384
Registered: ‎04-04-2000
Message 6 of 12 (20 Views)

Re: By mistakenly deleted /dev/vg01/emspi Block file.

Hi agian,

Im missing number 15 ---> 0x000015

The safist way would be to restore the character and block device from backup. You could try the below commands, mount the lvol in read only and check if your data is available.

# cd /dev/vg00
# mknod emspi b 64 0x000015
# mknod remspi c 64 0x000015
# mount -o ro /dev/vg00/emspi /mnt
# cd /mnt
# ll

Regards,
Robert-Jan
Advisor
Badri
Posts: 31
Registered: ‎11-09-2004
Message 7 of 12 (20 Views)

Re: By mistakenly deleted /dev/vg01/emspi Block file.

Hi Kumar,

Please check for the minor number of the remspi from /dev/vg01. This should be same for the block device file also. Compare with other logical volumes in the vg.
Advisor
Badri
Posts: 31
Registered: ‎11-09-2004
Message 8 of 12 (20 Views)

Re: By mistakenly deleted /dev/vg01/emspi Block file.

Hi Kumar,

Please confrim in Vg the lvol should, in you r question you mentioned both vg00 and 01. if only the block device file is deleted, create the file with the same minor number of the raw device file of the same lvol.

Badri
Honored Contributor
Robert-Jan Goossens
Posts: 7,384
Registered: ‎04-04-2000
Message 9 of 12 (20 Views)

Re: By mistakenly deleted /dev/vg01/emspi Block file.

Good catch Badri!!!

Yes please also post the ll of /dev/vg01.
Frequent Advisor
B V B Kumar
Posts: 50
Registered: ‎07-19-2007
Message 10 of 12 (20 Views)

Re: By mistakenly deleted /dev/vg01/emspi Block file.

Hi All,

It is vg00 not vg01.

Thanks
Kumar
Super Advisor
Super Advisor
AVV
Posts: 211
Registered: ‎03-23-2008
Message 11 of 12 (20 Views)

Re: By mistakenly deleted /dev/vg01/emspi Block file.

Hi,

First just confirm which vg the lvol belong to. Then do

#ll /dev/vgxx -- vgxx is the vg from you deleted lv.

If you removed the bloch device file of the lv , you can see a raw device file concerned with that something like

brw-r----- 1 root sys 64 0x0000xx Jan 8 12:07 remspi --> last two xx would be the minor number of the lv you deleted.

If that is there create the block device file using mknod with the same minor number of resmpi.
mknod /dev/vg00/lvol2

#mknod /dev/vgxx/fsname b 64 minor-number-rfsname

Keep monitoring further updates if I missed any.

Thanks -ajeshvv
Advisor
Naveen M
Posts: 21
Registered: ‎09-14-2006
Message 12 of 12 (20 Views)

Re: By mistakenly deleted /dev/vg01/emspi Block file.

As per the output mentioned above, the minor number should be 0x000015.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.