FOG image drive failed. What now?


  • my trusty 1 TB drive that has been hosting my fog images for the past year and a half or so is finally starting to show signs of failure by giving R/W errors when attempting to write an image and a later a failed SMART test. I have all of the images I need backed up on the machines running it what will it take for me to pull out my image drive and put a new one in and start from scratch. I have the drive set up with a symlink (I think that’d the terminology) with the fstab file to a images folder that fog is pointed to. Can I just swap out the drive point fstab to the new drive and will fog figure out the rest or is there something I need to do on fogs end for it to notice that there’s a new drive that that folder is directed to.


  • @george1421 said in FOG image drive failed. What now?:

    @cammykool This image error is related to the php code. Apache off load php (the language the web ui is written in) to php-fpm (dedicated php execution engine). The error you see is apache saying that php-fpm did not answer it was done with the task in time so apache timed out.

    There may be some clues to what is at fault in /var/log/php-fpm/error.log tail that and see if it tells you what its not liking. If you set the permissions of 777 on /images nothing should stop it from moving files.

    i had my coworker crack away at it. He got them all to delete and we are in good shape! Everything seems to be working and happy!

  • Moderator

    @cammykool This image error is related to the php code. Apache off load php (the language the web ui is written in) to php-fpm (dedicated php execution engine). The error you see is apache saying that php-fpm did not answer it was done with the task in time so apache timed out.

    There may be some clues to what is at fault in /var/log/php-fpm/error.log tail that and see if it tells you what its not liking. If you set the permissions of 777 on /images nothing should stop it from moving files.

  • Moderator

    @cammykool said in FOG image drive failed. What now?:

    Would that be my updating database issue too?

    This issue is a bit of a misdirection. It will throw an update database error when it can’t move the directory from /images/dev/<macaddress> to /images/<image_name>. It does this via FTP and logs in using fogproject and the password found in the .fogsettings file (also in the web ui fog settings tftp section)

    My bet is if you look in the /images/dev directory there will be directories with mac address looking names. These are botched image captures. These directories should only exist during a normal upload.


  • So. I have a raw Chromium OS image that produces a 504 error. And my Windows 10 attempt created on a whole new not copied image in fog produced a file not found error. it’s curious if the two images are producing different issues.

    http://imgur.com/a/4jnF64v


  • @george1421 doing that changed the error I was getting when uploading and it trying to update the database but it didn’t fix it I’m getting a new error now.


  • @george1421 said in FOG image drive failed. What now?:

    @cammykool Try rerunning the fog installer script that may fix the permissions on the /images directory. If not, while this is terrible for security you could run chmod -r 777 /images That will set everything in images to read/write. But see if the installer script fixes the perms first.

    Would that be my updating database issue too?

  • Moderator

    @cammykool Try rerunning the fog installer script that may fix the permissions on the /images directory. If not, while this is terrible for security you could run chmod -r 777 /images That will set everything in images to read/write. But see if the installer script fixes the perms first.



  • @george1421 said in FOG image drive failed. What now?:

    @cammykool It almost sounds like the permissions on /images and below is now allowing the files to be deleted. The service account fogproject is used to remove the files. If they are owned by root and have the standard permissions of 755 then that would keep the service account from deleting the files. You could change the permission to 777 for the image directories then the ui should be able to delete them. Understand the goal is getting the job done and not security at this point.

    Just tried pushing my first image. File copy went off perfectly It is hung on Updating Database Another permissions issue?


  • @george1421 do i just run sudo chmod 777 imagefolder

  • Moderator

    @cammykool It almost sounds like the permissions on /images and below is now allowing the files to be deleted. The service account fogproject is used to remove the files. If they are owned by root and have the standard permissions of 755 then that would keep the service account from deleting the files. You could change the permission to 777 for the image directories then the ui should be able to delete them. Understand the goal is getting the job done and not security at this point.


  • @george1421 I tried to delete some images now that its all said and done and it just keeps saying Attempting to perform actions. with a Delete and cancel button. Do i let it sit there or do i click delete again? if i do click delete again it just says “Invalid Login”


  • 3tb.PNG

    Woohoo!


  • @george1421 I have gotten a few more R/W errors. hopefully not enough for fog to not know they are there, and delete them.


  • @george1421

    I have started the drive transfer to cull the heard after. The state of the drive is showing itself though.

    cp: error reading '/images/1-22RAMIED/d1p2.img': Input/output error
    
  • Moderator

    @cammykool said in FOG image drive failed. What now?:

    I’d like to clear out that long list and thin the heard.

    I guess two points here.

    1. Cull the herd after the move. Save /dev/sdb1 in case something happens to the new drive.
    2. FOG images are constructed of the meta data (in the fog database) and the raw files in /images. You have to delete both to clear everything out. The easiest way is via the web ui and GO INTO THE IMAGE definition and pick delete image from there. When you are in the image definition you have the ability to delete the raw data files. If you delete the image from the image list view it will only remove the metadata. This is by design.

  • @george1421 or wopuld it be better to move everything over and thin it out using the FOG UI?


  • @george1421 I’d like to clear out that long list and thin the heard. Most of those entries are for hardware we dont even have anymore.

  • Moderator

    @cammykool Well if you do it will FOG will not even know you played with its files.

    So what you are doing is copying the files from /dev/sdb1 to /dev/sdc1. Then finally mounting /dev/sdc1 in place of /dev/sdb1 (with the fstab changes). FOG only knows about /images directory and now how the OS gets there. It should work just like magic.

393
Online

8.1k
Users

15.0k
Topics

141.3k
Posts