Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

David Foley
David Foley

Posted on

Activate partial LV after drive failure

I recently noticed a drive in my home NAS was pre-fail according to S.M.A.R.T. diagnostics, when I replaced the drive I found it difficult to mount the remaining drives in the LVM VG to recover data.

TL;DR

  • Use commandlvchange -ay --partial example_logical_volume to bring a LVM LV with failed disks

The Problem

The LVM volume that the drive was a member of had three drives. The majority of the data in the group was backed up redundantly to a local and cloud drive usingborg backup. There was about 900GB of which was not backed up because it was deemed to be unimportant, certainly not important enough to warrant the cost of backing it up to a cloud server, as well as locally, like the other data. However since the the failing drive was still online I tried to save as much of the 900GB as possible.

I first copied off as much as I could to a spare drive, which was quite successful. During this process, the faulty drive failed completely. This wasn't a problem as I had saved the 900GB and had the backups. The backups had never actually been used, so I did aborg check to ensure they were consistent. Despite that I was still a little nervous and I wanted to access the two good drives in the LVM volume to pull off the remaining data. I knew this was possible but had never done it before and found it very difficult to find information on the web. Which is why I am writing this small blog post.

In the end it turned out to be quite simple, all that was required was the use of the--partial flag when usinglvchange. So the command I executed waslvchange -ay --partial example_logical_volume. This brought the LV back up and I was able to access the data on the two remaining disks. See thelvchange manpage) for more information

This article was first posted athttps://www.dfoley.ie/blog/activate-partial-lv #indieweb #posse

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Chief Engineer at Gigaquad, Farmer at Verity as Farm, food & beer enthusiast, éireannach atá ar deoraíocht 🇮🇪🇪🇺, #indieweb-er [ work CC BY-SA 4.0 ]
  • Location
    Harcourt, VIC, Australia
  • Education
    Bsc. Computer Science, University College Dublin
  • Work
    Chief Engineer at Gigaquad
  • Joined

More fromDavid Foley

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp