Setting images file on second partition
- FOG Version: 1.3.5
- OS: Ubuntu 16.04
Doing a new install on a big server with data array attached. The OS and fog are installed on the first partition. I have the data array (20 TB) is the second partitions for just images. /dev/sdb/images
@John-L-Clark if an entry is made properly in /etc/fstab it will mount on boot, else it wont. Reboot and see. This is something that needs dealt with immediately - don’t wait.
I got it. I was thinking it was the drive that was the issue but it was the drive on the host. I ran chkdsk /f and now it is capturing. Thank you for your help. Oh and will that drive mount after a reboot? or do i need to do something else to get that right.
@Wayne-Workman ![0_1491486603686_IMG_3211.JPG](Uploading 100%)
Ok all looks good but got this error when trying to capture an image.
bin dev fog_1.3.5 home Images initrd.img lib64 media opt root sbin srv tftpboot tmp var
boot etc fog_1.3.5.tar.gz images images_old lib lost+found mnt proc run snap sys tftpboot.prev usr vmlinuz
root@FOG-SRV1:/# cd images
dev lost+found postdownloadscripts
@John-L-Clark So what happened to the old images directory?
If there are no old images to move over - if you just run the fog installer it’ll make the necessary files on the new drive.
root@FOG-SRV1:/# mv /images /images_old root@FOG-SRV1:/# mkdir /images root@FOG-SRV1:/# mount /images root@FOG-SRV1:/# du -sh /images 40K /images root@FOG-SRV1:/# du -sh /images_old 4.0K /images_old root@FOG-SRV1:/# df -h Filesystem Size Used Avail Use% Mounted on udev 24G 0 24G 0% /dev tmpfs 4.8G 9.3M 4.8G 1% /run /dev/mapper/FOG--SRV1--vg-root 2.7T 2.4G 2.6T 1% / tmpfs 24G 0 24G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 24G 0 24G 0% /sys/fs/cgroup /dev/sda2 473M 57M 392M 13% /boot tmpfs 4.8G 0 4.8G 0% /run/user/0 /dev/sdb 19T 40K 18T 1% /images root@FOG-SRV1:/#
@John-L-Clark ok, what you need to do is unmount the new drive, then rename the old images directory… so…
umount /images mv /images /images_old mkdir /images mount /images
Here, double-check your work with these commands - make sure it’s done right.
du -sh /images du -sh /images_old df -h
df - h should show that /images is mounted to /dev/sdb.
Then your old images will be in /images_old and you can copy it all over to the new disk with:
cp -r /images_old/* /images
The above command will take a while.
root@FOG-SRV1:/# df -h Filesystem Size Used Avail Use% Mounted on udev 24G 0 24G 0% /dev tmpfs 4.8G 9.3M 4.8G 1% /run /dev/mapper/FOG--SRV1--vg-root 2.7T 2.4G 2.6T 1% / tmpfs 24G 0 24G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 24G 0 24G 0% /sys/fs/cgroup /dev/sda2 473M 57M 392M 13% /boot /dev/sdb 19T 40K 18T 1% /images tmpfs 4.8G 0 4.8G 0% /run/user/0 root@FOG-SRV1:/#
root@FOG-SRV1:/# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 2.7T 0 disk ââsda1 8:1 0 1M 0 part ââsda2 8:2 0 488M 0 part /boot ââsda3 8:3 0 2.7T 0 part ââFOG--SRV1--vg-root 252:0 0 2.7T 0 lvm / ââFOG--SRV1--vg-swap_1 252:1 0 48G 0 lvm [SWAP] sdb 8:16 0 18.2T 0 disk /images sr0 11:0 1 1024M 0 rom root@FOG-SRV1:/#
Ok - but still I’d like to see the output of these so that I understand better - because /dev/sdb/images doesn’t sound right.
lsblk df -h
No i have the array working and mounts at startup as a folder called Images. I just need the folder that is installed by fog called images to be moved to that drive. So when I upload and image it goes to that drive.
The problem is not clear. Did you need help with using the data array? If so, the output of these commands will help speed this up:
df -h lsblk pvdisplay vgdisplay lvdisplay fdisk -l