Hi everybody!
I have a server
I have two disks - 10G for the OS and 50G for DB Postgres.
I got the server preinstalled and I can`t do much with the hardware.
The system was preinstalled there and the admin then added a 50G disk for me to use it for DB storage.
I created pool, filesystem, set up Postgres and everything worked well.
But then I figured out that there is smth wrong with the disk space allocated.
I mean - I supposed that I would see space allocated on /pgdata , but I loose disk space on the root fs instead.
The DB is here:
I did
and got
and somehow I can`t see /pgdata mounted nowhere:
/etc/fstab
So the questions are
Where do I have my DB? I want it on ZFS storage and it's there but it seems that I keep spending diskspace of my 10G tiny system disk.
What did I do wrong (did I?) and how to fix it? If I didn't mount ZFS properly how in the world does Postgres work there?
Thanks in advance for any help.
I have a server
Code:
FreeBSD freebsd 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC amd64
I have two disks - 10G for the OS and 50G for DB Postgres.
I got the server preinstalled and I can`t do much with the hardware.
The system was preinstalled there and the admin then added a 50G disk for me to use it for DB storage.
I created pool, filesystem, set up Postgres and everything worked well.
But then I figured out that there is smth wrong with the disk space allocated.
I mean - I supposed that I would see space allocated on /pgdata , but I loose disk space on the root fs instead.
Code:
root@freebsd:/pgdata # df -H
Filesystem Size Used Avail Capacity Mounted on
/dev/gpt/rootfs 9.4G 7.6G 965M 89% /
devfs 1.0k 1.0k 0B 100% /dev
Code:
root@freebsd:/pgdata # zfs list
NAME USED AVAIL REFER MOUNTPOINT
pgdata 348K 48.0G 96K /pgdata
Code:
root@freebsd:/pgdata # du -sh /*
8.0K /COPYRIGHT
1.4M /bin
153M /boot
4.0K /dev
4.0K /entropy
3.1M /etc
0B /home
13M /lib
332K /libexec
4.0K /media
4.0K /mnt
4.0K /net
4.0K /pg
1.3G /pgdata
4.0K /proc
12M /rescue
44K /root
6.4M /sbin
28K /tmp
5.0G /usr
612M /var
The DB is here:
Code:
root@freebsd:/pgdata # vim postgresql.conf
data_directory = '/pgdata/'
I did
dd if=/dev/random of=/pgdata/myfile.dat bs=500M count=1
and got
Code:
root@freebsd:/pgdata # df -H
Filesystem Size Used Avail Capacity Mounted on
/dev/gpt/rootfs 9.4G 8.2G 441M 95% /
devfs 1.0k 1.0k 0B 100% /dev
and somehow I can`t see /pgdata mounted nowhere:
/etc/fstab
Code:
# Custom /etc/fstab for FreeBSD VM images
/dev/gpt/rootfs / ufs rw 1 1
/dev/gpt/swapfs none swap sw 0 0
So the questions are
If you go UEFI then you still have the issue of playing the boot loader game (who's boot loader starts and if that boot loader knows about the other OS - and without allot of hacking it will NOT)
Where do I have my DB? I want it on ZFS storage and it's there but it seems that I keep spending diskspace of my 10G tiny system disk.
What did I do wrong (did I?) and how to fix it? If I didn't mount ZFS properly how in the world does Postgres work there?
Thanks in advance for any help.