• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    FOG image drive failed. What now?

    Scheduled Pinned Locked Moved
    FOG Problems
    2
    35
    4.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      cammykool @george1421
      last edited by

      @george1421
      lsblk:

      sda      8:0    0 119.2G  0 disk 
      `-sda1   8:1    0 119.2G  0 part /
      sdb      8:16   0 931.5G  0 disk 
      `-sdb1   8:17   0 931.5G  0 part /images
      sdc      8:32   0   3.7T  0 disk 
      `-sdc1   8:33   0   3.7T  0 part 
      
      1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @cammykool
        last edited by george1421

        @cammykool ok lets make sure the drive is blank with lsblk you should just see /dev/sdc with no partition. Make sure its the size you think it should be so you have the right drive. The next steps will be destructive if you pick the wrong drive.

        Assuming /dev/sdc Do these commands as root to su to root (sudo su -)

        fdisk /dev/sdc
        
        # Print out existing partition table, should be blank
        p
        n
        1
        p
        {pick all defaults until you get back to command prompt}
        
        # display partition table
        p
        
        # if good then write it
        w
        
        #exit out
        e
        

        Now run lsblk again and you should see sdc1

        Next thing is to format it.
        mkfs.ext4 /dev/sdc1

        Now lets connect it to a temp location

        mkdir -p /mnt/nd
        mount /dev/sdc1 /mnt/nd
        

        Then run the df command to ensure its mounted
        df -h

        OK now comes the moving of data
        cp -R /images/* /mnt/nd

        So when that is done copying over you will have your original data on /dev/sdb1 (faulty drive) and on /dev/sdc1.

        The last bit is drop the currently mounted drives and update the fstab.

        umount /images
        umount /mnt/nd
        

        Now you need to update the fstab. You need to remove the line that references /dev/sdb1 (note could be by uuid so you need to pick the right drive)

        Then add in this line

        /dev/sdc1 /images ext4 defaults 0 0
        

        Save and exit fstab.

        Then run this command mount -a
        Confirm that /dev/sdc1 is mounted with df -h

        and you are done.

        EDIT: I see that it already has the partition so you can skip to the format command in the sequence

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        C 2 Replies Last reply Reply Quote 0
        • C
          cammykool @george1421
          last edited by

          @george1421 yeah i already ran through and partitoned it for EXT through webmin.

          george1421G 1 Reply Last reply Reply Quote 0
          • george1421G
            george1421 Moderator @cammykool
            last edited by

            @cammykool Ok I updated the instructions to use ext4. It looks like you just need to mount that sdc1 partition to a temp folder and copy your files over, then update fstab/mount the drive and you are done.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

            C 1 Reply Last reply Reply Quote 0
            • C
              cammykool @george1421
              last edited by

              @george1421 do I need to move images over? or will fog notice the new blank drive and just clear out what it has?

              george1421G 1 Reply Last reply Reply Quote 0
              • george1421G
                george1421 Moderator @cammykool
                last edited by george1421

                @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.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                C 1 Reply Last reply Reply Quote 0
                • C
                  cammykool @george1421
                  last edited by

                  @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.

                  george1421G 1 Reply Last reply Reply Quote 0
                  • C
                    cammykool @george1421
                    last edited by

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

                    1 Reply Last reply Reply Quote 0
                    • george1421G
                      george1421 Moderator @cammykool
                      last edited by george1421

                      @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.

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                      C 3 Replies Last reply Reply Quote 0
                      • C
                        cammykool @george1421
                        last edited by

                        @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
                        
                        1 Reply Last reply Reply Quote 0
                        • C
                          cammykool @george1421
                          last edited by

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

                          1 Reply Last reply Reply Quote 0
                          • C
                            cammykool
                            last edited by

                            3tb.PNG

                            Woohoo!

                            1 Reply Last reply Reply Quote 0
                            • C
                              cammykool @george1421
                              last edited by

                              @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”

                              george1421G 1 Reply Last reply Reply Quote 0
                              • george1421G
                                george1421 Moderator @cammykool
                                last edited by

                                @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.

                                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                                C 3 Replies Last reply Reply Quote 0
                                • C
                                  cammykool @george1421
                                  last edited by

                                  @george1421 do i just run sudo chmod 777 imagefolder

                                  1 Reply Last reply Reply Quote 0
                                  • C
                                    cammykool @george1421
                                    last edited by

                                    @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?

                                    george1421G 1 Reply Last reply Reply Quote 0
                                    • C
                                      cammykool @george1421
                                      last edited by

                                      @george1421 alt text

                                      1 Reply Last reply Reply Quote 0
                                      • george1421G
                                        george1421 Moderator @cammykool
                                        last edited by

                                        @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.

                                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                                        C 2 Replies Last reply Reply Quote 0
                                        • C
                                          cammykool @george1421
                                          last edited by

                                          @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?

                                          george1421G 1 Reply Last reply Reply Quote 0
                                          • C
                                            cammykool @george1421
                                            last edited by

                                            @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.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 2 / 2
                                            • First post
                                              Last post

                                            244

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project