您的位置:首页 > 其它

如何恢复误删除硬盘数据

2009-05-27 16:10 411 查看
1.LVM:

[root@vmfs ~]# pvdisplay
--- Physical volume ---
PV Name /dev/sdg
VG Name db_v4
PV Size 2.00 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 511
Free PE 1
Allocated PE 510
PV UUID MlB8lE-H3DL-RCcf-p5Di-J6A2-INLc-zw328m

--- Physical volume ---
PV Name /dev/sdf
VG Name db_v3
PV Size 2.00 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 511
Free PE 115
Allocated PE 396
PV UUID 2KsemU-DsQQ-GR8k-nnR2-Zm7M-nUCb-yXuUR5

--- Physical volume ---
PV Name /dev/sdb
VG Name db_v1
PV Size 2.00 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 511
Free PE 0
Allocated PE 511
PV UUID f7c3iL-08Yg-AUZh-GWSb-PGxJ-seug-TBILHb

--- Physical volume ---
PV Name /dev/sdc
VG Name db_v1
PV Size 2.00 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 511
Free PE 0
Allocated PE 511
PV UUID SpCrXu-0bCr-gkEK-oa4F-DGKG-yEwB-CrI4lL

--- Physical volume ---
PV Name /dev/sde
VG Name db_v1
PV Size 2.00 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 511
Free PE 5
Allocated PE 506
PV UUID KiAUrY-03Fq-2mAs-XLv0-rUTE-G3QY-9zviSz

[root@vmfs ~]#
[root@vmfs ~]# vgdisplay
--- Volume group ---
VG Name db_v4
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 5
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 2.00 GB
PE Size 4.00 MB
Total PE 511
Alloc PE / Size 510 / 1.99 GB
Free PE / Size 1 / 4.00 MB
VG UUID HQ0HKt-BHCi-ZRj3-5wYi-3rvX-hGUB-f8upCl

--- Volume group ---
VG Name db_v3
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 10
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 9
Open LV 6
Max PV 0
Cur PV 1
Act PV 1
VG Size 2.00 GB
PE Size 4.00 MB
Total PE 511
Alloc PE / Size 396 / 1.55 GB
Free PE / Size 115 / 460.00 MB
VG UUID UbY7vf-K8ZO-Pkrl-3emq-OlAw-SKbs-c0knIz

--- Volume group ---
VG Name db_v1
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 16
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 12
Open LV 5
Max PV 0
Cur PV 3
Act PV 3
VG Size 5.99 GB
PE Size 4.00 MB
Total PE 1533
Alloc PE / Size 1528 / 5.97 GB
Free PE / Size 5 / 20.00 MB
VG UUID 1GuWH5-GnRn-bNAT-2Qvl-nLjB-1kRC-qGEduC

[root@vmfs ~]#
[root@vmfs ~]# lvdisplay
--- Logical volume ---
LV Name /dev/db_v4/db_d_22
VG Name db_v4
LV UUID pJ22Bv-d6ZY-EEXb-Mnwg-J0X0-clxz-XD7gNz
LV Write Access read/write
LV Status available
# open 0
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0

--- Logical volume ---
LV Name /dev/db_v4/db_d_23
VG Name db_v4
LV UUID y6oioQ-HfM0-ZsWZ-JDLd-888n-eIpq-vea1Xg
LV Write Access read/write
LV Status available
# open 0
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1

--- Logical volume ---
LV Name /dev/db_v4/db_d_24
VG Name db_v4
LV UUID DaJ04V-K2z2-rgYX-oC9O-10Aq-MEsr-bT1iGI
LV Write Access read/write
LV Status available
# open 0
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:2

--- Logical volume ---
LV Name /dev/db_v4/db_d_25
VG Name db_v4
LV UUID Gr2DEB-MiW2-gUoZ-Dbl4-VF9u-QSEj-uQ5i34
LV Write Access read/write
LV Status available
# open 0
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:3

--- Logical volume ---
LV Name /dev/db_v4/db_d_26
VG Name db_v4
LV UUID m3r7rX-63Us-aAyy-pPYM-t0UK-8kUo-YVKzee
LV Write Access read/write
LV Status available
# open 0
LV Size 40.00 MB
Current LE 10
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:4

