If anyone was wondering, the behavior is different on 5+:

# cd /vmfs/volumes/ 
/vmfs/volumes # ls -l 
lrwxr-xr-x    1 root     root            17 Jun 26 15:56 1 -> 8dae7639-df402f02

/vmfs/volumes # df -h 
Filesystem   Size   Used Available Use% Mounted on 
NFS          9.8G   1.8G      8.0G  19% /vmfs/volumes/1


This is what the script expects, and I guess now I know the reason ESX 5+ is 
listed as "supported". It might be nice to support older ESX if that's the only 
change, but for now I'm just going to wait until the rest of our blades get 
updated.

Thanks!
Brad



________________________________
 From: Brad <ts...@yahoo.com>
To: Tino Vazquez <cvazq...@c12g.com> 
Cc: "users@lists.opennebula.org" <users@lists.opennebula.org> 
Sent: Thursday, June 26, 2014 8:10 AM
Subject: Re: [one-users] Help with ESX UUIDs with OpenNebula
 


Hi Tino,

Thanks for responding. You can rename the datastores from the vSphere client to 
0 and 1, however, that is not how they're named on the file system, on the file 
system they look like this:

$ ls -al /vmfs/volumes/ | egrep "0 -> | 1 -> "
lrwxr-xr-x    1 root     0                    17 Jun 26 15:05 0 -> 
3e0efa3e-35c16500
lrwxr-xr-x    1 root     0                    17 Jun 26 15:05 1 -> 
8dae7639-df402f02

$ df -m | egrep '35c16500|df402f02'
nfs                      10078      1877      7689  20% 
/vmfs/volumes/3e0efa3e-35c16500
nfs                      10078      1877      7689  20% 
/vmfs/volumes/8dae7639-df402f02


They're symlinked, which is no good for OpenNebula because the monitor script 
here: 
https://github.com/OpenNebula/one/blob/11520021f718bbc6762f7be90d8cec00764fc327/src/datastore_mad/remotes/vmfs/monitor
 on line 67 is checking df, but df is using the actual mount path, not a 
symlink.

I do have some esx 5+ hosts to try mounting my NFS exports on to see if they 
are mounted differently. If that doesn't work, I'll simply change that line 67 
to something like this:

DF_STR=\$($DF -m | grep `ls -al /\`echo $BASE_PATH | awk '{split($0,a,"/"); 
print a[2], a[3]}' | sed -e 's/ /\//g'\` | grep " -> \`echo $BASE_PATH | awk 
'{split($0,a,"/"); print a[4]}'\`" | awk '{print $11}'` | sed -e 's/ \+/:/g')

Which I don't want to do, but should get the expected output.

Thanks!
Brad

 

________________________________
 From: Tino Vazquez <cvazq...@c12g.com>
To: Brad <ts...@yahoo.com> 
Cc: "users@lists.opennebula.org" <users@lists.opennebula.org> 
Sent: Thursday, June 26, 2014 2:42 AM
Subject: Re: [one-users] Help with ESX UUIDs with OpenNebula
 

Hi Brad,

>These are failing because the ESX host is mounting NFS using the uuid that's 
>generated from the signature. I tried searching
>the list, but I'm not sure how others are dealing with this. I notice the 
>documentation says that it needs to be mounted with
>datastore ID only; e.g. /vmfs/volumes/0 and /vmfs/volumes/1, however, I've 
>found no way to get the ESX host to actually do
>this.

OpenNebula supports ESX 5.x, so it may be a good idea to update. In
any case, it should work in ESX 4.x as well, can't you name the NFS
based datastore as "0" and "1"? What error is it giving? If there are
errors, you can try creating it with a different name and then
renaming it.

Hope it helps,

-Tino


--
OpenNebula - Flexible Enterprise Cloud Made Simple

--
Constantino Vázquez Blanco, PhD, MSc
Senior Infrastructure Architect at C12G Labs
www.c12g.com | @C12G | es.linkedin.com/in/tinova

--
Confidentiality Warning: The information contained in this e-mail and
any accompanying documents, unless otherwise expressly indicated, is
confidential and privileged, and is intended solely for the person
and/or entity to whom it is addressed (i.e. those identified in the
"To" and "cc" box). They are the property of C12G Labs S.L..
Unauthorized distribution, review, use, disclosure, or copying of this
communication, or any part thereof, is strictly prohibited and may be
unlawful. If you have received this e-mail in error, please notify us
immediately by e-mail at ab...@c12g.com and delete the e-mail and
attachments and any copy from
 your system. C12G thanks you for your
cooperation.



On 25 June 2014 20:10, Brad <ts...@yahoo.com> wrote:
> Hi,
>
> I just started using OpenNebula and was following the quickstart guide when
> I hit a snag. When I run onedatastore show <ID>, I see under DATASTORE
> CAPACITY that TOTAL/FREE/USED are all 0M. I then executed
> /var/lib/one/remotes/datastore/vmfs/monitor with the arguments found in
>
 /var/log/one/oned.log after breaking the monitor script; I then executed it
> with bash -x. I saw the problem immediately:
>
> USED_MB=$(du -sLm /vmfs/volumes/1 2>/dev/null | cut -f1)
> DF_STR=$(df -m | grep /vmfs/volumes/1 | sed -e '\''s/ \+/:/g'\'')
>
> These are failing because the ESX host is mounting NFS using the uuid that's
> generated from the signature. I tried searching the list, but I'm not sure
> how others are dealing with this. I notice the documentation says that it
> needs to be mounted with the datastore ID only; e.g. /vmfs/volumes/0 and
> /vmfs/volumes/1, however, I've
 found no way to get the ESX host to actually
> do this. As I'm working with an existing (large-ish) cluster, I'd also like
> to avoid screwing anything up for others, so any suggestions will be
> appreciated.
>
> Right now I'm working on getting it to be this instead:
> DF_STR=$(df -m | grep `ls -al /vmfs/volumes/ | grep " 1 -> " | awk '{print
> $11}'`| sed -e '\''s/ \+/:/g'\'')
>
> This seems ham fisted to me, and I'm hoping there's some option in
> VMware/OpenNebula I'm missing somewhere.
>
> If this is a version
 issue, I think I'll be moving from the 4.x to 5.x on
> all of my ESX hosts at some point next week.
>
> Thanks!
> Brad
>
>
>
> _______________________________________________
> Users mailing list
> Users@lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

>
_______________________________________________
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

Reply via email to