Disk Utility in High Sierra 10.13.1 partitioning fail Before moving to Mac Sierra, main media disk was portioned in two volumes;
Main with OS space 200GB, Subsidiary with 800 GB.

I wanted to delete the subsidiary to merge it again with the Main, and then resize the Main to 400GB, and the remaining 600GB to a new volume.

It didn't work:
main stayed, the previous Sub volume of 600 disappeared completely and was in hidden modus added to the Recovery HD.

Now we have the following status:

iMacvanFreddy2:~ freddyvandercruyssen$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            201.2 GB   disk0s2
   3:                 Apple_Boot Recovery HD             798.8 GB   disk0s3

/dev/disk1 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.5 GB    disk1
   1:                       0xEF                         4.1 MB     disk1s2

/dev/disk2 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        +536.9 MB   disk2
   1:        Apple_partition_map                         32.3 KB    disk2s1
   2:                  Apple_HFS StellarPartitionManager 536.9 MB   disk2s2

diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            201.2 GB   disk0s2
   3:                 Apple_Boot Recovery HD             798.8 GB   disk0s3

/dev/disk1 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.5 GB    disk1
   1:                       0xEF                         4.1 MB     disk1s2


what commands to enter to resize the HD recovery disk, and to regain the rest of the volume in a new part
You have to remove the recovery partition - it's probably broken; at least it's consuming 80% of your disk. Then you have to resize your main partition disk0s2. Finally restore/rebuild the recovery partition.


Open Terminal.app and enter diskutil list to get the details
Check the disk: diskutil verifyDisk disk0.
diskutil eraseVolume Free n disk0s3
diskutil resizeVolume disk0s2 R to resize the main volume to the max.

If the R size option fails try to use a real size like 120g or the percentage 100% (on some external disks this may fail because of some 2 TiB limit).

diskutil resizeVolume disk0s2 1000g


or a little less if this also fails

diskutil resizeVolume disk0s2 999800m

Recreate the recovery partition by downloading and reinstalling the latest High Sierra version (10.3.2 as of time of writing). Reinstalling won't delete your data. A Time Machine backup is recommended though.