| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | /* | 
					
						
							| 
									
										
											  
											
												config/main: Re-write config files - add to new config v3
- New config format.
```
{
	"version": "3",
	"address": ":9000",
    "backend": {
          "type": "fs",
          "disk": "/path"
    },
	"credential": {
		"accessKey": "WLGDGYAQYIGI833EV05A",
		"secretKey": "BYvgJM101sHngl2uzjXS/OBF/aMxAN06JrJ3qJlF"
	},
	"region": "us-east-1",
	"logger": {
		"file": {
			"enable": false,
			"fileName": "",
			"level": "error"
		},
		"syslog": {
			"enable": false,
			"address": "",
			"level": "debug"
		},
		"console": {
			"enable": true,
			"level": "fatal"
		}
	}
}
```
New command lines in lieu of supporting XL.
Minio initialize filesystem backend.
~~~
$ minio init fs <path>
~~~
Minio initialize XL backend.
~~~
$ minio init xl <url1>...<url16>
~~~
For 'fs' backend it starts the server.
~~~
$ minio server
~~~
For 'xl' backend it waits for servers to join.
~~~
$ minio server
... [PROGRESS BAR] of servers connecting
~~~
Now on other servers execute 'join' and they connect.
~~~
....
minio join <url1> -- from <url2> && minio server
minio join <url1> -- from <url3> && minio server
...
...
minio join <url1> -- from <url16> && minio server
~~~
											
										 
											2016-02-13 07:27:10 +08:00
										 |  |  |  * Minio Cloud Storage, (C) 2015, 2016 Minio, Inc. | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Licensed under the Apache License, Version 2.0 (the "License"); | 
					
						
							|  |  |  |  * you may not use this file except in compliance with the License. | 
					
						
							|  |  |  |  * You may obtain a copy of the License at | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  *     http://www.apache.org/licenses/LICENSE-2.0
 | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Unless required by applicable law or agreed to in writing, software | 
					
						
							|  |  |  |  * distributed under the License is distributed on an "AS IS" BASIS, | 
					
						
							|  |  |  |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
					
						
							|  |  |  |  * See the License for the specific language governing permissions and | 
					
						
							|  |  |  |  * limitations under the License. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-19 07:23:42 +08:00
										 |  |  | package cmd | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-09 10:04:36 +08:00
										 |  |  | import ( | 
					
						
							|  |  |  | 	"errors" | 
					
						
							|  |  |  | ) | 
					
						
							| 
									
										
										
										
											2015-09-19 05:48:01 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-18 10:17:33 +08:00
										 |  |  | // errInvalidArgument means that input argument is invalid.
 | 
					
						
							|  |  |  | var errInvalidArgument = errors.New("Invalid arguments specified") | 
					
						
							| 
									
										
										
										
											2016-03-13 08:08:15 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-06-07 09:10:51 +08:00
										 |  |  | // errMethodNotAllowed means that method is not allowed.
 | 
					
						
							|  |  |  | var errMethodNotAllowed = errors.New("Method not allowed") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-13 08:08:15 +08:00
										 |  |  | // errSignatureMismatch means signature did not match.
 | 
					
						
							|  |  |  | var errSignatureMismatch = errors.New("Signature does not match") | 
					
						
							| 
									
										
										
										
											2016-03-31 21:57:29 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-29 03:02:22 +08:00
										 |  |  | // used when we deal with data larger than expected
 | 
					
						
							| 
									
										
										
										
											2016-10-10 14:03:10 +08:00
										 |  |  | var errSizeUnexpected = errors.New("Data size larger than expected") | 
					
						
							| 
									
										
										
										
											2016-10-23 00:05:01 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-03 02:45:00 +08:00
										 |  |  | // used when we deal with data with unknown size
 | 
					
						
							|  |  |  | var errSizeUnspecified = errors.New("Data size is unspecified") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-23 00:05:01 +08:00
										 |  |  | // When upload object size is greater than 5G in a single PUT/POST operation.
 | 
					
						
							|  |  |  | var errDataTooLarge = errors.New("Object size larger than allowed limit") | 
					
						
							| 
									
										
										
										
											2016-10-25 14:47:03 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // When upload object size is less than what was expected.
 | 
					
						
							|  |  |  | var errDataTooSmall = errors.New("Object size smaller than expected") | 
					
						
							| 
									
										
										
										
											2016-11-16 05:39:02 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // errServerNotInitialized - server not initialized.
 | 
					
						
							| 
									
										
										
										
											2016-11-16 10:14:23 +08:00
										 |  |  | var errServerNotInitialized = errors.New("Server not initialized, please try again") | 
					
						
							| 
									
										
										
										
											2016-11-16 05:39:02 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-07 07:07:17 +08:00
										 |  |  | // errRPCAPIVersionUnsupported - unsupported rpc API version.
 | 
					
						
							|  |  |  | var errRPCAPIVersionUnsupported = errors.New("Unsupported rpc API version") | 
					
						
							| 
									
										
										
										
											2016-11-16 05:39:02 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // errServerTimeMismatch - server times are too far apart.
 | 
					
						
							| 
									
										
										
										
											2016-11-16 10:14:23 +08:00
										 |  |  | var errServerTimeMismatch = errors.New("Server times are too far apart") | 
					
						
							| 
									
										
										
										
											2017-03-03 19:01:42 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-02 03:16:54 +08:00
										 |  |  | // errInvalidBucketName - bucket name is reserved for Minio, usually
 | 
					
						
							|  |  |  | // returned for 'minio', '.minio.sys', buckets with capital letters.
 | 
					
						
							|  |  |  | var errInvalidBucketName = errors.New("The specified bucket is not valid") | 
					
						
							| 
									
										
										
										
											2017-03-04 08:32:04 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // errInvalidRange - returned when given range value is not valid.
 | 
					
						
							|  |  |  | var errInvalidRange = errors.New("Invalid range") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // errInvalidRangeSource - returned when given range value exceeds
 | 
					
						
							|  |  |  | // the source object size.
 | 
					
						
							|  |  |  | var errInvalidRangeSource = errors.New("Range specified exceeds source object size") | 
					
						
							| 
									
										
										
										
											2018-04-04 12:58:48 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // error returned by disks which are to be initialized are waiting for the
 | 
					
						
							|  |  |  | // first server to initialize them in distributed set to initialize them.
 | 
					
						
							|  |  |  | var errNotFirstDisk = errors.New("Not first disk") | 
					
						
							| 
									
										
										
										
											2018-04-13 06:43:38 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // error returned by first disk waiting to initialize other servers.
 | 
					
						
							|  |  |  | var errFirstDiskWait = errors.New("Waiting on other disks") | 
					
						
							| 
									
										
										
										
											2018-05-02 01:36:37 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // error returned when a bucket already exists
 | 
					
						
							|  |  |  | var errBucketAlreadyExists = errors.New("Your previous request to create the named bucket succeeded and you already own it") |