You will want to check all your Mount Points at Administrative Tools >> Computer Management >> Disk Management. In some circumstances, the volumes where the LDF and MDF files are stored, may be significantly less than expected. Therefore, the solution will be the increase the storage for the particular drives, at least during the attach and detach process.
The issue specifically relates to when the space on the SQL drive where the MDF and LDF are located have run out of space. You will want to ensure it has at least double the space requirement to satisfy the MDF file alone, the LOG file is going to be approximately a third of that file during the upgrade.
The event log should mention this, as per the below:
“Examine the drives containing the specified databases’ log and data
files. Free space on these drives or move the database files to
another drive. A drive should have enough free space for the largest
database file on it to autogrow twice. For more information about this
rule, see http://go.microsoft.com/fwlink/?LinkID=163560.”