Total Pageviews

Friday, 18 November 2011

Linux系统的VPS数据恢复手记

如下是恢复结果;首先弄个跟原来系统不一样的VPS,目的是要不同的卷组名
以前用的是centos 32bit、现在用的是centos 64bit、然后将原来的硬盘分离后挂在新的VPS上
1.vgscan|grep -i volgroup #查找卷标
激活
2.vgchange --available y 卷标名
3. mount /dev/卷标/目录 /要挂的目录,接着出现错误
mount: wrong fs type, bad option, bad superblock on /dev/VolGroup00/LogVol00
尝试修复
4.fsck -b /dev/VolGroup00/LogVol00
然后打印superblocks信息
5.dumpe2fs /dev/VolGroup00/LogVol00
重启接着再来一次mount
再打印suprtblocks信息
[root@MyVPS2098 /]# fsck /dev/VolGroup00/LogVol00
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
/dev/VolGroup00/LogVol00: clean, 230782/7010720 files, 1685264/7036928 blocks
接着赶紧mount
[root@MyVPS2098 /]# mount /dev/VolGroup00/LogVol00 /mnt
[root@MyVPS2098 /]# cd /mnt
[root@MyVPS2098 mnt]# ls
bin boot dev etc home lib lost+found media misc mnt net opt proc root sbin selinux srv sys tmp usr var

No comments:

Post a Comment