--- Logical volume ---
LV Name /dev/db_v3/db_d_13_ct1
VG Name db_v3
LV UUID wxQnSc-Tw7W-wB26-eU28-1z3m-B55g-Fy2wY0
LV Write Access read/write
LV Status available
# open 5
LV Size 12.00 MB
Current LE 3
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:5

--- Logical volume ---
LV Name /dev/db_v3/db_d_14_ct2
VG Name db_v3
LV UUID 5bFZQ2-VTZ2-cP2z-mhdS-NQwS-wUCz-tgRBf6
LV Write Access read/write
LV Status available
# open 5
LV Size 12.00 MB
Current LE 3
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:6

--- Logical volume ---
LV Name /dev/db_v3/db_d_15_ct3
VG Name db_v3
LV UUID g8qV9F-tEqb-jhjK-MnDX-6mhC-eFvS-k61vD0
LV Write Access read/write
LV Status available
# open 5
LV Size 12.00 MB
Current LE 3
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:7

--- Logical volume ---
LV Name /dev/db_v3/db_d_16_redo1
VG Name db_v3
LV UUID f9m2q6-cQS6-hT4a-bkHN-3Uty-sU5m-uiSA23
LV Write Access read/write
LV Status available
# open 1
LV Size 16.00 MB
Current LE 4
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:8

--- Logical volume ---
LV Name /dev/db_v3/db_d_17_redo2
VG Name db_v3
LV UUID z6ML9F-f9CS-lZir-tB1P-Pos6-nx1P-oTmwUG
LV Write Access read/write
LV Status available
# open 1
LV Size 16.00 MB
Current LE 4
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:9

--- Logical volume ---
LV Name /dev/db_v3/db_d_18_redo3
VG Name db_v3
LV UUID 4mlhZT-yC5V-GdG3-GMvw-wy0R-5Rjj-XQfXdV
LV Write Access read/write
LV Status available
# open 1
LV Size 16.00 MB
Current LE 4
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:10

--- Logical volume ---
LV Name /dev/db_v3/db_d_19
VG Name db_v3
LV UUID Q9aq8B-tItF-W5WK-3qK7-Puf9-lNgz-WdP3V3
LV Write Access read/write
LV Status available
# open 0
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:11

--- Logical volume ---
LV Name /dev/db_v3/db_d_20
VG Name db_v3
LV UUID T3N4pT-7opN-AJ5Q-gCHT-VM5u-myU9-XzUWA5
LV Write Access read/write
LV Status available
# open 0
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:12

--- Logical volume ---
LV Name /dev/db_v3/db_d_21
VG Name db_v3
LV UUID LBMWNB-v3ue-C0CX-nYUk-37st-5ZAy-8st77n
LV Write Access read/write
LV Status available
# open 0
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:13

--- Logical volume ---
LV Name /dev/db_v1/db_d_1
VG Name db_v1
LV UUID xdL2VV-025b-oMBW-lUh2-RKbg-I39L-0KK3zA
LV Write Access read/write
LV Status available
# open 15
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:14

--- Logical volume ---
LV Name /dev/db_v1/db_d_2
VG Name db_v1
LV UUID pUfUJJ-3rPH-a410-kT7m-G1Uy-2fQV-5GgOAf
LV Write Access read/write
LV Status available
# open 10
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:15

--- Logical volume ---
LV Name /dev/db_v1/db_d_3
VG Name db_v1
LV UUID sMQ39s-ta1o-z1VE-Hjhz-C3M1-edrd-X3phd5
LV Write Access read/write
LV Status available
# open 4
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:16

--- Logical volume ---
LV Name /dev/db_v1/db_d_4
VG Name db_v1
LV UUID i0ts9Q-3NSb-d2KT-GUXW-lVsj-agg1-jsOFGy
LV Write Access read/write
LV Status available
# open 11
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:17

