<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: hosni1982</title>
    <description>The latest articles on DEV Community by hosni1982 (@hosni1982).</description>
    <link>https://dev.to/hosni1982</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4100811%2F3ef4f659-9600-4682-bc9c-1769c4eaa869.png</url>
      <title>DEV Community: hosni1982</title>
      <link>https://dev.to/hosni1982</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hosni1982"/>
    <language>en</language>
    <item>
      <title>RHEL: /data Disappeared After Reboot? Troubleshoot LVM and Multipath Before Touching pvcreate</title>
      <dc:creator>hosni1982</dc:creator>
      <pubDate>Sat, 29 Aug 2026 22:44:42 +0000</pubDate>
      <link>https://dev.to/hosni1982/rhel-data-disappeared-after-reboot-troubleshoot-lvm-and-multipath-before-touching-pvcreate-4ejn</link>
      <guid>https://dev.to/hosni1982/rhel-data-disappeared-after-reboot-troubleshoot-lvm-and-multipath-before-touching-pvcreate-4ejn</guid>
      <description>&lt;p&gt;A filesystem disappearing after a reboot is one of those incidents where a quick "fix" can make the situation much worse.&lt;/p&gt;

&lt;p&gt;Imagine this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/data is missing
Application cannot start
systemd reports a mount failure
Server may even enter emergency mode
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first reaction might be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pvcreate
vgcreate
lvcreate
mkfs.xfs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On an existing production LUN, that can be exactly the wrong thing to do.&lt;/p&gt;

&lt;p&gt;The problem may not be LVM at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the failure layers
&lt;/h2&gt;

&lt;p&gt;In an enterprise RHEL environment, &lt;code&gt;/data&lt;/code&gt; can depend on several layers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/data
  ↓
Filesystem
  ↓
Logical Volume
  ↓
Volume Group
  ↓
Physical Volume
  ↓
Multipath
  ↓
SAN LUN
  ↓
Storage paths
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The goal is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Find the first broken layer before changing anything.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  1. Is &lt;code&gt;/data&lt;/code&gt; actually expected to be mounted?
&lt;/h2&gt;

&lt;p&gt;Start with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;findmnt /data
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'/data'&lt;/span&gt; /etc/fstab
lsblk &lt;span class="nt"&gt;-f&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then inspect the boot errors:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;journalctl &lt;span class="nt"&gt;-b&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; err..alert &lt;span class="nt"&gt;--no-pager&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You may see something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Failed to mount /data
Dependency failed for Local File Systems
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That only proves the mount failed.&lt;/p&gt;

&lt;p&gt;It does &lt;strong&gt;not&lt;/strong&gt; prove that the filesystem is corrupted.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Does the Logical Volume exist?
&lt;/h2&gt;

&lt;p&gt;Check LVM:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lvs &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; lv_name,vg_name,lv_attr,devices
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A healthy configuration might show:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LV       VG       Attr       Devices
lv_data  vg_data  -wi-a----- /dev/mapper/mpatha(0)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the LV is missing, move down one layer.&lt;/p&gt;

&lt;p&gt;Do not recreate it yet.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Does the Volume Group exist?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vgs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VG       #PV #LV #SN Attr   VSize    VFree
vg_data    1   1   0 wz--n- 500.00g  20.00g
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;vg_data&lt;/code&gt; is missing, resist the temptation to run &lt;code&gt;vgcreate&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Check the PV first.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Is the Physical Volume visible?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pvs &lt;span class="nt"&gt;-o&lt;/span&gt; pv_name,vg_name,pv_size,pv_free
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PV                  VG       PSize    PFree
/dev/mapper/mpatha  vg_data  500.00g  20.00g
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;/dev/mapper/mpatha&lt;/code&gt; is missing, the problem is probably below LVM.&lt;/p&gt;

&lt;p&gt;Now the investigation changes direction.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Check Multipath
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipath &lt;span class="nt"&gt;-ll&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example of a healthy map:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mpatha (3600508b400105df70000e00000ac0000) dm-3
size=500G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw

