System is not booting, Rocky 9 VM on proxmox

psycho

New Member
Joined
Jan 1, 2025
Messages
9
Reaction score
1
Credits
68
Long story short - were building some stuff on newly installed Rocky 9 VM, I have assigned to it 150GB of space, 20GB for root, about 120GB to /home, etc... I was building nextcloud on docker, when everything worked as expected, I have added to VM extra 500GB disk, and mounted it to my VM as /data, later same day unplugged wrong USB hard drive (that was /data mount), and checked my VM and it was in emergency state and complaining about /home directory - "dependency failed for /home".

I think I screw up somewhere in VG creation when were mounting new disk, as firstly I have assigned new disk to VG named rl, and later on created new VG named vg00 and mounted it to /data. Attaching some outputs about volumes, VG and stuff. Hopefully I still can save my /home data

PV rl should be ~150GB and vg00 is as expected 512GB
1735731215445.png
 


What is the output of ...

Code:
fdisk -l

...and...

Code:
df -h
 
I see /home listed in your fstab ( first post )
But I do not see it anywhere else.

Did you try to add /dev/sdb to the volume group?
I don't see any partitions on it.

Were you wanting to use /dev/sdb as your home?
I'm guessing the UUID that is missing is for /dev/sdb?

What is the output of ...

Code:
blkid /dev/sdb

It's doubtful that this is for /dev/sda, but just in case...

Code:
blkiid /dev/sda

and just to make sure we don't have another partition that isn't showing up.

Code:
fdisk /dev/sda
p
q

Code:
fdisk /dev/sdb
p
q
 
Yes, so as written in first post, I have addedd /dev/sdb to VG named "rl" at first, and later decided to create new VG add and /dev/sdb there. But /home was living inside /dev/sda and basically haven`t touched anything related to /dev/sda or /home directory....

In short - /dev/sdb seems to be right for me, I added it as /data and i can browse files there, so that`s ok. But /home somehow went missing from /dev/sda


IDs
1735754255086.png


fdisk
1735754307158.png
 
It looks like /data is mounted and working for you, but you really should create a proper partition on it.

I don't see /home as a partition of either disk, so as near as I can tell, it's just gone.

You can create a new home directory, but you'll need to fix your fstab to point to the updated directory.
 
So as you can see /dev/sda have arround 120GB unassigned space, that was my /home, so no way to restore that partition?
 
One last thing we can try..

lvdisplay
 
BTW, found my old terminal still hanging with last commands on how I did all partitioning, etc, if that's any useful
 

Attachments

  • commands.pdf
    97.3 KB · Views: 27
Try this.

Activate the Logical Volume:
Code:
 sudo lvchange -ay /dev/rl/home
Check the Status:
Code:
 sudo lvdisplay /dev/rl/home
The status should now show as "available".
Mount the Partition:
Code:
 sudo mount /dev/rl/home /mnt
Replace /mnt with your desired mount point.

If the LV still does not activate, you might need to check the volume group (VG) status and ensure it's active:
Code:
 sudo vgchange -ay rl
 
