Current location:TranBon Blog > Homepage > technology > Customer data recovery

Customer data recovery

adminis5 years ago (2021-02-23)technology72590

If the customer's hard drive has a problem, or the operating system does not work, you can remove the hard drive and plug it into a installed CentOS, which is the name of the LVM volume group when installedDon't use the name VolGroup, because such a name often conflicts with the customer's default name.


After plugging in the hard drive, use lsblk to check the SDB of the customer's hard drive


[root@localhost ~]# lsblk 
NAME                        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdb                           8:0    0 465.8G  0 disk 
├─sdb1                        8:1    0   500M  0 part /boot
└─sdb2                        8:2    0 465.3G  0 part 
  ├─VolGroup-lv_root (dm-0) 253:0    0 461.3G  0 lvm  /

  └─VolGroup-lv_swap (dm-1) 253:1    0     4G  0 lvm  [SWAP]


Scan the vg volume group name, which is the default vg group name in CentOSVolGroup,Make sure that the group name of the machine does not duplicate it

vgscan


Activate the customer's LVM partition first, if the customer does not have LVM, this step does not need to be done.

vgchange -ay /dev/vg volume group name,


Here the case should be

vgchange -ay /dev/VolGroup


After creating a directory, you will put customer data on these two directories
mkdir /mnt/sdb1

mkdir /mnt/VolGroup-lv_root


Hang out the user's /boot partition

mount /dev/sdb1 /mnt/sdb1


Hang out the user's /partition

mount /dev/VolGroup/lv_root /mnt/VolGroup-lv_root


Examine:

df -TH

You should see /dev/sdb1 and /dev/VolGroup/lv_root

If you don't see it, it proves that the mount was not successful.


After the mounting is successful, continue with the following operations:


The user's /boot file is in the following directory:

/mnt/sdb1


Check if there are any files, and if not, it proves that the customer's kernel files have been deleted.

ll /mnt/sdb1


If there are files, look at the directory size

du -sh /mnt/sdb1


The user's/files are in the following directories:

/mnt/VolGroup-lv_root


Check the root directory of the original customer's hard drive to see if there are any files there

ll /mnt/VolGroup-lv_root


If there are files, look at the directory size

du -sh /mnt/VolGroup-lv_root


It is more common to repair two files
/mnt/VolGroup-lv_root/etc/fstab
/mnt/sdb1/grub/grub.conf
Both of these files are related to system boot


There is a Taoist note  https://note.youdao.com/ynoteshare/index.html?id=297075bfbb306285d67265c61bf6de0a

Article 10 Random Copyright
Article Disclaimer
  • 尊敬的读者:
  • 本文所提供的信息、观点及数据均来源于公开资料、相关研究报告及个人理解,仅供读者参考。本文不代表任何官方立场或专业机构的意见,亦不构成任何投资建议或决策依据。
  • 在撰写本文时,我们已尽力确保信息的准确性和完整性,但鉴于信息来源的多样性及可能存在的误差,我们无法保证本文所述内容在任何时刻都绝对准确无误。因此,读者在阅读本文时,应结合自身实际情况及专业知识,进行独立分析和判断。
  • 对于因本文信息不准确、不完整或读者自身理解偏差而导致的任何损失或损害,我们概不负责。同时,我们也不承担因本文所述内容引发的任何法律责任或纠纷。
  • 此外,本文可能包含对特定公司、行业或市场的分析和预测,这些分析和预测均基于当前市场环境及可获得的信息,并可能受到多种因素的影响而发生变化。因此,读者在参考本文时,应充分考虑这些潜在的风险和不确定性。
  • 我们鼓励读者在阅读本文后,进一步查阅相关资料和咨询专业人士,以获取更全面、准确的信息和建议。同时,我们也欢迎读者就本文内容提出宝贵的意见和建议,以便我们不断改进和提升文章质量。
  • 最后,感谢读者对本文的关注和阅读。我们希望通过提供有价值的信息和观点,为读者在相关领域的学习和决策提供一定的帮助和参考。但请务必记住,本文所述内容仅供参考,不构成任何具体建议或承诺。
  • 特此声明。
阅读剩余的68%

Scan the QR code to push to your mobile phone access.

Copyright Notice: This article is written byTranBon BlogPublished, if you need to reprint, please indicate the source.

Link to this article:https://cb.tranbon.com/?id=285

Related articles on Customer Data Recovery

Install Zabbix monitoring on Centos 7

Install Zabbix monitoring on Centos 7

1. Close selinux and iptables && Install Zabbix rpm package repository && Install zabbix-server-mysql and zabbix-web-mysql &> Install and start mysql5.6 and database information security initialization, set database root password, etc.

vi Editor Tutorial

There are many text editors under http://blog.sina.com.cn/s/blog_736f1c59010136ry.htmlhttp://blog.csdn.net/lanxinju/article/details/5731843Linux, vi is the most commonly used and standard on all versions of Linux. Note, vi...

SSR deploys scripts with one click

A comma script written ssr.sh script description: ShadowsocksR One-click installation/management script, support single-port/multi-port switching and management system support: CentOS6+ / Debian6+ / Ubuntu14+ Usage: https://doub.io/ss-jc42/ Project address: https://...

Leave a comment

visitor

私密评论
加载验证码中...

◎ Welcome to participate in the discussion, please express your views and opinions here.
简体中文繁體中文English한국어日本語DeutschрусскийبالعربيةTÜRKÇEportuguêsคนไทยFrançais