--- Logical volume ---
LV Name /dev/db_v1/db_d_5
VG Name db_v1
LV UUID 9Ek4hK-dR8B-LzPo-VYrR-VCa3-2dFB-UxcEzg
LV Write Access read/write
LV Status available
# open 4
LV Size 800.00 MB
Current LE 200
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:18

--- Logical volume ---
LV Name /dev/db_v1/db_d_6
VG Name db_v1
LV UUID R52bvE-3Nbd-rPLp-ZczY-M0q4-WwnO-pjrBhv
LV Write Access read/write
LV Status available
# open 0
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:19

--- Logical volume ---
LV Name /dev/db_v1/db_d_7
VG Name db_v1
LV UUID RGfede-6dij-0Vio-XbS2-p9qd-TkaL-X3yPpz
LV Write Access read/write
LV Status available
# open 0
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:20

--- Logical volume ---
LV Name /dev/db_v1/db_d_8
VG Name db_v1
LV UUID trLwjN-cIp7-P7lS-zeHi-14Vn-Z4t3-9RDJT1
LV Write Access read/write
LV Status available
# open 0
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:21

--- Logical volume ---
LV Name /dev/db_v1/db_d_9
VG Name db_v1
LV UUID llpqI9-RJQa-JD9F-UZET-1fDM-G9sX-7guqtu
LV Write Access read/write
LV Status available
# open 0
LV Size 500.00 MB
Current LE 125
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:22

--- Logical volume ---
LV Name /dev/db_v1/db_d_10
VG Name db_v1
LV UUID 0xfKTR-bIrt-qG7R-48fZ-GUX1-NUxn-QChbPb
LV Write Access read/write
LV Status available
# open 0
LV Size 1000.00 MB
Current LE 250
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:23

--- Logical volume ---
LV Name /dev/db_v1/db_d_11
VG Name db_v1
LV UUID tzAGb6-DEqq-haK8-pU23-HneT-Hes5-F10lQE
LV Write Access read/write
LV Status available
# open 0
LV Size 300.00 MB
Current LE 75
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:24

--- Logical volume ---
LV Name /dev/db_v1/db_d_12_sp
VG Name db_v1
LV UUID ev0MBI-mnDx-zsAJ-OOUQ-RSyn-PcaQ-VNydho
LV Write Access read/write
LV Status available
# open 0
LV Size 12.00 MB
Current LE 3
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:25

[root@vmfs ~]#

2.Raw devices configuration

vmfs-> cat /etc/sysconfig/rawdevices
# This file and interface are deprecated.
# Applications needing raw device access should open regular
# block devices with O_DIRECT.
# raw device bindings
# format: <rawdev> <major> <minor>
# <rawdev> <blockdev>
# example: /dev/raw/raw1 /dev/sda1
# /dev/raw/raw2 8 5

##add by hxg
/dev/raw/raw1 /dev/db_v1/db_d_12_sp
/dev/raw/raw2 /dev/db_v3/db_d_13_ct1
/dev/raw/raw3 /dev/db_v3/db_d_14_ct2
/dev/raw/raw4 /dev/db_v3/db_d_15_ct3
/dev/raw/raw5 /dev/db_v3/db_d_16_redo1
/dev/raw/raw6 /dev/db_v3/db_d_17_redo2
/dev/raw/raw7 /dev/db_v3/db_d_18_redo3
/dev/raw/raw8 /dev/db_v1/db_d_1
/dev/raw/raw9 /dev/db_v1/db_d_2
/dev/raw/raw10 /dev/db_v1/db_d_3
/dev/raw/raw11 /dev/db_v1/db_d_4
/dev/raw/raw12 /dev/db_v1/db_d_5
/dev/raw/raw13 /dev/db_v1/db_d_6
/dev/raw/raw14 /dev/db_v1/db_d_7
/dev/raw/raw15 /dev/db_v1/db_d_8
/dev/raw/raw16 /dev/db_v1/db_d_9
/dev/raw/raw17 /dev/db_v1/db_d_10
/dev/raw/raw18 /dev/db_v1/db_d_11
/dev/raw/raw19 /dev/db_v3/db_d_19
/dev/raw/raw20 /dev/db_v3/db_d_20
/dev/raw/raw21 /dev/db_v3/db_d_21
/dev/raw/raw22 /dev/db_v4/db_d_22
/dev/raw/raw23 /dev/db_v4/db_d_23
/dev/raw/raw24 /dev/db_v4/db_d_24
/dev/raw/raw25 /dev/db_v4/db_d_25
/dev/raw/raw26 /dev/db_v4/db_d_26

