• Webconn Technology
    • GPU Server
      • Dedicated GPU Servers with NVIDIA RTX/A100 GPUs for accelerated AI training, rendering, and scientific computing. Features CUDA cores, 24GB-141GB VRAM, and parallel processing. Pre-configured with TensorFlow/PyTorch.

      • nvidia rtx A6000
    • Dedicated Server
      • Experience blazing-fast speeds & ironclad security with your own dedicated server. No shared resources. Fully customizable plans for gaming, e-commerce, and big data. Start now!

      • datacenter
    • Shared Hosting
      • Get user-friendly DirectAdmin shared hosting for your website. Enjoy an intuitive control panel, one-click app installs, and reliable performance. Perfect for blogs, small business sites, and portfolios.

      • shared hosting web
    • Domains
      • Search and register the perfect domain name for your website. Get a memorable .com, .net, .org or niche TLD to start building your brand online. Includes free privacy protection.

    • VPS
      • Experience the power of a dedicated server without the high cost. Our VPS hosting guarantees CPU, RAM, and storage for your site, ensuring optimal performance and stability.

      • data center
  • Blog
  • Dashboard

Recover LV or VG after running lvreduce, lvremove, lvresize

recover lv

Before applying a change to a logical volume (LV), it automatically creates a backup of the volume group (VG) and even an archive of the logical volume on which the operation is performed. This enables the restoration of the lost logical volume from the archive.

  • To restore the LV, first fund the LV in the archive. In the below command, [VG] is the name of the volume group from which you want to restore LV. This command will display all available backups for the VG.

# vgcfgrestore -l [VG]

  • Grep the string ‘command_executed’ from the output of the above command by appending the grep command as follows.

# vgcfgrestore -l [VG] | grep -A2 -B2 "<command_executed>"

  • Copy the filename of backup that is your logical volume. You can pinpoint your required LV by reading the description and timestamps.
  • Test the archive using the following command.

# vgcfgrestore --test -f <archive_file_path_here> [VG]

  • Finally, restore LV/VG as follows.

# vgcfgrestore -f <archive_file_path> <VG name>

  • Unmount the volume, reboot the server, and remount volume

Comments

Leave a Reply