Mate, that worked!!! I`m able to see my files again. But when rebooted system it still complains about /home. And yeah, it complains a lot about rl VG, could you help me to clean this mess? :)

1735763509420.png
 
Is there any chance, you could ssh to the VM instead of screen shots?
There is a lot of long uuids here. It would be nice to copy and paste them.
 
I was not, as it boots in rescue mode without networking and stuff, but I have commented /home mount in fstab and now able to ssh to it, sending you some disks information in text mode :)

If I would change in fstab /dev/mapper/rl-home part to /dev/rl/home it should start to work again?

Code:
[root@localhost ~]# lvdisplay /dev/rl/home
  WARNING: Couldn't find device with uuid 4eh4zD-84e5-kSyQ-kdFz-6IsK-HQcz-avKG5h.
  WARNING: VG rl is missing PV 4eh4zD-84e5-kSyQ-kdFz-6IsK-HQcz-avKG5h (last written to /dev/sdb).
  --- Logical volume ---
  LV Path                /dev/rl/home
  LV Name                home
  VG Name                rl
  LV UUID                bMKyfv-frg8-OgMj-yEMS-rpFv-wigM-rtOOOS
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2024-12-30 21:18:54 +0200
  LV Status              NOT available
  LV Size                <125.05 GiB
  Current LE             32012
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto

[root@localhost ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Mon Dec 30 19:19:00 2024
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/rl-root     /                       xfs     defaults        0 0
UUID=2b0a6d5c-407a-4f37-9e0d-b6efc52de48e /boot                   xfs     defaults        0 0
#/dev/mapper/rl-home     /home                   xfs     defaults        0 0
/dev/mapper/rl-swap     none                    swap    defaults        0 0
UUID=1ef4a893-5432-4f69-9e99-ffb364770fde /data    ext4 defaults 0 0

[root@localhost ~]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/vg00/data
  LV Name                data
  VG Name                vg00
  LV UUID                cMTlQg-jG7J-EOhh-mVom-DpTL-sPA2-tkFEz4
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2024-12-31 15:18:38 +0200
  LV Status              available
  # open                 1
  LV Size                <512.00 GiB
  Current LE             131071
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2
 
  WARNING: Couldn't find device with uuid 4eh4zD-84e5-kSyQ-kdFz-6IsK-HQcz-avKG5h.
  WARNING: VG rl is missing PV 4eh4zD-84e5-kSyQ-kdFz-6IsK-HQcz-avKG5h (last written to /dev/sdb).
  --- Logical volume ---
  LV Path                /dev/rl/swap
  LV Name                swap
  VG Name                rl
  LV UUID                GtiaE2-6Bxy-OWPJ-fcVS-NOAI-2s7k-c6nZRC
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2024-12-30 21:18:54 +0200
  LV Status              available
  # open                 2
  LV Size                <3.95 GiB
  Current LE             1011
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
 
  --- Logical volume ---
  LV Path                /dev/rl/home
  LV Name                home
  VG Name                rl
  LV UUID                bMKyfv-frg8-OgMj-yEMS-rpFv-wigM-rtOOOS
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2024-12-30 21:18:54 +0200
  LV Status              NOT available
  LV Size                <125.05 GiB
  Current LE             32012
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
 
  --- Logical volume ---
  LV Path                /dev/rl/root
  LV Name                root
  VG Name                rl
  LV UUID                o7s4vj-8MeY-BnMu-gida-zlC7-Khc1-6lnLN3
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2024-12-30 21:18:55 +0200
  LV Status              available
  # open                 1
  LV Size                20.00 GiB
  Current LE             5120
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
 
Last edited:
Thanks,
I would try this...

Code:
vgs -o +devices

vgreduce --removemissing rl

vgdisplay rl
lvdisplay /dev/rl/home

lvchange -ay /dev/rl/home

fsck -f /dev/rl/home

remember to uncomment the /home entry in your fstab

Code:
systemctl daemon-reload

mount /dev/mapper/rl-home /home

The following should not be necessary.
Code:
pvscan

vgcfgrestore rl
 
Last edited:
Worked like a charm!!! Thanks mate, owe you few beers. Could you explain me in few words what we did? Now I see that rl VG is normals size and my vg00 is dedicated size too... Posting my output for someone in the future if would be needed.

Code:
[root@localhost ~]# vim /etc/fstab
[root@localhost ~]# vgs -o +devices
  WARNING: Couldn't find device with uuid 4eh4zD-84e5-kSyQ-kdFz-6IsK-HQcz-avKG5h.
  WARNING: VG rl is missing PV 4eh4zD-84e5-kSyQ-kdFz-6IsK-HQcz-avKG5h (last written to /dev/sdb).
  VG   #PV #LV #SN Attr   VSize    VFree    Devices
  rl     2   3   0 wz-pn-  660.99g <512.00g /dev/sda2(0)
  rl     2   3   0 wz-pn-  660.99g <512.00g /dev/sda2(1011)
  rl     2   3   0 wz-pn-  660.99g <512.00g /dev/sda2(33023)
  vg00   1   1   0 wz--n- <512.00g       0  /dev/sdb(0)
[root@localhost ~]# vgreduce --removemissing rl
  WARNING: Couldn't find device with uuid 4eh4zD-84e5-kSyQ-kdFz-6IsK-HQcz-avKG5h.
  WARNING: VG rl is missing PV 4eh4zD-84e5-kSyQ-kdFz-6IsK-HQcz-avKG5h (last written to /dev/sdb).
  WARNING: Couldn't find device with uuid 4eh4zD-84e5-kSyQ-kdFz-6IsK-HQcz-avKG5h.
  Wrote out consistent volume group rl.
[root@localhost ~]# vgdisplay rl
  --- Volume group ---
  VG Name               rl
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <149.00 GiB
  PE Size               4.00 MiB
  Total PE              38143
  Alloc PE / Size       38143 / <149.00 GiB
  Free  PE / Size       0 / 0
  VG UUID               IrTT29-8LJj-bLj3-AMk9-xcqy-9V2z-jas06z

[root@localhost ~]# lvdisplay /dev/rl/home
  --- Logical volume ---
  LV Path                /dev/rl/home
  LV Name                home
  VG Name                rl
  LV UUID                bMKyfv-frg8-OgMj-yEMS-rpFv-wigM-rtOOOS
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2024-12-30 21:18:54 +0200
  LV Status              NOT available
  LV Size                <125.05 GiB
  Current LE             32012
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto

[root@localhost ~]# lvchange -ay /dev/rl/home
[root@localhost ~]# fsck -f /dev/rl/home
fsck from util-linux 2.37.4
If you wish to check the consistency of an XFS filesystem or
repair a damaged filesystem, see xfs_repair(8).
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# mount /dev/mapper/rl-home /home
[root@localhost ~]# pvscan
  PV /dev/sdb    VG vg00   lvm2 [<512.00 GiB / 0    free]
  PV /dev/sda2   VG rl     lvm2 [<149.00 GiB / 0    free]
  Total: 2 [660.99 GiB] / in use: 2 [660.99 GiB] / in no VG: 0 [0   ]
[root@localhost ~]#
 
Checked the Volume Groups (VGs): We used vgs -o +devices to list the VGs and their associated devices. We noticed that the VG rl was missing a physical volume (PV).
Removed the Missing PV: We ran vgreduce --removemissing rl to remove the missing PV from the VG rl. This step ensured that the VG was consistent and no longer referenced the missing PV.
Activated the Logical Volume (LV): We used lvchange -ay /dev/rl/home to activate the LV home within the VG rl.
Checked and Mounted the Filesystem: We ran fsck -f /dev/rl/home to check the filesystem for errors and then mounted it using mount /dev/mapper/rl-home /home.
Verified the PVs: Finally, we used pvscan to verify the PVs and their associated VGs.
 

Members online


Top