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

[SOLVED] Move image to second node

Scheduled Pinned Locked Moved
General Problems
2
5
1.2k
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.
  • A
    afaure
    last edited by afaure Jul 18, 2017, 9:36 AM Jul 18, 2017, 7:50 AM

    Hello,

    I have 2 node in master mode.
    My first node is full and my second node is empty !
    I would like move images to node 1 for node 2.

    I think modify the storage group in image management and move all the file with the command:

    0_1500364166264_e5440-cfg.png

    mv /images/MyPc1 /images2/MyPc1
    chmod 777 -R /images2/MyPc1
    chown -R fog.root /images2/MyPc1 
    

    Does this solution work?

    Thanks for help and reply πŸ˜„

    1 Reply Last reply Reply Quote 0
    • G
      george1421 Moderator
      last edited by george1421 Jul 18, 2017, 3:50 AM Jul 18, 2017, 9:47 AM

      Images in FOG have 2 parts. There is the raw data that is stored in, typically in /images and there is the meta data that is stored in the mysql database.

      You can move the data as you mentioned in your post with the mv command. Changing the mode is not necessary since it will take the mode of the files in the original location.

      Once the raw data files are moved then you just need to update your image definitions to point your image configuration to the new datastore. This is not as easy as just moving the raw data. The web gui has no facilities to change the image store group once the image definition has been saved. To change this setting you can do the following.

      1. Recreate the image definition by hand for each image you move.
      2. Export the image definitions, adjust the settings of the images that were moved and then reimport the image definitions.
      3. Edit the data directly in the mysql database (imageGroupAssoc table).

      For me its easier to just change the database record by hand since you only need to update one field with update imageGroupAssoc set igaStorageGroupID=<new_image_store_id> where igaImageID=<image_id>; Be sure if you are editing records directly in the database you backup the mysql database 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!

      A 1 Reply Last reply Jul 18, 2017, 12:18 PM Reply Quote 0
      • A
        afaure @george1421
        last edited by Jul 18, 2017, 12:18 PM

        @george1421 thank you πŸ™‚

        I would like try the second option:

        For me its easier to just change the database record by hand since you only need to update one field with update imageGroupAssoc set igaStorageGroupID=<new_image_store_id> where igaImageID=<image_id>; Be sure if you are editing records directly in the database you backup the mysql database first

        I try and post the result πŸ˜‰

        G 1 Reply Last reply Jul 18, 2017, 12:23 PM Reply Quote 0
        • G
          george1421 Moderator @afaure
          last edited by Jul 18, 2017, 12:23 PM

          @afaure All you need to know is the image id and storage management ID. This is easy to find if you are in the web managment. Just look at the browser address line when you are updating the record.

          0_1500380610193_is_change.png

          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!

          A 1 Reply Last reply Jul 18, 2017, 1:10 PM Reply Quote 0
          • A
            afaure @george1421
            last edited by afaure Jul 18, 2017, 7:19 AM Jul 18, 2017, 1:10 PM

            @george1421

            I have modified the storage group in my image definition.
            I have:

            cp -R /images/Dellvostro430 /images2/
            sudo chmod 777 -R /images2/Dellvostro430
            sudo chown fog.root -R /images2/Dellvostro430/
            rm /images/Dellvostro430
            

            I have updated the configuration for my client with the image definition modified.

            And the result :

            0_1500383292579_vostro430.jpg

            I think it works but i waiting the end of deploy

            Edit:

            It works πŸ˜„

            After cp + rm
            Node 1:
            0_1500383895890_1.jpg

            Node2:
            0_1500383908488_2.jpg

            The final result:
            0_1500383925687_3.jpg

            For information, i don’t have used mysql. I can not use it anymore

            Thank you one more again @george1421

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

            186

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright Β© 2012-2024 FOG Project