a few questions about weeds deployment

26 views
Skip to first unread message

Shahar Fleischman

unread,
Apr 10, 2014, 4:59:13 AM4/10/14
to weed-fil...@googlegroups.com
hi,

we want to test weedfs in our env, and i have a few questions, since i didn't find answers to that in the documentation.

we want to automate the deployment of weedfs, and want multiple masters with automatic failover.
we've tried giving all masters(in the peers list) when they start, but this doesn't work, as there is a need for a first master to start without peers option, is there a way to change that ?
is there a way to know the complete command line options of weedfs ?
for instance, when you look at weed exe help, there is nothing that mentions how logging is working(but we've found it in the wiki).
or how you can run weedfs as a daemon ?
one last question, is there a benefit to running the weed master & volume in the same process, or it is best that they will be separate ?

thanks,
shahar.

The above terms reflect a potential business arrangement, are provided solely as a basis for further discussion, and are not intended to be and do not constitute a legally binding obligation. No legally binding obligations will be created, implied, or inferred until an agreement in final form is executed in writing by all parties involved.

This email and any attachments hereto may be confidential or privileged.  If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person. Thanks.

Chris Lu

unread,
Apr 10, 2014, 10:19:51 AM4/10/14
to weed-fil...@googlegroups.com
we want to automate the deployment of weedfs, and want multiple masters with automatic failover.
we've tried giving all masters(in the peers list) when they start, but this doesn't work, as there is a need for a first master to start without peers option, is there a way to change that ?

Bootstrap the first master without peers list is needed for the very first deployment. After that, you can use the peers list. Some coding is needed to smooth this.
 
is there a way to know the complete command line options of weedfs ?
for instance, when you look at weed exe help, there is nothing that mentions how logging is working(but we've found it in the wiki).

The logging is the only one not included in command line options. It's copied from google log with a little customization.
 
or how you can run weedfs as a daemon ?

Does running it with "&" at the end of command line help?
 
one last question, is there a benefit to running the weed master & volume in the same process, or it is best that they will be separate ?

Besides ease of operations, and a tiny saving in memory, running master and volume via "weed server" does not have much benefit. It's strictly equal to running master and volume separately.

Chris 

Chris Lu

unread,
Apr 12, 2014, 3:48:21 AM4/12/14
to weed-fil...@googlegroups.com
we want to automate the deployment of weedfs, and want multiple masters with automatic failover.
we've tried giving all masters(in the peers list) when they start, but this doesn't work, as there is a need for a first master to start without peers option, is there a way to change that ?

Bootstrap the first master without peers list is needed for the very first deployment. After that, you can use the peers list. Some coding is needed to smooth this.

Update: This is fixed in git HEAD now, 0.53 beta. Now you can start all master servers with the same "-peers" list, without concerning the ordering of starting.

Chris

Shahar Fleischman

unread,
Apr 13, 2014, 9:01:34 AM4/13/14
to weed-fil...@googlegroups.com
first, i  would like to thank you for your fast reply :).
thanks also for the fix, silly question, do i need to compile it myself , or is there a binary version to download ?

shahar.

Shahar Fleischman

unread,
Apr 13, 2014, 9:04:22 AM4/13/14
to weed-fil...@googlegroups.com
the problem is that even when giving the log options to the process, it still writes to STDOUT, so i need to silence it with nihup or redirect all output to another log file(or /dev/null).
i''ve tried to use daemon function from linux(/etc/rc.d/init.d/functions), but it fails(didn't test why yet).

thanks,
shahar.

Chris Lu

unread,
Apr 13, 2014, 1:26:44 PM4/13/14
to weed-fil...@googlegroups.com
ok. Now I understand what you want. I checked in the code to git HEAD so that you would see the logging options when just type in "weed" and hit enter.

You would need to use "go get -u code.google.com/p/weed-fs/go/weed" for the git HEAD version.

Chris



--
You received this message because you are subscribed to the Google Groups "Weed File System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weed-file-syst...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Lu

unread,
Apr 13, 2014, 1:41:20 PM4/13/14
to weed-fil...@googlegroups.com
With the new code, you will need to adjust the logging this way:

weed -alsologtostderr=false master -port=... 

Shahar Fleischman

unread,
Apr 22, 2014, 7:08:38 AM4/22/14
to weed-fil...@googlegroups.com
thanks for all the help :), we are working with v0.55 now.
another question, if i may:
this gives me the status of volume servers:

how do i get the masters status(i have 3), who is alive  and who is the leader ?
thanks.

Chris Lu

unread,
Apr 22, 2014, 10:24:38 AM4/22/14
to weed-fil...@googlegroups.com
To get cluster information, use

Seems this is not in wiki page yet. I will add it.

Chris

> curl "http://10.0.2.15:9333/cluster/status?pretty=y"
{
 
"IsLeader": true,
 
"Leader": "10.0.2.15:9333",
 
"Peers": [
   
"10.0.2.15:9334",
   
"10.0.2.15:9335"
 
]
}
Reply all
Reply to author
Forward
0 new messages