vmfs->
vmfs->
vmfs-> cd /fs/demo/
vmfs-> ll
total 0
lrwxrwxrwx 1 oracle oinstall 13 Apr 5 14:40 demo_ctl1 -> /dev/raw/raw2
lrwxrwxrwx 1 oracle oinstall 13 Apr 5 14:40 demo_ctl2 -> /dev/raw/raw3
lrwxrwxrwx 1 oracle oinstall 13 Apr 5 14:40 demo_ctl3 -> /dev/raw/raw4
lrwxrwxrwx 1 oracle oinstall 14 Apr 5 14:40 demo_pwd -> /dev/raw/raw13
lrwxrwxrwx 1 oracle oinstall 13 Apr 5 14:40 demo_redo1 -> /dev/raw/raw5
lrwxrwxrwx 1 oracle oinstall 13 Apr 5 14:40 demo_redo2 -> /dev/raw/raw6
lrwxrwxrwx 1 oracle oinstall 13 Apr 5 14:40 demo_redo3 -> /dev/raw/raw7
lrwxrwxrwx 1 oracle oinstall 13 Apr 5 14:40 demo_spfile -> /dev/raw/raw1
lrwxrwxrwx 1 oracle oinstall 13 Apr 5 14:40 sysaux_dbf1 -> /dev/raw/raw9
lrwxrwxrwx 1 oracle oinstall 13 Apr 5 14:40 system_dbf1 -> /dev/raw/raw8
lrwxrwxrwx 1 oracle oinstall 14 Apr 5 14:40 temptbs_dbf -> /dev/raw/raw12
lrwxrwxrwx 1 oracle oinstall 14 Apr 5 14:40 undotbs_dbf -> /dev/raw/raw11
lrwxrwxrwx 1 oracle oinstall 14 Apr 5 14:40 users_dbf1 -> /dev/raw/raw10
vmfs->

vmfs-> cat /u01/oracle_raw.conf
system=/fs/demo/system_dbf1
sysaux=/fs/demo/sysaux_dbf1
undotbs1=/fs/demo/undotbs_dbf
users=/fs/demo/users_dbf1
temp=/fs/demo/temptbs_dbf
redo1_1=/fs/demo/demo_redo1
redo1_2=/fs/demo/demo_redo2
redo1_3=/fs/demo/demo_redo3
control1=/fs/demo/demo_ctl1
control2=/fs/demo/demo_ctl2
control3=/fs/demo/demo_ctl3
spfile=/fs/demo/demo_spfile
pwdfile=/fs/demo/demo_pwd

/etc/udev/permissions.d/50-udev.permissions

# raw devices
ram*:root:disk:0660
#raw/*:root:disk:0660
raw/*:oracle:dba:0660

3.

ln -s

ln -s /dev/raw/raw1 /fs/demo/demo_spfile
ln -s /dev/raw/raw2 /fs/demo/demo_ctl1
ln -s /dev/raw/raw3 /fs/demo/demo_ctl2
ln -s /dev/raw/raw4 /fs/demo/demo_ctl3
ln -s /dev/raw/raw5 /fs/demo/demo_redo1
ln -s /dev/raw/raw6 /fs/demo/demo_redo2
ln -s /dev/raw/raw7 /fs/demo/demo_redo3
ln -s /dev/raw/raw8 /fs/demo/system_dbf1
ln -s /dev/raw/raw9 /fs/demo/sysaux_dbf1
ln -s /dev/raw/raw10 /fs/demo/users_dbf1
ln -s /dev/raw/raw11 /fs/demo/undotbs_dbf
ln -s /dev/raw/raw12 /fs/demo/temptbs_dbf
ln -s /dev/raw/raw13 /fs/demo/demo_pwd
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: