Fusion Drive is corrupted This happened sometime ago when I wanted to update to new OS and was giving me an error.

Today I tried to install bootcamp and it stopped, telling me to check with diskutil my drive

First Aid found corruption that needs to be repaired. To repair the startup volume, run First Aid from Recovery. 

I tried running First Aid from Recovery but was getting same error and that I need to do a backup.

What can be done to fix this without losing all the data I have on the hard drive?

I see everything working fine on the Mac but cannot update OS and neither do bootcamp.

I have an iMac 2017.

These are what I have on disk utility

FUSION DRIVE

Volume type : APFS Container
BSD device node : disk2
Connection : PCI-Express
Device tree path : IODeviceTree:/PCI0@0/PEG2@1,2/SSD0@0/IONVMeController
Writable : No
Is case-sensitive : No
Volume capacity : 1,027,680,514,048
Available space (Purgeable + Free) : 515,761,975,296
Purgeable space : 0
Free space : 515,761,975,296
Used space : 511,918,538,752
Owners enabled : No
Is encrypted : No
Can be verified : Yes
Can be repaired : Yes
Bootable : No
Journaled : No
Disk number : 2
Media name : AppleAPFSMedia
Media type : Generic
Ejectable : No
Solid state : Yes
SMART status : Not Supported


CONTAINER DISK 2

Volume type : APFS Container
BSD device node : disk2
Connection : PCI-Express
Device tree path : IODeviceTree:/PCI0@0/PEG2@1,2/SSD0@0/IONVMeController
Writable : No
Is case-sensitive : No
Volume capacity : 1,027,680,514,048
Available space (Purgeable + Free) : 515,761,975,296
Purgeable space : 0
Free space : 515,761,975,296
Used space : 511,918,538,752
Owners enabled : No
Is encrypted : No
Can be verified : Yes
Can be repaired : Yes
Bootable : No
Journaled : No
Disk number : 2
Media name : AppleAPFSMedia
Media type : Generic
Ejectable : No
Solid state : Yes
SMART status : Not Supported

MACINTOSH HD

Volume name : Macintosh HD
Volume type : APFS Volume
BSD device node : disk2s1
Mount point : /
File system : APFS
Connection : PCI-Express
Device tree path : IODeviceTree:/PCI0@0/PEG2@1,2/SSD0@0/IONVMeController
Writable : Yes
Is case-sensitive : No
File system UUID : D3FA738A-ABA3-3BD3-9262-21EBEC6FCB54
Volume capacity : 1,027,680,514,048
Available space (Purgeable + Free) : 528,256,976,203
Purgeable space : 12,495,000,907
Free space : 515,761,975,296
Used space : 504,694,816,768
File count : 916,360
Owners enabled : Yes
Is encrypted : No
System Integrity Protection supported : Yes
Can be verified : Yes
Can be repaired : Yes
Bootable : No
Journaled : No
Disk number : 2
Partition number : 1
Media name : 
Media type : Generic
Ejectable : No
Solid state : Yes
SMART status : Not Supported
Parent disks : disk2
"I see everything working fine on the Mac but cannot update OS and neither do bootcamp."

If you can boot to the Fusion drive and read the contents of the disk, then the VERY FIRST THING you should do is make sure that you have a backup. Only then should you think about upgrading or messing with BootCamp.

"What can be done to fix this without losing all the data I have on the hard drive?"

Backup your disk. The only way to ensure that you will not lose any files is to have at least one copy on another physical device. Then, if something goes wrong with this disk, you will still have your files.

A Fusion drive is made of two separate devices: an SSD and a mechanical hard drive. Two devices means two separate points of failure. The mechanical hard drive is much more vulnerable to breakdown than the SSD. If one part of the Fusion drive breaks, then EVERYTHING is lost.

You may be able to 'repair' the Fusion by erasing the disk: or the errors may be so great that nothing will work. Either way, you can only try when you have a backup.

You may need to replace the mechanical drive -- ideally with a new, fast SSD -- or you can use an external SSD drive, which should still be faster.