Location of images
-
Yes, you can either mount the filesystem contained on the second disk under
/images
or change the image path and ftp path of the storage node to the mount point of the filesystem for the second disk. If you are adding this storage after installation, you will want to double check that your directory permissions and ownership matches the existing/images
directory and that you create the .mntcheck files. More detailed guidance can be found on the Wiki: Adding Storage to a FOG Server. -
@mikmatcr Just to be clear you want to store to both disks in your fog server or do you just want to add to your usable total space?
One method is to add an additional “fake” storage node configuration to your fog server it will need to be in a different storage group. When you create your image definitoin you would pick storage node 1 on disk 1 or storage node 2 on disk 2.Another method is if your fog server host OS uses LVM (logical volume manager). What you would do is just add the new disk to the LVM pool and the OS will just magically use the additional space.
The third option is if you wanted to abandon the space on the original hard drive and then use only the new hard drive for image storage.
I do have some tutorials that are a few years old on how to do this. The decision on the path depends on how you want to use the space. I can tell you if you can add the space on the file system level that keeps the fog configuration clean and sane.
-
@george1421 What I want to do, on disk 1 only system, will not have images. Only the images will be on the disc. Once I tried to do it but it generated permission errors
-
@mikmatcr How familiar are you with linux? Linux is not like windows in that it doesn’t have the concept of different disks (i.e. etc). In linux (UNIX) it has a single file system, where you can connect different disks (or network shares) to different folders (directory mount points). You can traverse between disks just like changing directories.
So if you want to have disk 1 as the system disk and disk 2 for images that can be done pretty easy (relatively), with no changes to FOG’s configuration.
The basic steps are to create a disk partition on disk 2 (/dev/sdb), then format it. Then connect that disk to a temporary location in the directory and move the contents of your /images directory to this new disk. Then finally unmount the disk temporarily and then reconnect the new disk to the /images directory.
I think I have a step by step tutorial on this. Let me check.
What host OS is the FOG server using?
[Edit] Here is a step by step, but only execute it up to and including step 7. After step 7 we will change it up a bit. https://forums.fogproject.org/topic/11048/moving-fog-s-images-files-off-the-root-partition-2017-edition
-
@george1421 My knowledge in Linux is too basic. The server has Ubuntu 18
-
@mikmatcr Do you have the new drive installed in your fog server now?
If so switch over to root with
sudo su -i
then key inlsblk
and post the results here. -
@george1421 No, now I only have 1 hard drive. But in January I will place another
-
@mikmatcr Ok no problem. Get the second hard drive installed in the server than we can walk you through the setup. It might take about 20 minutes to setup. Not to bad if you can copy and paste commands.
-
@george1421 Hi, I already added the second disk, this is the result of the command:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 1008K 1 loop /snap/gnome-logs/61 loop1 7:1 0 3,7M 1 loop /snap/gnome-system-monitor/107 loop2 7:2 0 14,8M 1 loop /snap/gnome-characters/359 loop3 7:3 0 42,8M 1 loop /snap/gtk-common-themes/1313 loop4 7:4 0 4,2M 1 loop /snap/gnome-calculator/544 loop5 7:5 0 54,5M 1 loop /snap/core18/1265 loop6 7:6 0 89,1M 1 loop /snap/core/8268 loop7 7:7 0 89,1M 1 loop /snap/core/8213 loop8 7:8 0 54,6M 1 loop /snap/core18/1279 loop9 7:9 0 156M 1 loop /snap/gnome-3-28-1804/91 loop10 7:10 0 156,7M 1 loop /snap/gnome-3-28-1804/110 loop11 7:11 0 3,7M 1 loop /snap/gnome-system-monitor/111 loop12 7:12 0 956K 1 loop /snap/gnome-logs/81 loop13 7:13 0 44,2M 1 loop /snap/gtk-common-themes/1353 loop14 7:14 0 4M 1 loop /snap/gnome-calculator/406 loop15 7:15 0 14,8M 1 loop /snap/gnome-characters/367
sda 8:0 0 9,1T 0 disk ├─sda1 8:1 0 512M 0 part /boot/efi └─sda2 8:2 0 9,1T 0 part / sdb 8:16 0 9,1T 0 disk ├─sdb1 8:17 0 16M 0 part └─sdb2 8:18 0 9,1T 0 part /media/serv/Nuevo vol
-
@mikmatcr Ok I see you have 2 disks installed (via the
lsblk
) command. That second disk appears to have some data on it. Was that your intention? -
@george1421 No, I must format the second disk
-
@mikmatcr ok what I would do is run fdisk from command prompt
sudo fdisk /dev/sdb d p 2 d p 1 w e
Note it may be q to quit and not e to exit. I did that from memory.
That should delete both partitions and write them back to the disk.
Now you can start with the instructions https://forums.fogproject.org/topic/11048/moving-fog-s-images-files-off-the-root-partition-2017-edition up to and including step 7. That will create a new partition and then format it. Once you have it formatted then we can go through the steps to copy the files over and then remap the drive.
-
@mikmatcr Did you get your disk setup or do you still need help with this?