You are not logged in.
Hi,
after resizing one of my ext4-Partition Arch didn't booted any more.
I commented the Partition in /etc/fstab and the System booted.
I then mounted the Partition, but only a few files seems to be on the Partition.
But when i see how much space is left, it is still as much as before the resizing. It is like the files are still on the Disk, but are not shown anymore.
I guess, the Filesystem might be broken?
I unmounted the Partition and created an Image (dd if=/dev/sdc4/ of=/home/paulbrause/sdc4.img).
Is there a chance to recover these files?
I have backuped nearly all of the files, but (of course) not everything.
Thank you in advance,
Christian
Last edited by paulbrause (2022-10-19 21:25:54)
Offline
Which way did you resize it. The end of the partition or the start? If you shrank it, did you shrink the file system first, and then the partition. Or if you made it larger, did you expand the partition and then expand the file system into that space? And, you resized it without it being mounted? Not while it was being written to? Etc.
Is there a chance to recover these files?
Always a good idea to backup first before a partition resize.
Show what you did.
Offline
I resized it with gparted.
The partition is the last one of three on the disk. I deleted the middle one (was NTFS), created a new partition with ext4, but a smaller one.
The "rest" of the free space i used for the "crashed" partition.
So yes, i expanded the partition.
It was not mounted while resizing.
Offline
So the start of the partition was moved rather than the end?
What did you do after resizing the partition? How did you resize the filesystem?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Yes, the start of the partition was moved.
I did resize the partition with geparted. There was no error and after that i restart my PC.
Offline
How did you resize the filesystem?
fdisk -l
lsblk -f
df -hOffline
fdisk -lFestplatte /dev/sdc: 2,73 TiB, 3000592982016 Bytes, 5860533168 Sektoren
Festplattenmodell: WDC WD30EZRX-00D
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 4096 Bytes
E/A-Größe (minimal/optimal): 4096 Bytes / 4096 Bytes
Festplattenbezeichnungstyp: gpt
Festplattenbezeichner: DCF6F08D-F117-48B2-BEAF-64A0D155F240
Gerät Anfang Ende Sektoren Größe Typ
/dev/sdc1 2048002048 3670278143 1622276096 773,6G Linux-Dateisystem
/dev/sdc2 2048 2048002047 2048000000 976,6G Linux-Dateisystem
/dev/sdc4 3670278144 5860532223 2190254080 1T Microsoft Basisdaten
Partitionstabelleneinträge sind nicht in Festplatten-Reihenfolge.lsblk -fsdc
├─sdc1 ext4 1.0 9c46cbcc-2578-4fcf-9c61-55f0beba984f 683,3G 5% /home/paulbrause/Timeshift
│ /mnt/timeshift
├─sdc2 ext4 1.0 b8eca612-a43a-43cd-83f3-1f9561234c62 427,8G 50% /home/paulbrause/Musik
│ /mnt/musik
└─sdc4 ext4 1.0 c950dc48-a278-40df-b5c3-5584b978ad34 df -hDateisystem Größe Benutzt Verf. Verw% Eingehängt auf
dev 7,8G 0 7,8G 0% /dev
run 7,8G 1,8M 7,8G 1% /run
/dev/sdf1 885G 303G 537G 37% /
tmpfs 7,8G 66M 7,8G 1% /dev/shm
/dev/sda1 229G 8,8G 208G 5% /mnt/workspace
tmpfs 7,8G 31M 7,8G 1% /tmp
/dev/sde1 55G 12G 41G 23% /mnt/dropbox
/dev/sde2 55G 24K 52G 1% /mnt/syncthing
/dev/sdb2 96M 34M 63M 35% /boot/efi
/dev/sdc2 962G 485G 428G 54% /mnt/musik
/dev/sdd3 1,8T 1,4T 292G 83% /mnt/fotos
/dev/sdc1 761G 39G 684G 6% /mnt/timeshift
/dev/sdd1 480G 32K 456G 1% /mnt/arbeit
/dev/sdd2 480G 108M 456G 1% /mnt/daten
tmpfs 1,6G 88K 1,6G 1% /run/user/1000(I have not mounted the partiton at this moment, so nothing's shown here. Should i repeat this with mounted drive?)
Hmmm, i see, that there is something wrong with the filesystem, because fdisk lists the partition as Microsoft filesystem, right?
But when i open gparted, the partition is shown as ext4.
Offline
You should repeat this with the file system mounted, the partition type is generally irrelevant and should have no bearing on this issue per se
Offline
fdisk -lFestplatte /dev/sdc: 2,73 TiB, 3000592982016 Bytes, 5860533168 Sektoren
Festplattenmodell: WDC WD30EZRX-00D
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 4096 Bytes
E/A-Größe (minimal/optimal): 4096 Bytes / 4096 Bytes
Festplattenbezeichnungstyp: gpt
Festplattenbezeichner: DCF6F08D-F117-48B2-BEAF-64A0D155F240
Gerät Anfang Ende Sektoren Größe Typ
/dev/sdc1 2048002048 3670278143 1622276096 773,6G Linux-Dateisystem
/dev/sdc2 2048 2048002047 2048000000 976,6G Linux-Dateisystem
/dev/sdc4 3670278144 5860532223 2190254080 1T Microsoft Basisdaten
Partitionstabelleneinträge sind nicht in Festplatten-Reihenfolge.lsblk -fsdc
├─sdc1 ext4 1.0 9c46cbcc-2578-4fcf-9c61-55f0beba984f 683,3G 5% /home/paulbrause/Timeshift
│ /mnt/timeshift
├─sdc2 ext4 1.0 b8eca612-a43a-43cd-83f3-1f9561234c62 427,8G 50% /home/paulbrause/Musik
│ /mnt/musik
└─sdc4 ext4 1.0 c950dc48-a278-40df-b5c3-5584b978ad34 0 96% /home/paulbrause/Downloads
/mnt/downloadsdf -hDateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/dev/sdc4 1,1T 988G 0 100% /mnt/downloadsOffline
You're at 100% usage here... if you resized the file system to a size that can't actually contain what you intend to carry on it then that very much explains the symptoms.
Let's back up a bit, what size was the file system before your resize operation and what was your motivation for doing the resize? If you are confused about lacking a few ~100 GBs see https://wiki.archlinux.org/title/Ext4#B … node_ratio and https://wiki.archlinux.org/title/Ext4#Reserved_blocks
Offline
The usage before was at about 95%, i know.
But i expanded the partition, shouldn't i have now more free space?
Honestly i don't know, how big exactly the partition before was, i would guess around 800GB.
And my motivation was to increase the space on this partition. ![]()
Last edited by paulbrause (2022-10-21 17:06:20)
Offline
Expanded to what?
Right now sdc4 is 1TB and has a 1TB filesystem.
The first partition is sdc2, sdc1 is right of that and sdc4 right behind that.
The three use up the entire device and the filesystem sizes match.
Offline
Expanded from ~800GB to 1TB.
sdc1 was >1TB NTFS-partition, i deleted this and created an smaller ext4-partititon and expanded sdc4 to this free space.
Sorry, but my english is not that good...
Last edited by paulbrause (2022-10-21 19:07:19)
Offline
Well, yeah.
That's all good and fine, you're simply using up that space now.
https://archlinux.org/packages/community/x86_64/ncdu/ - but it's likely your porn folder ![]()
Offline
Haha, no, no porn. ![]()
ncdu shows, that only 11 GB are used.
ncdu 2.1.2 ~ Use the arrow keys to navigate, press ? for help
--- /run/media/paulbrause/c950dc48-a278-40df-b5c3-5584b978ad34 ---------
. 10.9 GiB [##########] /#MP3
26.2 MiB [ ] Teeth Saucer.zip
24.0 MiB [ ] Teeth Cup.zip
22.9 MiB [ ] shutterstock_1166416783.jpg
20.0 MiB [ ] shutterstock_594962792.jpg
17.3 MiB [ ] shutterstock_1183461973.jpg
11.0 MiB [ ] Stiftung Warentest Fi...Magazin No 03 2022.pdf
7.3 MiB [ ] Stiftung Warentest Fi...Magazin No 02 2022.pdf
6.1 MiB [ ] arno-pro.zip
5.4 MiB [ ] shutterstock_2067691046.eps
5.3 MiB [ ] shutterstock_1996677905.eps
4.4 MiB [ ] shutterstock_256067590.eps
2.8 MiB [ ] Vorgang81ecf39f-99ad-...-946f-5bd588e9c668.pdf
2.6 MiB [ ] shutterstock_256067590 [Konvertiert].ai
2.4 MiB [ ] 2020-07-04.nmea
2.4 MiB [ ] 2020-02-17.nmea
2.3 MiB [ ] 2018-06-30.nmea
2.2 MiB [ ] 2017-07-08.nmea
2.2 MiB [ ] 2020-09-02.nmea
2.2 MiB [ ] 2017-03-30.nmea
2.1 MiB [ ] 2018-05-27.nmea
2.0 MiB [ ] 2020-08-28.nmea
2.0 MiB [ ] 2020-06-30.nmea
2.0 MiB [ ] 2018-05-05.nmea
2.0 MiB [ ] 2018-03-25.nmea
1.9 MiB [ ] gutschein-2012.pdf
1.9 MiB [ ] 2021-07-15.nmea
1.9 MiB [ ] 2018-05-13.nmea
1.5 MiB [ ] 2017-06-24.nmea
1.4 MiB [ ] 2020-08-22.nmea
1.3 MiB [ ] 2020-08-29.nmea
1.3 MiB [ ] 2017-09-05.nmea
1.3 MiB [ ] 2020-08-23.nmea
1.1 MiB [ ] 2020-08-25.nmea
868.0 KiB [ ] 2020-08-27.nmea
832.0 KiB [ ] 2017-05-21.nmea
816.0 KiB [ ] 2020-08-24.nmea
800.0 KiB [ ] 2018-02-25.nmea
736.0 KiB [ ] Headphone_Hook_2.1_-_Copy.STL
732.0 KiB [ ] 2018-02-18.nmea
732.0 KiB [ ] 2018-03-18.nmea
700.0 KiB [ ] 2018-02-17.nmea
660.0 KiB [ ] 2017-04-29.nmea
476.0 KiB [ ] pdf001.pdf
468.0 KiB [ ] napoli.pdf
448.0 KiB [ ] medal_maker_v2.stl
384.0 KiB [ ] 2016-10-30.nmea
344.0 KiB [ ] 2017-09-06.nmea
284.0 KiB [ ] 2017-02-14.nmea
220.0 KiB [ ] 2017-02-26.nmea
192.0 KiB [ ] Zeichenfläche 2@600x.png
108.0 KiB [ ] Zeichenfläche 2@400x.png
88.0 KiB [ ] Zeichenfläche 2@800x-8.png
88.0 KiB [ ] Fd5yojoWAAUpo9e.jpg
60.0 KiB [ ] Zeichenfläche 2@600x-8.png
40.0 KiB [ ] rgm.py
40.0 KiB [ ] Zeichenfläche 2@200x.png
36.0 KiB [ ] Zeichenfläche 2@400x-8.png
Total disk usage: 11.1 GiB Apparent size: 11.1 GiB Items: 660Offline
Try to run ncdu as root and otherwise post the outputs of
df -hi
mountOffline
ncdu as root shows exactly the same as non-root.
df -hi/dev/sdc4 66M 2,2M 64M 4% /mnt/downloadsmount/dev/sdc4 on /home/paulbrause/Downloads type ext4 (rw,noatime)Offline
Not excerpts of the output - esp. not the "mount" one.
You're not running out of inodes, but 2.2M seems a lot for 11GB of data
"df -h" is still at 100% usage?
Offline
Yes, df -h is still at 100%.
/dev/sdc4 1,1T 988G 0 100% /mnt/downloadsbut 2.2M seems a lot for 11GB of data
Is it possible, that this is because these are still the inodes of the "disappeared" data?
Offline
Is it possible, that this is because these are still the inodes of the "disappeared" data?
Well see.
I want to see the entire output of "mount", not only the line for sdc4
Offline
Oh, my bad. Sorry.
~ $ mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=8145232k,nr_inodes=2036308,mode=755,inode64)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/sdf1 on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=15633)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,nr_inodes=1048576,inode64)
/dev/sdb2 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/sda1 on /mnt/workspace type ext4 (rw,noatime)
/dev/sde2 on /mnt/syncthing type ext4 (rw,noatime)
/dev/sde2 on /home/paulbrause/Syncthing type ext4 (rw,noatime)
/dev/sde1 on /mnt/dropbox type ext4 (rw,noatime)
/dev/sde1 on /home/paulbrause/Dropbox type ext4 (rw,noatime)
/dev/sdc2 on /mnt/musik type ext4 (rw,noatime)
/dev/sdd1 on /mnt/arbeit type ext4 (rw,noatime)
/dev/sdc2 on /home/paulbrause/Musik type ext4 (rw,noatime)
/dev/sdc1 on /mnt/timeshift type ext4 (rw,noatime)
/dev/sdd2 on /mnt/daten type ext4 (rw,noatime)
/dev/sdd3 on /mnt/fotos type ext4 (rw,noatime)
/dev/sdd1 on /home/paulbrause/Arbeit type ext4 (rw,noatime)
/dev/sdd2 on /home/paulbrause/Daten type ext4 (rw,noatime)
/dev/sdd3 on /home/paulbrause/Fotos type ext4 (rw,noatime)
/dev/sdc1 on /home/paulbrause/Timeshift type ext4 (rw,noatime)
/dev/sda1 on /home/paulbrause/Arbeit/Workspace type ext4 (rw,noatime)
/dev/sda1 on /mnt/arbeit/Workspace type ext4 (rw,noatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1632584k,nr_inodes=408146,mode=700,uid=1000,gid=1000,inode64)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/etc/autofs/auto.nas on /home/paulbrause/NAS type autofs (rw,relatime,fd=6,pgrp=1139,timeout=60,minproto=5,maxproto=5,indirect,pipe_ino=20153)
/etc/autofs/auto.cifs on /home/paulbrause/StorageBox type autofs (rw,relatime,fd=12,pgrp=1139,timeout=60,minproto=5,maxproto=5,indirect,pipe_ino=21752)
/etc/autofs/auto.misc on /misc type autofs (rw,relatime,fd=18,pgrp=1139,timeout=300,minproto=5,maxproto=5,indirect,pipe_ino=21219)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sdc4 on /mnt/downloads type ext4 (rw,noatime)
/dev/sdc4 on /home/paulbrause/Downloads type ext4 (rw,noatime)~ $ df -hi
Dateisystem Inodes IBenutzt IFrei IUse% Eingehängt auf
dev 2,0M 756 2,0M 1% /dev
run 2,0M 1,3K 2,0M 1% /run
/dev/sdf1 57M 2,8M 54M 5% /
tmpfs 2,0M 118 2,0M 1% /dev/shm
tmpfs 1,0M 88 1,0M 1% /tmp
/dev/sdb2 0 0 0 - /boot/efi
/dev/sda1 15M 938K 14M 7% /mnt/workspace
/dev/sde2 3,5M 11 3,5M 1% /mnt/syncthing
/dev/sde1 3,5M 1,1K 3,5M 1% /mnt/dropbox
/dev/sdc2 62M 68K 61M 1% /mnt/musik
/dev/sdd1 31M 12 31M 1% /mnt/arbeit
/dev/sdc1 49M 1,1M 48M 3% /mnt/timeshift
/dev/sdd2 31M 340 31M 1% /mnt/daten
/dev/sdd3 114M 69K 114M 1% /mnt/fotos
tmpfs 399K 135 399K 1% /run/user/1000
/dev/sdc4 66M 2,2M 64M 4% /mnt/downloadsBut now i realized something curious...
When i try to boot my Arch, i stops booting and i get into emergency mode.
So i had to comment the partition out of /etc/fstab and Arch booted again.
# /mnt/downloads
UUID=c950dc48-a278-40df-b5c3-5584b978ad34 /mnt/downloads ext4 rw,noatime,defaults 0 2
/mnt/downloads/ /home/paulbrause/Downloads none bind 0 0(the original fstab-entry)
When i now manually mount the partition, i see, that there is about ~60GB free. But when i refresh the filemanager (i use dolphin) the free space decreases until it is at 0. ![]()
Offline
How does it behave w/o the bind mount?
Offline
Without the bind mount it's exactly the same...
Booting not possible with fstab, and when i manually mount, the partition shows a little free space which decreases in a few seconds to zero. ![]()
Offline
Did you check whether anything is using the partition?
sudo lsof | grep -i downloadsAre there files inside the mountpoints before you mount the partition?
Are there any symlinks involved?
Offline
I did check, but nothing is using the partition.
~ $ sudo lsof | grep -i downloads
lsof: WARNING: can't stat() fuse.portal file system /run/user/1000/doc
Output information may be incomplete.
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.Before i mount the partition there are no files inside the mountpoints.
And no, i have no symlinks to or from this partition.
Offline