I found 2 TB of storage I was not using
The fastest drive in my home lab, a 2 TB NVMe, was holding an empty volume group left over from an old install. The three commands that showed it, the missing backups I found on the same machine, and what I plan to do with the drive.
The fastest drive in my lab, a 2 TB NVMe, is empty. It has been sitting in the third machine holding a volume group from an old install, with nothing stored in it. I found it on July 19 while working on a different problem, using three commands that I should have run on that machine long ago.
If you run Linux hosts with LVM, run them on yours. They read from the hardware upward, which is the opposite direction from the way most of us look at storage.
Three commands
lsblk lists the physical picture. The manual says it "lists information about all available or the specified block devices," printed as a tree by default. You see each drive, its size and what sits on top of it.
On my third machine it showed two NVMe drives. One is 2 TB. The other is 512 GB.
vgs lists LVM volume groups. It showed two. One is the live volume group that the hypervisor uses, and it sits on the 512 GB drive. The other has a name that marks it as old, and it sits on the 2 TB drive.
lvs lists the logical volumes in each group and shows how full they are. The LVM documentation explains the column that matters for thin pools: "Data percent is the percent of space in the data LV that is currently used by thin LVs."
In the old volume group there is a thin pool of 1.67 TB. Its data percent reads 0.00.
In the live group, on the small drive, there is a 96 GB root volume and a 348 GB thin pool. That pool carries all four containers the machine runs.
So the machine does all of its work on the smaller, slower drive, and the 2 TB drive beside it does nothing.
Holds the live volume group the hypervisor uses
96 GB root volume and a 348 GB thin pool
Carries all four containers the machine runs
Holds a volume group left over from an old install
1.67 TB thin pool with data percent at 0.00
Carries nothing
Found on July 19 with lsblk, vgs and lvs.
How it got that way
The old volume group is what remains of an earlier installation of the hypervisor. The current installation went onto the smaller drive, and I never went back for the larger one.
Nothing about this was hidden. The drive did not fail and no setting concealed it. One command would have shown it on any day I chose to look.
I did not look because nothing prompted me to. A full disk raises alerts, and an empty one has nothing wrong with it to report.
I also had a picture of the machine in my head, and I trusted the picture. When I wrote up the lab in April, I gave that machine's cores and memory and said nothing about its drives.
The second thing I found
I was on that machine in the first place because of a backup problem on my main host. While I was there I checked how the third machine's own backups were doing.
It has none. There is no backup job on that machine of any kind. Its four containers have never been backed up.
Its backup directory does contain files. They are copies of the main host's containers, dated March 28 and never refreshed.
Put the findings side by side. The machine with four unprotected containers is also the machine with an empty 1.67 TB pool on its best drive. My main host, meanwhile, keeps exactly one copy of its backups, on a second drive inside itself. I wrote in April that a copy has to go somewhere else too, and it had not.
What I plan to do
I have not changed anything yet. Reclaiming that drive ends with removing a volume group, and that is a command I would rather run once, slowly, after checking.
The plan has an order.
- Confirm the old volume group holds nothing I need. A pool at 0.00 percent is strong evidence, but I will list every volume in that group and look inside each one before I trust the percentage.
- Confirm nothing refers to it. That means the storage configuration, the filesystem table and any script that names the group.
- Give the third machine backups. This comes before any cleverness with the drive, because four containers with no backups is the worse of the two problems.
- Use the 2 TB drive as a second backup target for the main host, so that its backups exist on two machines.
- Only then decide whether to move the live system onto the fast drive as well.
Step 4 is the obvious use. It is also a partial answer. Both machines are in the same house, so two copies there protect me from a dead host and do nothing for a fire or a theft. An offsite copy is still missing after all of this is done.
The audit, for any host
The check works on any Linux host.
Start from the hardware. List every block device with lsblk. For each one, find what claims it: a partition table, a volume group, a storage pool, a filesystem. Anything unclaimed is either a deliberate spare or forgotten, and you should know which.
Then go up one level. For each volume group or pool, find out how full it is and what uses it. A pool at zero is the same question again.
Then compare with what you believe. This is the step I had skipped. The useful output of the audit is the list of places where the machine and your mental picture of it disagree.
The best times to do this are after a reinstall and after a migration. Both leave old structures behind by design, because leaving the old disk untouched is the safe way to do either. The cleanup is supposed to come later, when you are sure the new system is good. In my case later never came.
At work the same thing happens at a larger size, and somebody is paying for the idle capacity. A reinstall or a migration there should end with a ticket that says what was left behind and who will remove it. One caveat applies at every size: before you reclaim anything, look inside it. The volume group on my drive is labeled as old, and I still intend to open it before I remove it.
Sources
Views are my own.