Stranges things in a strange world

Hello Dietpi Community,

Thanks again for the help these threads provide. I would like to understand why, after a fresh install, I have an sda1 partition dedicated to RootFs that is 5.8Gib in size - I really don’t have much installed at the moment.

-I feel like I have a “duplicate” RootFs, or is it because of the f2fs formatting of my partition that does not show the correct size? nothing really serious, but I would like to understand.

-This is the Drive_Manager report:

RPi 3 Model B (armv7l) | IP: --------

┌───────────────────────────────────────┤ DietPi-Drive_Manager ├───────────────────────────────────────┐
│ Mount target: /                                                                                      │
│ Mount source: /dev/sda1                                                                              │
│ Filesystem:   f2fs                                                                                   │
│ UUID:         7cb6012e-9168-434c-91e7-e7bb26998ada                                                   │
│ Allocation:   Capacity: 365GiB | Used: 5.8GiB (2%)                                                   │
│ Status:       Drive is online and ready for use                                                      │
│ Read only:    Disabled                                                                               │
│                                                                                                      │
│                             ●─ Benchmark Options ─────────────────────────────────────●              │
│              Benchmark      : Test read and write speeds                                             │
│                             ●─ Userdata & Swap options ───────────────────────────────●              │
│              User data      : [X] | DietPi user data is currently located on this drive              │
│              Swap file      : [X] | 1076 MiB used on this drive, select to change size               │
│                             ●─ Advanced options ──────────────────────────────────────●              │
│              Read Only      : [ ] | Select to toggle RW/RO modes                                     │
│              Check & Repair : Check and optionally repair filesystem                                 │
│              Resize         : Maximize the available filesystem size                                 │
│              I/O Scheduler  : [mq-deadline]                                                          │
│                                                                                                      │
│                                                                                                      │
│                             <Ok>                                 <Back>

and here the softwares installed :

┤ DietPi-Software ├──────────────────────────────────────────┐
│ Use the spacebar to select the software you would like to remove:                                    │
│                                                                                                      │
│    [ ] 17   Git: Clone and manage Git repositories locally                                           │
│    [ ] 73   Fail2Ban: prevents brute-force attacks with ip ban                                       │
│    [ ] 103  DietPi-RAMlog: Makes /var/log a RAM disk, preserves file structure on reboot             │
│    [ ] 104  Dropbear: Lightweight SSH server                                                         │
│    [ ] 130  Python 3: Runtime system, pip package installer and development headers                  │
│    [ ] 170  UnRAR: unarchiver for .rar files                                                         │
│                                                                                                      │
│                             <Ok>                                 <Back>

-Thank for the help - cdlt
:call_me_hand:

This value is obtained from this command:

findmnt -Ufnro USED -M /

That should be correct, but you can compare with df -h /. You have a ~1 GiB swap file which adds to this size.

You can run the following to identify where the major used space is coming from:

G_TREESIZE /

Since it is an F2FS rootfs, it is not one of our official images, is it? Or is it the one for RPi we had among our downloads a while ago?

1 Like

hi @MichaIng ,

ok i understand better, can you tell me if the sizes of /var and /usr seem normal to you or not ? Here is the feedback :

2,3 GiB /
1,1 GiB /var
1,1 GiB /usr
51,1 MiB /boot
23,3 MiB /root
2,9 MiB /run
1,6 MiB /etc
32,5 KiB /mnt
9,0 KiB /home
3,5 KiB /srv
3,5 KiB /opt
3,5 KiB /media
3,5 KiB /lost+found
0,0 bytes /tmp
0,0 bytes /sys
0,0 bytes /proc
0,0 bytes /dev

yes this is the official image from the site, I just formatted my external SSD in F2FS then created a partition and moved the rootfs with Drive-manager , it’s a fresh install so…

####Information

  • DietPi version | G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=11
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘not applicable’
  • Distro version | bullseye 0
  • Kernel version | Linux DietPi 5.15.76-v7+ #1597 SMP Fri Nov 4 12:13:17 GMT 2022 armv7l GNU/Linux
  • SBC model | RPi 3 Model B (armv7l)
  • Power supply used | 5V Official Power supply
  • SD card used | SanDisk ultra Classe 10 32gb for boot and external ssd crucial 500gb with 2 partitions - sda1 for rootfs

…in any case thank you for the explanations - have a nice day :call_me_hand:t5:

Hmm that output indeed doesn’t match the 5.8 GiB reported before. Seems like F2FS adds large amount of overprovisioning for internal stuff:

Thought this example is for a very small filesystem. Not sure whether something like reserved blocks (like in ext4) exists and is shown as part of “used” space on F2FS.

1 Like

https://manpages.debian.org/bullseye/f2fs-tools/mkfs.f2fs.8.en.html#o

Should be possible to check for this size, adjust it and see whether it affects the observed difference in disk usage.

1 Like

…yes thx, I’m on the same link I’m going to look at it this afternoon… I’ll come back and give you a feedback …

edit 14.08pm : I think it’s formatting from drive-manager without the -o option that creates this …
I test withfsck.f2fs to see how it’s going by following :
https://www.real-world-systems.com/docs/mkfs.f2fs.1.html

…a little feedback after a few tries -

I tried several times to format a test SSD to f2fs, through drive-manager and another time using the mkfs.f2fs command with the options available here:
mkfs.f2fs make file system for f2fs NAND flash drive special (real-world-systems.com)
The formatting phase goes well in all cases except that the overprovision and the management of segments by section - section by zone is dificult to calculate and that the default options make appear a bug making raise false information of disk occupation - All that to say that the gains of performance are not felt more than that, with the detriment of the taking into account of the command fsck when the ssd crashes, but also a not always reliable logging .

  • It’s just a little personal test feedback with the little knowledge I have, but thanks google for the research - all that to say that I switched back to EXT4 and that my partitions are giving me the real usage of the disk - :call_me_hand:

As said, I think it’s not a bug but that the overprovisioning -o option is counted as “used” disk space on F2FS. On ext4 there is a reserved blocks setting, defaulting to 5% filesystem size. But while it reduces the “free/available space”, it isn’t counted into “used” space.