Storage size issue
Storage size issue
Hi guys,
Ive added a new storage disk on my zm server (ubuntu 22.04 Jammy):
root@ubuntu-tiny-3:~# df -h /mnt/nvme-storage
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p1 234G 28K 222G 1% /mnt/nvme-storage
But when adding it to zoneminder its only showing a portion of the free space:
2 NewStorage /dev/nvme0n1p1 local Medium 0.00B of 7.69GB
Any hints or tips will be greatly appreciated!
Regards,
Dan
Ive added a new storage disk on my zm server (ubuntu 22.04 Jammy):
root@ubuntu-tiny-3:~# df -h /mnt/nvme-storage
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p1 234G 28K 222G 1% /mnt/nvme-storage
But when adding it to zoneminder its only showing a portion of the free space:
2 NewStorage /dev/nvme0n1p1 local Medium 0.00B of 7.69GB
Any hints or tips will be greatly appreciated!
Regards,
Dan
Re: Storage size issue
Bah! ignore this, I created a directory in the new mount, changed the path, now its working.. Newbie at linux..
Re: Storage size issue
I am not sure though, why its showing usage.
root@ubuntu-tiny-3:/mnt/nvme-storage/zm-events# df -h /mnt/nvme-storage/zm-events/
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p1 234G 32K 222G 1% /mnt/nvme-storage
2 NewStorage /mnt/nvme-storage/zm-events local Medium 11.94GB of 233.67GB 0 using null
root@ubuntu-tiny-3:/mnt/nvme-storage/zm-events# df -h /mnt/nvme-storage/zm-events/
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p1 234G 32K 222G 1% /mnt/nvme-storage
2 NewStorage /mnt/nvme-storage/zm-events local Medium 11.94GB of 233.67GB 0 using null
Re: Storage size issue
Used: 32K ? That will be because you created a directory or two. It's nothing in the overall scheme of things.
Also, there is always an amount of space reserved for "the super user" which eats up a percentage of the truly available space. You can reduce this amount to zero if you really feel the need to squeeze every byte out, but you usually do this when first creating the filesystem. You may be able to "tune" the filesystem afterwards to change that value, and reserve 0 for super user.
This is done to prevent a normal user filling up the file system to actual 100%, leaving no space for root to be able to e.g. create a script to fix things, to see log files etc. It shouldn't be an issue on a CCTV-only volume.
Re: Storage size issue
Thanks for your reply.
What im wondering is why zoneminder sees 11.94GB used while ubuntu shows 32kb?
What im wondering is why zoneminder sees 11.94GB used while ubuntu shows 32kb?
Re: Storage size issue
Reserved block count: 3125725
I guess this explains it?
I guess this explains it?
Re: Storage size issue
At 4096 bytes (4k per block) that's 12.8E9 bytes, so close enough ...
Also, 5% of your 237G is ... 11.6G -- and co-incidentally 5% is the default reserved block count.
You definitely could recover most of that by setting reserved blocks to zero.
The sense that "this is a lot of reserved space for nothing, right??" is echoed here
https://askubuntu.com/questions/19504/r ... n-os-disks
Here is someone from 2020 with a 236G file system and 11G gone
https://sleeplessbeastie.eu/2020/05/18/ ... em-blocks/
And further down that link they show an example of setting reserved to ZERO with
Code: Select all
sudo tune2fs -m 0 /dev/sda3
I've got into the habit of setting reserved to zero when first mkfs.ext3-ing my data partitions (only) because of this sort of thing!
-
- Posts: 1320
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Storage size issue
Upvote...
except ext3?
except ext3?
Re: Storage size issue
Thank you for that explanation, makes a lot of sense now!
Gonna have to give this a try.
Much appreciated!
Gonna have to give this a try.
Much appreciated!
Re: Storage size issue
From man: "tune2fs - adjust tunable file system parameters on ext2/ext3/ext4 file systems"
So yes, including ext3. Just because there's a 2 in the name, doesn't mean it only does ext2
-
- Posts: 1320
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Storage size issue
OK, I forgot your experience probably predates ext4when first mkfs.ext3-ing my data partitions
Re: Storage size issue
It really does ... I was using the default ext2 when I started (Slackware on 50 floppy disks, 1993 era), and when ext3 turned up it was basically "ext2 with journaling bolted on" so had no worries switching to it,dougmccrary wrote: ↑Mon Jun 17, 2024 8:11 amOK, I forgot your experience probably predates ext4when first mkfs.ext3-ing my data partitions
Ext4 was only created in 2008 and I can't remember exactly why, but in 2010 when I built my NAS/RAID server, I did not go for ext4. Maybe there were still some concerns to work out before it became mainstream reliable. Dunno. But my notes do show that all the data filesystems were created ext3!
-
- Posts: 1320
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Storage size issue
One doesn't want to jump on the new stuff until it's been thoroughly field tested, does one?I did not go for ext4.
Re: Storage size issue
I realise you are gently poking fun (I accept that!), but the serious answer is that at that time (2010) ext4 *wasn't* thoroughly field tested. I'm more than happy to let other people do the whole "bleeding edge testing" and find out what's wrong with it.dougmccrary wrote: ↑Mon Jun 17, 2024 8:25 pmOne doesn't want to jump on the new stuff until it's been thoroughly field tested, does one?I did not go for ext4.
The reason I built the NAS/RAID thing in the first place was a total (justified) paranoid distrust in garbage "NAS" devices and flaky hard drives. I was trying to stamp out all possible sources of problems by using stuff that works, that I understand, and that isn't going to eat my data when I'm not looking. Adding enough md5summing, paranoia check-and-verify, idiot-user-proofing based on dumb stuff I've done/seen done/heard about.
It's 14 years later. It is still working as designed ...
Rock and roll stuff like "hey, let's upgrade the ext3 filesystem to ext4, just because!" is not on my to-do list in that 14 years.
-
- Posts: 1320
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Storage size issue
I understand. I'm not sure of the timeframe, but I do recall going through HDDs like they were going out of style. And in a sense, maybe they were...