Adding secondary storage to FOG server
-
Then you need to:
- You must execute these commands as root, or use sudo
- Since /dev/sdc already has a partition on it that step is done.
- If you haven’t formatted it you will need to issue,
mkfs.ext4 /dev/sdc1
- Mount /dev/sdc1 to a temp location
mount -t ext4 /dev/sdc1 /mnt
- Copy all of the files from your current images to /dev/sdc1
cp -R /images/* /mnt
andcp -R /images/.* /mnt
- Ensure the file permissions and file ownership are correct in the /mnt dir.
- Move out of the /mnt directory path.
cd \
- Unmount both /images and /mnt
umount /images
andumount /mnt
- (while you said sacrifice, lets do this just in case later you need the space)
mkdir /images2
- Edit /etc/fstab
- Locate the line that currently mounts /dev/sda3 and duplicate it. It should look something like this.
/dev/sda3 /images ext4 defaults 0 1
when you duplicate it, it will look like this
/dev/sda3 /images ext4 defaults 0 1 /dev/sda3 /images ext4 defaults 0 1
- Change the first row to mount /dev/sda3 to /images2 and the second row to mount /dev/sdc1 to /images. It should look like this:
/dev/sda3 /images2 ext4 defaults 0 1 /dev/sdc1 /images ext4 defaults 0 1
- Save and exit your editor.
- Mount the volumes with this command
mount -a
- Confirm that they are mounted correctly with
lsblk
- Edit /etc/exports
- Duplicate the 2 lines in there and modify the contents to look like this:
/images *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0) /images/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1) /images2 *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0) /images2/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)
- Refresh your exports with
exportfs -ra
- Confirm all of your shares are available
showmount -e 127.0.0.1
- Done.
Don’t let the number of steps put you discourage you. Adding back in that second yet smaller disk was something you may need some time. We won’t go into the FOG configuration for using that second (original) partition (/dev/sda3). Its there if you need it or to reference it in case something was missed during the migration.
-
I guess I wasn’t too clear. I apologize. I have installed CentOS and the drives are how I showed you previously. However, FOG is not installed at this time. That’s what I meant by start from scratch.
-
@george1421 No images are in the /images folder at this time. I just would like to install FOG on a separate drive and start fresh, by re-uploading all of my images.
-
@chris178 Then if fog isn’t installed, just skip the bits about copying the files over and permissions. So skip step 5 and 6 and delay 16, 17, 18 and 19 until after FOG is installed.
Once the system is setup install fog normally there is noting special you need to do once the block level devices are in place.
-
@george1421 I’m stuck on editing the /etc/fstab. Here is a copy of what I’m looking at. Can you help? Thanks.
/etc/fstab
# Created by anaconda on Thu Jun 29 11:50:55 2017 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # UUID=576c1402-3f95-4897-86cd-45a085d0f771 / xfs defaults 0 0 UUID=02756a47-0f80-4ba2-939b-9345b05bcacf /boot xfs defaults 0 0 UUID=1D02-E2D7 /boot/efi vfat umask=0077,shortname=winnt 0 0 UUID=ebcbc443-67c3-4ba9-b2e7-3e6f1742a40d /home xfs defaults 0 0 UUID=0b14f21a-8817-46e5-966b-8a813ee5fc0f /images xfs defaults 0 0 UUID=5b1c943d-bbe6-470c-b720-42e0553e42ee swap swap defaults 0 0
-
@chris178 I fixed your post so it was in a code block.
I see your system used the UUID instead of the partitions. No problem.
Change this line
UUID=0b14f21a-8817-46e5-966b-8a813ee5fc0f /images xfs defaults 0 0
to
UUID=0b14f21a-8817-46e5-966b-8a813ee5fc0f /images2 xfs defaults 0 0
and insert a new line
/dev/sdc1 /images ext4 defaults 0 0
And then save the file.
-
@george1421 I see you used xfs for all of the existing partitions. If you want to reformat your /dev/sdc1 to use xfs instead of ext4 you can just use the
mk.xfs /dev/sdc1
command and then adjust the settings to reference xfs instead of ext4. -
So I got the FOG server installed, but I had issues with getting my first image. The PXE function seems to work fine but I tried setting the PC for capture under the management console and it said something about the PC wasn’t set for imaging? Does this make sense? So I rebooted, and now I can’t even get into the management console. Any suggestions? Thanks.
-
@chris178 What do you visually see when you try to access the management page?
-
@Quazz The standard stuff. The page could not be reached. I also was wondering if I need to uninstall and reinstall FOG anyways, because we have DHCP servers setup on our network, and I skipped all of that through the initial config. Do you think this is maybe why I’m having issues now? I tried to setup the startup script in the CentOS 7 manual, but it seemed not to work. Thanks for any input.