|-+- policy='service-time 0' prio=50 status=active
| `- 2:0:0:1 sdb 8:16 active ready running

`-+- policy='service-time 0' prio=10 status=enabled
  `- 3:0:0:1 sdc 8:32 active ready running
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can inspect the individual paths with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipathd show paths
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lsscsi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the expected WWID is absent completely, recreating the VG will not fix the root cause.&lt;/p&gt;

&lt;p&gt;The SAN LUN may simply not be visible to the server.&lt;/p&gt;




&lt;h2&gt;
  
  
  A typical failure chain
&lt;/h2&gt;

&lt;p&gt;Suppose your checks give this result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;findmnt /data
    → not mounted

lvs
    → lv_data missing

vgs
    → vg_data missing

pvs
    → expected PV missing

multipath -ll
    → expected WWID missing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the picture is very different:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SAN LUN not visible
        ↓
Multipath map missing
        ↓
PV missing
        ↓
VG missing
        ↓
LV missing
        ↓
Filesystem unavailable
        ↓
/data not mounted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The missing filesystem was only the visible symptom.&lt;/p&gt;

&lt;p&gt;The real failure occurred much lower in the stack.&lt;/p&gt;




&lt;h2&gt;
  
  
  Commands I would avoid at this stage
&lt;/h2&gt;

&lt;p&gt;Unless you have proven that the storage is new and intentionally being initialized, avoid commands such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pvcreate /dev/mapper/mpatha
vgcreate vg_data /dev/mapper/mpatha
lvcreate ...
mkfs.xfs ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are creation commands, not troubleshooting commands.&lt;/p&gt;

&lt;p&gt;On an existing production disk, they may overwrite metadata you are trying to recover.&lt;/p&gt;




&lt;h2&gt;
  
  
  Evidence to collect before escalation
&lt;/h2&gt;

&lt;p&gt;Before calling the storage, SAN, VMware or infrastructure team, collect evidence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;date
&lt;/span&gt;hostnamectl
&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt;
lsblk &lt;span class="nt"&gt;-f&lt;/span&gt;
findmnt
pvs
vgs
lvs &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; +devices
multipath &lt;span class="nt"&gt;-ll&lt;/span&gt;
multipathd show paths
journalctl &lt;span class="nt"&gt;-b&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; err..alert &lt;span class="nt"&gt;--no-pager&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In complex cases, and if permitted by your environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sos report
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives the next support level something concrete to work with.&lt;/p&gt;




&lt;h2&gt;
  
  
  The troubleshooting habit that matters
&lt;/h2&gt;

&lt;p&gt;When &lt;code&gt;/data&lt;/code&gt; disappears, don't immediately ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which command can recreate &lt;code&gt;/data&lt;/code&gt;?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which command proves why &lt;code&gt;/data&lt;/code&gt; disappeared?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That small change in mindset can prevent a recoverable infrastructure incident from becoming a data-loss incident.&lt;/p&gt;




&lt;h2&gt;
  
  
  Free Linux troubleshooting resources
&lt;/h2&gt;

&lt;p&gt;I maintain a small public project called &lt;strong&gt;Linux Ops Rescue Kit&lt;/strong&gt; with free RHEL troubleshooting examples and read-only diagnostic tools.&lt;/p&gt;

&lt;p&gt;The GitHub repository currently includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High load but low CPU troubleshooting&lt;/li&gt;
&lt;li&gt;LVM / Multipath missing filesystem troubleshooting&lt;/li&gt;
&lt;li&gt;A read-only Linux snapshot script&lt;/li&gt;
&lt;li&gt;An evidence-first troubleshooting methodology&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitHub:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/hosni1982/linux-ops-rescue-kit" rel="noopener noreferrer"&gt;https://github.com/hosni1982/linux-ops-rescue-kit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The free release is also available here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/hosni1982/linux-ops-rescue-kit/releases/tag/v1.0-free" rel="noopener noreferrer"&gt;https://github.com/hosni1982/linux-ops-rescue-kit/releases/tag/v1.0-free&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For engineers who need a larger on-call runbook, the complete Linux Ops Rescue Kit contains 30 production incident workflows, verification, rollback and Stop &amp;amp; Escalate guidance.&lt;/p&gt;




&lt;p&gt;If you work on RHEL production systems, I'd be interested to know:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the most dangerous "quick fix" you've seen during a storage incident?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>sysadmin</category>
      <category>debugging</category>
    </item>
  </channel>
</rss>
