# Rocky 9 install : existing logical volumes are not visible

**URL:** <https://forums.rockylinux.org/t/rocky-9-install-existing-logical-volumes-are-not-visible/7239>\
**Category:** Rocky Linux Help & Support\
**Created:** [September 14, 2022, 2:47pm UTC](https://forums.rockylinux.org/t/rocky-9-install-existing-logical-volumes-are-not-visible/7239 "2022-09-14T14:47:46Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [September 16, 2022, 2:12pm UTC](https://forums.rockylinux.org/t/rocky-9-install-existing-logical-volumes-are-not-visible/7239/21 "2022-09-16T14:12:43Z")

</div>

I think this is something unique to your system that you had to do this. I created raid+lvm under Rocky 8, then disconnected the disks, and connected them to Rocky 9 and it was accessible as soon as I activated the mdadm.

As you found, mileage varies, what works for one person, not necessarily another. The good think is you were able to use lvmdevices to add the device and then the vgchange command to activate it. Maybe mine just worked because it was created under Rocky 8, rather than using LVM under CentOS 7. Perhaps that had something to do with it, perhaps not.

I’ve had varying issues with lvm, also had one inaccessible once, and was just enough to use vgchange to activate it. Others it was irrecoverable due to metadata loss but was able to get it back from a backup. So it’s handy to make a list of commands used that helped resolve it, just in case for the future you might need them again.

---

<div class="post-metadata">

**Author:** ![noob\_smellFromMe](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@noob\_smellFromMe](https://forums.rockylinux.org/u/noob_smellFromMe)\
**Post date:** [October 15, 2022, 12:54pm UTC](https://forums.rockylinux.org/t/rocky-9-install-existing-logical-volumes-are-not-visible/7239/22 "2022-10-15T12:54:30Z")

</div>

Thank you guys. This works great.  
And This is for the posterity.

$ lvmdevices --addev /dev/sdb1  
$ lvmdevices --addev /dev/sdb2  
$ vgchange -ay vg-datastore

#### After this command, the system.devices file changed which contains the info above.

My lvm vg was made via Rocky linux 8.  
This command is not for raid, but works.

---

<div class="post-metadata">

**Author:** ![josephm](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@josephm](https://forums.rockylinux.org/u/josephm)\
**Post date:** [January 21, 2023, 12:23am UTC](https://forums.rockylinux.org/t/rocky-9-install-existing-logical-volumes-are-not-visible/7239/23 "2023-01-21T00:23:47Z")

</div>

Hello,  
I’ve been a CentOS user since V4 and I loved it when Rocky started up.  
I’ve been on Rocky since its beginning.  
But I’ve now been motivated by this thread.  
My home server (web/file) has gone from CentOS V4 up to Rocky 8.7.  
Of course it is and old server so I decided to upgrade.  
Its now on Rocky 9.1.  
All of my /home content is on a LV.  
After installing Rocky 9.1 fresh on the new server I did the following on the old one to move the disks over:

```auto
systemctl stop httpd smb
umount /home
vgchange -an vg_home
vgexport vg_home

```

I then removed the drives and installed them on the new server and did:

```auto
systemctl stop httpd
pvscan

```

And NOTHING of these drives was visible.

found I could use gdisk and see them but LVM couldn’t see anything.  
So before I reformatted them I ran across this thread and used the

```auto
lvmdevices --adddev /dev/sd<1>
lvmdevices --adddev /dev/sd<2>

```

After that, pvscan could see them and i was able to vgimport, vgchange and mount it.

Saved recovering 7TB of data.

So LVM has more rules about what it can and can’t pay attention to, at least between Rock 8.7 and 9.1 (RHEL 8.7 RHEL 9.1).

Thanks to All of you for the FANTASTIC work.

---

<div class="post-metadata">

**Author:** ![prazape](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@prazape](https://forums.rockylinux.org/u/prazape)\
**Post date:** [January 23, 2023, 11:40am UTC](https://forums.rockylinux.org/t/rocky-9-install-existing-logical-volumes-are-not-visible/7239/24 "2023-01-23T11:40:30Z")

</div>

Hello guys,  
I just had the same problem (after reinstaling CentOS 7 machine to Rocky 9), so thank you all for solution!

I had to use:

```auto
lvmdevices --adddev /dev/sdx

```

For pvscan and vgscan to see the old lvm, and then I was able to read its name and activate it:

```auto
vgscan 
vgchange -ay centos_xxx

```

---

<div class="post-metadata">

**Author:** ![joao](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@joao](https://forums.rockylinux.org/u/joao)\
**Post date:** [March 24, 2023, 11:56pm UTC](https://forums.rockylinux.org/t/rocky-9-install-existing-logical-volumes-are-not-visible/7239/25 "2023-03-24T23:56:09Z")

</div>

@prazape fantastic!

My “/dev/mapper/rl-home” (/home) disappeared… I commented “fstab” to Rocky Linux work again.

With your comands:  
`lvmdevices --adddev /dev/nvme01xxxx (SSD) `  
Next  
`vgscan`  
(show rl group)  
Next  
`vgchange -ay rl`

So I uncommented fstab (/dev/mapper/rl-home) and the magic happened 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 3:20am UTC](https://forums.rockylinux.org/t/rocky-9-install-existing-logical-volumes-are-not-visible/7239/26 "2023-08-25T03:20:02Z")

</div>



[Previous page](https://forums.rockylinux.org/t/rocky-9-install-existing-logical-volumes-are-not-visible/7239.md?page=1)
