Re: unable to find data folder postgres9.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Scalia wrote:
At a
minimum, every mounted filesystem contains a directory in it called
"lost+found", so if you don't see that, it may not be a proper
filesystem, or the mount is broken. Without knowing what you're using
for the disks, or the O/S, it's hard for me to guess what you really
should have or if it's broken.

Bind mounts are closer to "hard link across filesystems". The mounted directory may or may not actually be at the root of the physical filesystem it lives on.

So, for instance, if I have /dev/bigdisk mounted to /mnt/bigdisk, I can then bind mount /mnt/bigdisk/kdeugau-media to /home/kdeugau/media, and I will not see a lost+found in /home/kdeugau/media.

Personally, the main use case I've found for bind mounts is to fool programs that refuse to follow symlinks into effectively doing so anyway.

srilinux wrote:
All Thank you very much for providing your inputs

Now after reboot I can see the pgsql data

I am trying to bind mount to new storage allocated

when I do so it is empty again

any suggestions ?

echo "/ProdD/NusAp1/pgsql /var/lib/pgsql bind bind 0 0" >> /etc/fstab

 mount --bind /ProdD/NusAp1/pgsql /var/lib/pgsql

cd /ProdD/NusAp1/pgsql   is empty and /var/lib/pgsql is also empty

This reads to me like you've been using whatever filesystem /var/lib/pgsql is on, and now you need to expand, but you've just gone and mounted the new filesystem space over top of /var/lib/pgsql without copying the files into the new space.

In this respect, a bind mount acts just like any other filesystem mount, and not a symlink or hard link. You need to copy or move the files from the target (eg, /var/lib/pgsql) into the new location before mounting the new filesystem to the old location. Otherwise you end up with both locations (apparently) empty. Your files are still safe on the old filesystem, but you won't be able to access them.

Make sure to stop Postgres before copying the files, and I'd suggest copying instead of moving to make sure things work before arranging to actually delete the originals.

-kgd


--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux