Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a disk image in Ext4 to store the logs #119

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alonsovidales
Copy link
Collaborator

Note that before merging the diff I will upload to the content disk files the image, the image is created with:

dd if=/dev/zero of=/mnt/content/www_log.img bs=10M count=10
mkfs.ext4 /mnt/content/www_log.img

Using this image we can keep inside the NTFS volume a Ext4 with permissions that will allow log rotation and so on, this will also prevent flooding the root volume with logs. The image size is 100MB that should be enough for this.

This is how it looks like:

pi@elimupi:/mnt/content/www_log $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       118G  9.8G  103G   9% /
devtmpfs        1.7G     0  1.7G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           759M  1.3M  758M   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
/dev/mmcblk0p1  255M   91M  164M  36% /boot
/dev/sda3       466G  348G  119G  75% /mnt/content
/dev/loop0       92M   32K   85M   1% /mnt/content/www_log
/dev/sda1       197M  2.0K  197M   1% /media/pi/EFI
tmpfs           380M  4.0K  380M   1% /run/user/1000
pi@elimupi:/mnt/content/www_log $ ls
access.log  admin-log  error.log  fdroid-log  files-log  lost+found

#33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant