Turned out it was the caching on QEMU I was using. This was why VM's became corrupted and why when QEMU hung my system, which is what probably caused the corruption and not the hard power off, the other LV's became corrupted as well. Since I turned this caching off the problem has been resolved.
It had nothing to do with arch or the 5.0 kernel. I have been experimenting with pcie passthrough and things happen during the process that made my system unstable a few times. The issue with LVM turned out to be the cache used for the VM's getting wonky. I have solved the issue completely.
It works fine with a regular partitioning scheme and the drive is passing tests. I am going to move the LVM to another free disk to be sure but I wanted to be sure there wasn't some configuration that I was missing that could be giving me trouble.
I'm getting files that are just being read and not written too corrupting on me. For instance my windows.xml for libvirt became corrupted, yet was never and should never have been written to, but was being read. Have you experienced this as well?
no errors in logs outside of what is caused by the corruption and have been resolved
As a note, yes, I am aware you shouldn't hard power off due to the risk of data loss and corruption. However it has become FAR worse and very often to the point of being every time with LVM for me.
Yes, this is a surprise because on traditional partitioning on the drive I can power off all day and rarely if ever experience an issue. However on LVM it is every single time with out fail. Things happen, systems hang, an odd power off here or there shouldn't carry a 100% chance of corruption. This seems abnormal, hence the questions in OP.
No, I do not. I mean VM, Virtual Machine as stated in the original post. The Volume Group has multiple LV's. One used for the host OS and a few for VM's. The host OS acting as my daily use OS as well. Both LV's, the one the host uses for the OS and the one for the VM I have currently been working with have experienced this issue.
I keep my firmware's and BIOS up to date and updated everything before my last wipe a few days ago in preparation for the new setup.
As stated before there is nothing relevant in the logs. smartctl scans and logs were the first things I checked.
I have already been to the wiki hence why I came to see if anybody had any input.
I have also checked the GitHub for LVM before coming here to see if there were any reported issues related to this, which there are not.
Use another OS is never a valid solution to anything. I am specifically asking about issues related to my current environment and I use my current environment for a reason.
You've been hostile from the get go and attempting to talk down to me. That can stop here and now thank you. I'm not an idiot.
a smartctl scan was the first thing I did. The drive is fine.
EDIT: I also have already looked through the error logs and see nothing significant beyond what is caused by the corruption, which I have already addressed.
I hardly just posted its broke. I have given as much information as I was able to retrieve and what I felt was relevant.
When the VM is hard powered down there are no errors what so ever either and the LV's still corrupt.
The OS is Arch, the relevant hardware is in a comment above (1TB spinning rust), and the drive partition configuration is LVM with the LV running EXT4 and another NTFS. Both corrupt just as easily.
At no point was the folder mentioned in any error, syslog, or context. I found this on a completely unrelated bug report. It should have created this folder on its own if it did not exist or mentioned it in the error. Even after fixing it the command STILL did not function. Worth pointing out the the final solution was to just bypass it and do what the command was suppose to do manually.
Nope was a different issue, apparently the following folder didn't exist,
/var/lib/systemd/linger
Now I am faced with,
Could not enable linger: Read-only file system
Seems this is an issue with writing the user file. There is suppose to be a way to work around this but cant find the referenced unit file this is talking about.
Absolutely ridiculous this command fails at such a simple task. Lesson learned, do it manually next time! Wish I realized this was only touching a file...
Turned out it was the caching on QEMU I was using. This was why VM's became corrupted and why when QEMU hung my system, which is what probably caused the corruption and not the hard power off, the other LV's became corrupted as well. Since I turned this caching off the problem has been resolved.
It had nothing to do with arch or the 5.0 kernel. I have been experimenting with pcie passthrough and things happen during the process that made my system unstable a few times. The issue with LVM turned out to be the cache used for the VM's getting wonky. I have solved the issue completely.
It works fine with a regular partitioning scheme and the drive is passing tests. I am going to move the LVM to another free disk to be sure but I wanted to be sure there wasn't some configuration that I was missing that could be giving me trouble.
Are you running an SSD or spinning disk?
I'm getting files that are just being read and not written too corrupting on me. For instance my windows.xml for libvirt became corrupted, yet was never and should never have been written to, but was being read. Have you experienced this as well?
Yes, this is a surprise because on traditional partitioning on the drive I can power off all day and rarely if ever experience an issue. However on LVM it is every single time with out fail. Things happen, systems hang, an odd power off here or there shouldn't carry a 100% chance of corruption. This seems abnormal, hence the questions in OP.
No, I do not. I mean VM, Virtual Machine as stated in the original post. The Volume Group has multiple LV's. One used for the host OS and a few for VM's. The host OS acting as my daily use OS as well. Both LV's, the one the host uses for the OS and the one for the VM I have currently been working with have experienced this issue.
I keep my firmware's and BIOS up to date and updated everything before my last wipe a few days ago in preparation for the new setup.
As stated before there is nothing relevant in the logs. smartctl scans and logs were the first things I checked.
I have already been to the wiki hence why I came to see if anybody had any input.
I have also checked the GitHub for LVM before coming here to see if there were any reported issues related to this, which there are not.
https://github.com/lvmteam/lvm2/issues
Use another OS is never a valid solution to anything. I am specifically asking about issues related to my current environment and I use my current environment for a reason.
You've been hostile from the get go and attempting to talk down to me. That can stop here and now thank you. I'm not an idiot.
a smartctl scan was the first thing I did. The drive is fine.
EDIT: I also have already looked through the error logs and see nothing significant beyond what is caused by the corruption, which I have already addressed.
I hardly just posted its broke. I have given as much information as I was able to retrieve and what I felt was relevant.
When the VM is hard powered down there are no errors what so ever either and the LV's still corrupt.
The OS is Arch, the relevant hardware is in a comment above (1TB spinning rust), and the drive partition configuration is LVM with the LV running EXT4 and another NTFS. Both corrupt just as easily.
The content, the structure remains intact without issue. The underlying hardware is a 1TB SATA spinning rust.
At no point was the folder mentioned in any error, syslog, or context. I found this on a completely unrelated bug report. It should have created this folder on its own if it did not exist or mentioned it in the error. Even after fixing it the command STILL did not function. Worth pointing out the the final solution was to just bypass it and do what the command was suppose to do manually.
Nope was a different issue, apparently the following folder didn't exist,
/var/lib/systemd/lingerNow I am faced with,
Could not enable linger: Read-only file systemSeems this is an issue with writing the user file. There is suppose to be a way to work around this but cant find the referenced unit file this is talking about.
https://github.com/systemd/systemd/issues/12401
EDIT: The following provides a NEW error.
sudo chown nobody:nobody /var/lib/systemd/lingerCould not enable linger: File existsEDIT 2: Final solution is,
touch /var/lib/systemd/linger/$USERAbsolutely ridiculous this command fails at such a simple task. Lesson learned, do it manually next time! Wish I realized this was only touching a file...
[myuser@arch ~]$ loginctl list-sessions
SESSION UID USER SEAT TTY
1 1000 myuser
3 1000 myuser pts/1
4 1000 myuser pts/2
3 sessions listed.
There is automation, however it is when that automation breaks that the mistakes are made. Anyways I fixed the issue.
Apparently it is not thinly provisioned.
End of this list.
Back to top