GET LOST DATA FROM CORRUPTED OPENFILER MACHINE

I have small datacenter at my home and i use FreeNAS & OpenFiler for managing SAN/NAS storage with VMWare ESXi/vCenter.

My OpenFiler server OS was corrupted so i needed to recover the data from the server after making new installation of OpenFiler.

OpenFiler use LVM to mount & manage the storage partitions and here is the steps to mount the lost partitions and backup your data.

Before start the recovery procedures, you must first reinstall new version of OpenFiler on the machine but don’t format the data partitions. Only install on the OS partition. Because total erase will destroy your data.

  • Login to the new OpenFiler using root
  • Scan for all LVM partitions on the system.
[root@localhost ~]# lvmdiskscan
  /dev/sda1         [     298.05 MiB]
  /dev/sdb1         [     190.73 GiB] LVM physical volume
  /dev/sdc1         [     476.83 GiB] LVM physical volume
  /dev/sdd1         [     143.05 GiB] LVM physical volume
  /dev/sde1         [     123.97 GiB] LVM physical volume
  /dev/sdf1         [     114.44 GiB] LVM physical volume
  4 disks
  18 partitions
  0 LVM physical volume whole disks
  5 LVM physical volumes

  • Scan for LVM mappings
[root@localhost ~]# lvscan
  ACTIVE            '/dev/nas/download' [190.72 GiB] inherit
  ACTIVE            '/dev/nas/archive' [715.22 GiB] inherit
  ACTIVE            '/dev/nas/backups' [143.03 GiB] inherit
  • Activate LVM volumes manually
[root@localhost ~]# vgchange -ay
  3 logical volume(s) in volume group "nas" now active
  • Mount each volume one by one and then backup them using SCP command on network to another machine or mount external storage and use CP command
mount /dev/nas/backups /mnt/backup
mount /dev/nas/archive/mnt/archive
mount /dev/nas/download/mnt/download

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: