Score:0

Wrong disk size after failed partitioning

ke flag
Tom

I am using Ubuntu 20.04 and wanted to use a live USB stick to partition my hard drive. While partitioning something went wrong and my computer crashed. After restart it shows me that 70 percent of the disk is used, which is not correct.

Is there any way to fix the hard drive without formatting the entire thing and losing all of my data?

EDIT: Output of sudo parted -l

Model: Sony Storage Media (scsi)
Disk /dev/sda: 31,0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  31,0GB  31,0GB               Ventoy   msftdata
 2      31,0GB  31,0GB  33,6MB  fat16        VTOYEFI  hidden, msftdata


Model: Generic Flash Disk (scsi)
Disk /dev/sdb: 15,7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name       Flags
 1      32,8kB  3822MB  3822MB               ISO9660    hidden, msftdata
 2      3822MB  3826MB  4350kB               Appended2  boot, esp
 3      3826MB  3827MB  307kB                Gap1       hidden, msftdata
 4      3827MB  15,7GB  11,9GB  ext4


Model: PC611 NVMe SK hynix 1TB (nvme)
Disk /dev/nvme0n1: 1024GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  829MB   828MB   fat32        EFI system partition  boot, esp
 2      829MB   6198MB  5369MB  fat32        Basic data partition  msftres
 3      6198MB  1024GB  1018GB  ext4

and output of lsblk -f

NAME        FSTYPE   LABEL                    UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0       squashfs                                                                     0   100% /snap/bare/5
loop1       squashfs                                                                     0   100% /snap/chromium/2271
loop2       squashfs                                                                     0   100% /snap/code/117
loop3       squashfs                                                                     0   100% /snap/chromium/2295
loop4       squashfs                                                                     0   100% /snap/core22/504
loop5       squashfs                                                                     0   100% /snap/core/14399
loop6       squashfs                                                                     0   100% /snap/core18/2667
loop7       squashfs                                                                     0   100% /snap/cups/836
loop8       squashfs                                                                     0   100% /snap/core20/1778
loop9       squashfs                                                                     0   100% /snap/core22/484
loop10      squashfs                                                                     0   100% /snap/core/14447
loop11      squashfs                                                                     0   100% /snap/core20/1822
loop12      squashfs                                                                     0   100% /snap/code/118
loop13      squashfs                                                                     0   100% /snap/core18/2679
loop14      squashfs                                                                     0   100% /snap/gnome-3-26-1604/102
loop15      squashfs                                                                     0   100% /snap/gnome-3-26-1604/104
loop16      squashfs                                                                     0   100% /snap/cups/872
loop17      squashfs                                                                     0   100% /snap/gnome-3-28-1804/161
loop18      squashfs                                                                     0   100% /snap/gnome-3-28-1804/145
loop19      squashfs                                                                     0   100% /snap/gnome-3-34-1804/77
loop20      squashfs                                                                     0   100% /snap/gnome-3-34-1804/72
loop21      squashfs                                                                     0   100% /snap/gnome-3-38-2004/115
loop22      squashfs                                                                     0   100% /snap/gnome-3-38-2004/119
loop23      squashfs                                                                     0   100% /snap/gnome-42-2204/44
loop24      squashfs                                                                     0   100% /snap/gnome-42-2204/56
loop25      squashfs                                                                     0   100% /snap/gnome-system-monitor/178
loop26      squashfs                                                                     0   100% /snap/gnome-system-monitor/181
loop27      squashfs                                                                     0   100% /snap/gtk-common-themes/1534
loop28      squashfs                                                                     0   100% /snap/pdftk/9
loop29      squashfs                                                                     0   100% /snap/gtk-common-themes/1535
loop30      squashfs                                                                     0   100% /snap/snap-store/638
loop31      squashfs                                                                     0   100% /snap/snap-store/599
loop32      squashfs                                                                     0   100% /snap/spotify/58
loop33      squashfs                                                                     0   100% /snap/spotify/60
loop34      squashfs                                                                     0   100% /snap/walc/19
loop35      squashfs                                                                     0   100% /snap/xournalpp/69
loop36      squashfs                                                                     0   100% /snap/xournalpp/61
sda                                                                                               
├─sda1      exfat    Ventoy                   D558-0641                              23,3G    19% /media/tom/Ventoy
└─sda2      vfat     VTOYEFI                  B228-8EFB                               7,8M    76% /media/tom/VTOYEFI
sdb         iso9660  Ubuntu 22.04.1 LTS amd64 2022-08-10-16-21-45-00                              
├─sdb1      iso9660  Ubuntu 22.04.1 LTS amd64 2022-08-10-16-21-45-00                     0   100% /media/tom/Ubuntu 22.04.1 LTS amd64
├─sdb2      vfat     ESP                      8D6C-A9F8                                           
├─sdb3                                                                                            
└─sdb4      ext4     writable                 cb3577c8-f301-4e8d-89c4-9073a372313f   10,2G     0% /media/tom/writable
nvme0n1                                                                                           
├─nvme0n1p1 vfat     ESP                      108E-5584                             728,9M     7% /boot/efi
├─nvme0n1p2 vfat     OS                       6EC6-83CF                                           
└─nvme0n1p3 ext4     UBUNTU                   05d97eaa-d7b7-4f80-98e1-dca239de0c03  195,3G    47% /

my disk is however 1TB

oldfred avatar
cn flag
You did refresh your full backup, before making a major change like repartitioning? When you say used what do you mean. Post in question: `sudo parted -l` and `lsblk -f` If resizing partition by moving it, a crash in the middle can damage system so data is not recoverable or part in old partition location & part in new location on drive. What does testdisk show? If deeper search shows files immediately back those up to another drive. https://help.ubuntu.com/community/DataRecovery & http://www.cgsecurity.org/wiki/TestDisk
Tom avatar
ke flag
Tom
I updated the question. I have important data saved and everything still works, but when I go to disks, it shows me that only 230 GB are free
oldfred avatar
cn flag
Is p3 on NVMe drive the partition you are seeing as 230GB free? How much space was used before. Did the partition change start to shrink it, but did not complete, so damaged. Have you tried fsck? After a crash and any issue, that is normally the first thing to try. https://askubuntu.com/questions/642504/ubuntu-14-04-is-not-booting-normaly-after-a-manual-hard-boot/642789#642789
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.