eQualityTime / TheOpenVoiceFactory

The Open Voice Factory - open software for people with communication difficulties
http://theopenvoicefactory.org
23 stars 9 forks source link

Email bug. #147

Closed joereddington closed 1 year ago

joereddington commented 1 year ago

An issue came in by email:

Hello,

I tried to convert a pptx file to obz and the file it returned was only a couple of 100 bytes long and wouldn't open as a zip.

Pressing the debug info button gave error messages which suggested the disk was full.

Many thanks for the utility, I think it will be very useful,

It's been independently tested and I get this:

Screenshot 2023-05-10 at 11 11 57

It should be a simple fix right?

joereddington commented 1 year ago

Let's work on this.

I ssh into the server and run

df -h

to work out how much space is a problem. I get this:

Screenshot 2023-05-10 at 11 14 13

Yep - that looks like there really is just too much in the drive.

Two possible solutions:

Okay, I'm going to end up doing the first one sooner or later, but I don't want to risk data loss, so let's investigate the first one...

The command sudo find / -type f -size +100M finds me this:

Screenshot 2023-05-10 at 11 26 30

So that's a tiny bit of breathing space.

Before I expand the drive I want to do some good backups. I do the AWS image first.

Screenshot 2023-05-10 at 11 37 46

(I do this periodically anyway)

Because recovering from one of those snapshots might involve some tricky admin, I also periodically take a more old-school backup of the data by creating a encrypted backup to download locally with `sudo zip -e backup.zip html/designs/*.obz -t 2023-02-01'. However I don't think I have space for that, so I'm going to try run and run it from my local machine:

ssh XXX @theopenvoicefactory.org 'find /usr/share/nginx/html/designs -name "*.obz" -newermt 2023-03-01 -print0 | tar -czf - --null -T -' >backup.tar.gz (I've taken out some secruity stuff)

joereddington commented 1 year ago

Okay I've checked the local backup has the files I expect in, and the AWS image is: Screenshot 2023-05-10 at 11 56 36

So now I have to expand the drive. I've done this before for https://whitewaterwriters.com/ so should be easy enought.

In fact, I have the following entry in my logs:

06/01/22 18:59 to 19:29, Working on https://github.com/eQualityTime/Public/issues/139#issuecomment-1008743681 +EQT

I extended the size of the partition with these commands 1025 du -h 1026 df -h 1027 df -hT 1028 lsblk 1029 sudo growpart /devxvda 1 1030 sudo growpart /dev/xvda 1 1031 lsblk 1032 pwd 1033 df -h 1034 lsblk 1035 df -hT 1036 sudo xfs_growfs -d / 1037 df -hT

Which should help.

I've used the AWS website to do the increase:
Screenshot 2023-05-10 at 12 00 32

...and they direct you to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html so that you can put in the console commands to actually expand it.

I used the following commands:

2354 10/05/23 11:07:25 sudo lsblk 2355 10/05/23 11:10:14 df -hT 2356 10/05/23 11:12:42 sudo growpart /dev/xvda 1 2357 10/05/23 11:12:56 sudo lsblk 2358 10/05/23 11:13:07 df -hT 2359 10/05/23 11:13:19 sudo xfs_growfs -d / 2360 10/05/23 11:13:23 df -hT

and that seemed to work. Let's do a user-check.

User check

Screenshot 2023-05-10 at 12 22 47

That's not good. The message didn't go away for a few minuts so I sudo systemctl restart nginx and everything comes back. I create a test aid and everything is lovely. Screenshot 2023-05-10 at 12 50 15