Storage view shows not full memory capacity

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
markush
Posts: 11
Joined: Sun May 27, 2018 7:24 am

Storage view shows not full memory capacity

Post by markush »

Hi,

currently I'm using Zoneminder 1.32.3 on Ubuntu 18.04. For the recording I'm using a extra harddisk with 4 TB. I have created a storage in the options dialog, it shows the following:
Bildschirmfoto vom 2019-04-21 10-29-15.png
Bildschirmfoto vom 2019-04-21 10-29-15.png (5.69 KiB) Viewed 7294 times
Why doesn't it show the full size of the disk for the storage? :?:
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Storage view shows not full memory capacity

Post by iconnor »

a 4TB disk is probably measured in thousands instead of 1024's.
markush
Posts: 11
Joined: Sun May 27, 2018 7:24 am

Re: Storage view shows not full memory capacity

Post by markush »

I know, thats not my problem. What i mean was the information: "186.58GB of...". Why does the system only use 186.58 GB instead of the full 3.58TB? The complete hdd is empty! What's on if the 186.58GB used for recordings? Actually there are round about 600MBs used for recording...

Thanks!
User avatar
kitkat
Posts: 193
Joined: Sun Jan 27, 2019 5:17 pm

Re: Storage view shows not full memory capacity

Post by kitkat »

I'd expect a 4 TB drive to show somewhere in the region of 3.6 TB, so that part looks about right.

If this is a Linux system running an ext2/3/4 file system then the 'used space' could very well be the OS Reserved Blocks - This is typically 5% by default, which is close to the 180 GB showing as used on your drive.

You can see how much space is reserved (in blocks) with

Code: Select all

dumpe2fs -h /dev/sda1
(change /dev/sda1 to whatever your drive is called)

You can set the amount of reserved space with

Code: Select all

tune2fs -m 0.5 /dev/sda1
The value is in percent so the 0.5 represents one-half of one percent. Zero is acceptable, but may not be recommended.
markush
Posts: 11
Joined: Sun May 27, 2018 7:24 am

Re: Storage view shows not full memory capacity

Post by markush »

Ah okay, that sounds realistic! And dumpe2fs shows the following:

Code: Select all

dumpe2fs 1.44.1 (24-Mar-2018)
Filesystem volume name:   <none>
Last mounted on:          /video
Filesystem UUID:          7c888137-d8ce-4d1a-b87b-5d4f04b0f66f
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              244195328
Block count:              976754385
Reserved block count:     48837719
Free blocks:              960943943
Free inodes:              244192933
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Reserved GDT blocks:      1024
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Flex block group size:    16
Filesystem created:       Sat Apr 13 12:53:09 2019
Last mount time:          Mon Apr 22 10:48:04 2019
Last write time:          Mon Apr 22 10:48:04 2019
Mount count:              32
Maximum mount count:      -1
Last checked:             Sat Apr 13 12:53:09 2019
Check interval:           0 (<none>)
Lifetime writes:          60 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      148807e4-9184-42c4-8d9d-a3a4d9626110
Journal backup:           inode blocks
Checksum type:            crc32c
Checksum:                 0x52d6ee7a
Journal features:         journal_incompat_revoke journal_64bit journal_checksum_v3
Journal size:             1024M
Journal length:           262144
Journal sequence:         0x000012bb
Journal start:            1
Journal checksum type:    crc32c
Journal checksum:         0x2e8b0cb8
It's an ext4 Linux (Ubuntu 18.04). Thanks!
Michalbrezko
Posts: 2
Joined: Thu Apr 13, 2023 9:32 pm

Re: Storage view shows not full memory capacity

Post by Michalbrezko »

Hello gents!
I would like to ask for more help since I am struggling with something similiar. I followed this guide: https://www.youtube.com/watch?v=ElXdmx9FsKQ to add a storage to my raspberrypi. Everything went fine, untill I added a new storage in the zoneminder "Storage" settings and saw that I can only use 46.59GB of 915.79GB. My HDD is 1TB. I dont mind the 80GBs left somewhere I dont know where, but truly when I can only access 46.GBs then its wrong. I even tried to use the tune2fs -m 0 /dev/sdb1 command, but after reducing the reserved blocks I get 16.03MB of 915.79GB. So it's even worse. Obviosly, I tried to do it the other way around, but I cannot exceed more than 50% of the reserved blocks. After I put "sudo tune2fs -m 50 /dev/sdb1" I can get up to 465GBs of space, but its still not good. If I try to use more than 50, then I get "bad reserved block ratio". To be honest, I dont know anything of these things. If there was a solution on how to let the zoneminder use the whole disk, then I would be grateful for that.
Attachments
45.59GB of 915.79
45.59GB of 915.79
zm.png (14.57 KiB) Viewed 5519 times
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Storage view shows not full memory capacity

Post by iconnor »

My question is, what is taking up that space? Because your picture shows 0 events.

What is the output of df /dev/sdb1 ?. The info shown by the ui comes from php and can be weird.
Michalbrezko
Posts: 2
Joined: Thu Apr 13, 2023 9:32 pm

Re: Storage view shows not full memory capacity

Post by Michalbrezko »

Thank you for your reply, Iconnor,

There is nothing on the disk. It was freshly formatted to the ext4, then created a partition and that's all. When I was trying to search how to fix this, I read (but I am not sure how this all works) that there is user "root" that holds some space on the disks, just in case it fills up and I need to recover it somehow. So by default it is 5% of the disk that is assigned to the root user for emergency. Apparently, zonemidner sees only these 5%. When I try to change the reserved blocks percentage from 0% to 50% (max), then I can change the capacity of the disk that is viewed in the zonemidner. The problem is that I cant get it past 50%. (The attachement shows: 1. comand from console and then the result in zoneminder, 2. again from console but puttin the 50% of reserved blocks and then result in the zonemidner, 3. the df /dev/sdb1 result in the console). I am all new to this... Is there a way to locate the php file and change something inside so the zoneminder see the full disk space ? I will also try to connect the zonemidner to the cameras and see how it bahaves.

Just for info: I am using raspbian, bullseye, version 11.

Thanks and have a nice day.
Attachments
zmupdatesupport.png
zmupdatesupport.png (38.63 KiB) Viewed 5482 times
Post Reply