Database Creation fails

Moderator: NorbertKrupa

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Database Creation fails

Post by id10t » Mon Oct 07, 2013 1:25 am

Hi!

1. 99% that you will get data corruption sometime (usage in unsupported file system - NTFS).

2. If you will install it on Host OS (aka Windows), can you try to do a backup? Perhaps you will not able to do a backup, since Vertica uses in hard links for backup snapshots and Windows has no hard-links (has, but it hidden and works different than in Linux).

oppelo
Newbie
Newbie
Posts: 13
Joined: Thu Apr 18, 2013 8:16 pm

Re: Database Creation fails

Post by oppelo » Mon Oct 07, 2013 2:28 am

This is what I get

[dbadmin@vertica ~]$ su -
Password:
[root@vertica ~]# vi /etc/mtab
[root@vertica ~]# sudo umount /mnt/hgfs
[root@vertica ~]# sudo mount /mnt/hgfs
mount: can't find /mnt/hgfs in /etc/fstab or /etc/mtab

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Database Creation fails

Post by id10t » Mon Oct 07, 2013 4:38 am

Hi!

How I hate it! Why you do not provides anything, any info, output of mtab?
Also forum rejects me and I'm not able to answer most times, so it's my last post.

1. login as root
2. save script on GuestOS (say /tmp/make_dbadmin.sh)
3. set it executable (chmod +x /tmp/make_dbadmin.sh)
4. run script

Code: Select all

#!/bin/bash

uid=`id -u dbadmin`
gid=`id -g dbadmin`
owner=${uid}

# check if root
if [[ `id -u` != 0 ]]
    then echo 'Error: run script as root'
    exit -1
fi

# create mtab backup
cp /etc/mtab{,_old} 
grep -v hgfs /etc/mtab_old > /etc/mtab

# check if mounted, if so => unmount
if [[ -b /mnt/hgfs ]]
then
   umount /mnt/hgfs 2>/dev/null
fi

# mount
mount -t vmhgfs -o rw,uid=${uid},gid=${gid},owner=${owner},ttl=1 .host:/ /mnt/hgfs

#validate
for FILE in /mnt/hgfs/*;
do
    if [[ `ls -dn ${FILE} | cut -d' ' -f3` != ${uid} ]];
        then echo "USER isn't dbadmin!"
    fi

    if [[ `ls -dn ${FILE} | cut -d' ' -f4` != ${gid} ]];
        then echo "GROUP isn't dbadmin!"
    fi

done

exit 0
PS
dont do like this:

Code: Select all

root# sudo <cmd>
you are already root
Attachments
vm0.png
screen
vm0.png (62.06 KiB) Viewed 38187 times

oppelo
Newbie
Newbie
Posts: 13
Joined: Thu Apr 18, 2013 8:16 pm

Re: Database Creation fails

Post by oppelo » Tue Oct 08, 2013 6:17 am

Thank you very much for your help. I am sorry that I did not give you what you wanted. I did not know that it was required. However, that did not work completely. I will give it a try again.

Post Reply

Return to “Vertica Installation”