I had Moonfire-nvr running on a Raspberry Pi 4 with 8 TB of external storage for video. My Pi crashed in March and I ended up having to re-install on the SD HC card a new operating system. Left over from the previous install was the 8 TBs at 100% capacity with old video files.
It took me over 4 hours to delete 4 directories having a combined
size of 8 TBs. Here are two subdirectories I removed, I had
allocated 2 TB for each camera. I used root because my experience
has been root can quickly delete whereas lesser empowered accounts
can take longer. Still... 1 hour to delete 2 TBs of approximately
45-50k files?? That's a lot of time!
root@raspberrypi:/videos# ls peck_east |wc
48281 48281 820765
root@raspberrypi:/videos# ls peck_west |wc
47246 47246 803170
root@raspberrypi:/videos# time rm -rf peck_east
real 61m35.872s
user 0m0.367s
sys 1m15.157s
root@raspberrypi:/videos# time rm -rf peck_west
real 60m31.124s
user 0m0.267s
sys 1m13.934s
root@raspberrypi:/videos#
My hard drive is a 12 TB Western Digital Purple (optimal and
recommended for video storage). I partitioned 8 TB for video
storage for 4 cameras.
Using LVM:
pi@raspberrypi:/usr/local/src/moonfire-nvr $ sudo lvdisplay
--- Logical volume ---
LV Path /dev/vgpurple/cameras
LV Name cameras
VG Name vgpurple
LV UUID swI29O-uPH0-cxJN-KXVt-6oBn-TZdM-1aLgZr
LV Write Access read/write
LV Creation host, time raspberrypi, 2020-06-10 13:43:34 -0700
LV Status NOT available
LV Size 8.00 TiB
Current LE 2097152
Segments 1
Allocation inherit
Read ahead sectors auto
File system ext4:
Scott recommend "pi@raspberrypi:/videos $ sudo file -sL /dev/mapper/vgpurple-cameras
/dev/mapper/vgpurple-cameras: Linux rev 1.0 ext4 filesystem data, UUID=7dc1f64f-0c02-43de-9a7d-089dc606099e (needs journal recovery) (errors) (extents) (64bit) (large files) (huge files)
pi@raspberrypi:/videos $
mkfs.ext4 -T largefile" per
https://github.com/scottlamb/moonfire-nvr/wiki/System-setup#sample-directory-filesystems-on-hard-disks
I did not preserve what I used, but the "(large files)" in the file output suggest I followed his
suggestion.In hindsight, I did not need to preserve anything on that partition and it might have just been quicker to re-install ext4 on that partition and saved the wear & tear of the heads and 4 hours.
Thoughts?
John
John Laurence Poole
1566 Court ST NE
Salem OR 97301-4241
707-812-1323 office
I had Moonfire-nvr running on a Raspberry Pi 4 with 8 TB of external storage for video. My Pi crashed in March and I ended up having to re-install on the SD HC card a new operating system. Left over from the previous install was the 8 TBs at 100% capacity with old video files.
It took me over 4 hours to delete 4 directories having a combined size of 8 TBs. Here are two subdirectories I removed, I had allocated 2 TB for each camera. I used root because my experience has been root can quickly delete whereas lesser empowered accounts can take longer. Still... 1 hour to delete 2 TBs of approximately 45-50k files?? That's a lot of time!
root@raspberrypi:/videos# ls peck_east |wc
48281 48281 820765
root@raspberrypi:/videos# ls peck_west |wc
47246 47246 803170
root@raspberrypi:/videos# time rm -rf peck_east
real 61m35.872s
user 0m0.367s
sys 1m15.157s
root@raspberrypi:/videos# time rm -rf peck_west
real 60m31.124s
user 0m0.267s
sys 1m13.934s
root@raspberrypi:/videos#
My hard drive is a 12 TB Western Digital Purple (optimal and recommended for video storage). I partitioned 8 TB for video storage for 4 cameras.
Using LVM:
pi@raspberrypi:/usr/local/src/moonfire-nvr $ sudo lvdisplay
--- Logical volume ---
LV Path /dev/vgpurple/cameras
LV Name cameras
VG Name vgpurple
LV UUID swI29O-uPH0-cxJN-KXVt-6oBn-TZdM-1aLgZr
LV Write Access read/write
LV Creation host, time raspberrypi, 2020-06-10 13:43:34 -0700
LV Status NOT available
LV Size 8.00 TiB
Current LE 2097152
Segments 1
Allocation inherit
Read ahead sectors autoFile system ext4:
Scott recommend "pi@raspberrypi:/videos $ sudo file -sL /dev/mapper/vgpurple-cameras
/dev/mapper/vgpurple-cameras: Linux rev 1.0 ext4 filesystem data, UUID=7dc1f64f-0c02-43de-9a7d-089dc606099e (needs journal recovery) (errors) (extents) (64bit) (large files) (huge files)
pi@raspberrypi:/videos $
mkfs.ext4 -T largefile" per https://github.com/scottlamb/moonfire-nvr/wiki/System-setup#sample-directory-filesystems-on-hard-disks I did not preserve what I used, but the "(large files)" in the file output suggest I followed his suggestion.
In hindsight, I did not need to preserve anything on that partition and it might have just been quicker to re-install ext4 on that partition and saved the wear & tear of the heads and 4 hours.
--
You received this message because you are subscribed to the Google Groups "moonfire-nvr-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moonfire-nvr-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moonfire-nvr-users/9112f0f8-7410-49d6-b59a-022e105b177f%40gmail.com.