ASM使用dd恢复数据

实验环境:

Disk /dev/sdb: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1246    10008463+  83  Linux
/dev/sdb2            1247        2492    10008495   83  Linux
/dev/sdb3            2493        3738    10008495   83  Linux
/dev/sdb4            3739        5221    11912197+  83  Linux

Disk /dev/sdc: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        1246    10008463+  83  Linux
/dev/sdc2            1247        2492    10008495   83  Linux
/dev/sdc3            2493        3738    10008495   83  Linux
/dev/sdc4            3739        5221    11912197+  83  Linux
[root@dbserver ~]# 

磁盘组ARCH对应磁盘/dev/sdb4。



1.新建磁盘组ARCH2对应磁盘/dev/sdc4.


2.备份/dev/sdc4磁盘头(2个au,默认即2M)

[root@dbserver eisoo]# dd if=/dev/sdc4 of=/eisoo/sdc4_2097152 bs=2097152 count=1
1+0 records in
1+0 records out
2097152 bytes (2.1 MB) copied, 0.04031 seconds, 52.0 MB/s


3.将/dev/sdbb4磁盘全部dd到/dev/sdc4

[root@dbserver eisoo]# dd if=/dev/sdb4 of=/dev/sdc4 bs=209715200
58+1 records in
58+1 records out
12198090240 bytes (12 GB) copied, 354.003 seconds, 34.5 MB/s


4.将备份的/dev/sdc4磁盘头覆盖到/dev/sdc4

[root@dbserver eisoo]# dd if=/eisoo/sdc4_2097152 of=/dev/sdc4 bs=2097152 count=1 conv=notrunc
1+0 records in
1+0 records out
2097152 bytes (2.1 MB) copied, 0.087591 seconds, 23.9 MB/s



################################################################################

2-4步也可参照以下1步实现,注意skip和seek后接BLOCKS。

[root@dbserver eisoo]# dd if=/dev/sdb4 of=/dev/sdc4 bs=2097152 skip=1 seek=1
11910149+1 records in
11910149+1 records out
12195993088 bytes (12 GB) copied, 402.23 seconds, 30.3 MB/s

################################################################################


至此ARCH恢复到ARCH2,ARCH2只能供临时拷贝数据,不能重启,重启会报错,待研究。





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值