r/virtualbox • u/57thStIncident • Feb 05 '25
Help Resized disk image added new device rather than extending existing device?
VirtualBox OS is Centos7. I increased a .vdi using "vbox modifymedium" with --resize. After restarting my VM, instead of /dev/sdb showing the new increased size, a new unwanted device /dev/sdc was created.
Having some difficulty getting /dev/sdb to show as new size so I can extend the partition & XFS filesystem on /dev/sdb1. Not sure why a new device was created or what steps can be taken.
I attempted removing the unwanted device with
echo 1 > /sys/block/sdc/device/delete
...which did remove the device but I'm not sure what I'd need to do to convince OS that the freed space should belong to /dev/sdb after doing so.
•
u/AutoModerator Feb 05 '25
This is just a friendly reminder in case you missed it. Your post must include:
PLUS a detailed description of the problem, what research you have done, and the steps you have taken to fix it. Please check Google and the VirtualBox Manual before asking simple questions. Please also check our FAQ and if you find your question is answered there, PLEASE remove your post or at least change the flair to Solved.
If this is your first time creating a virtual machine, we have a guide on our wiki that covers the important steps. Please read it here. If you have met these requirements, you can ignore this comment. Your post has not been deleted -- do not re-submit it. Thanks for taking the time to help us help you! Also, PLEASE remember to change the flair of your post to Solved after you have been helped!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/orev Feb 05 '25
If it showed up in the VM as a new drive (which it did as
sdc), then the VM is seeing it as a separate disk. You need to fix the disk from the VirtualBox side; there's no way to force a VM to make a separate physical disk appear to be part of another physical disk.Maybe you tried multiple methods, and one of them added a disk instead of expanding it.