@ -60,6 +60,7 @@ type FilerOptions struct {
localSocket * string
localSocket * string
showUIDirectoryDelete * bool
showUIDirectoryDelete * bool
downloadMaxMBps * int
downloadMaxMBps * int
diskType * string
}
}
func init ( ) {
func init ( ) {
@ -89,6 +90,7 @@ func init() {
f . localSocket = cmdFiler . Flag . String ( "localSocket" , "" , "default to /tmp/seaweedfs-filer-<port>.sock" )
f . localSocket = cmdFiler . Flag . String ( "localSocket" , "" , "default to /tmp/seaweedfs-filer-<port>.sock" )
f . showUIDirectoryDelete = cmdFiler . Flag . Bool ( "ui.deleteDir" , true , "enable filer UI show delete directory button" )
f . showUIDirectoryDelete = cmdFiler . Flag . Bool ( "ui.deleteDir" , true , "enable filer UI show delete directory button" )
f . downloadMaxMBps = cmdFiler . Flag . Int ( "downloadMaxMBps" , 0 , "download max speed for each download request, in MB per second" )
f . downloadMaxMBps = cmdFiler . Flag . Int ( "downloadMaxMBps" , 0 , "download max speed for each download request, in MB per second" )
f . diskType = cmdFiler . Flag . String ( "disk" , "" , "[hdd|ssd|<tag>] hard drive or solid state drive or any tag" )
// start s3 on filer
// start s3 on filer
filerStartS3 = cmdFiler . Flag . Bool ( "s3" , false , "whether to start S3 gateway" )
filerStartS3 = cmdFiler . Flag . Bool ( "s3" , false , "whether to start S3 gateway" )
@ -183,6 +185,11 @@ func runFiler(cmd *Command, args []string) bool {
if * filerStartWebDav {
if * filerStartWebDav {
filerWebDavOptions . filer = & filerAddress
filerWebDavOptions . filer = & filerAddress
if * filerWebDavOptions . disk == "" {
filerWebDavOptions . disk = f . diskType
}
go func ( delay time . Duration ) {
go func ( delay time . Duration ) {
time . Sleep ( delay * time . Second )
time . Sleep ( delay * time . Second )
filerWebDavOptions . startWebDav ( )
filerWebDavOptions . startWebDav ( )
@ -243,6 +250,7 @@ func (fo *FilerOptions) startFiler() {
ConcurrentUploadLimit : int64 ( * fo . concurrentUploadLimitMB ) * 1024 * 1024 ,
ConcurrentUploadLimit : int64 ( * fo . concurrentUploadLimitMB ) * 1024 * 1024 ,
ShowUIDirectoryDelete : * fo . showUIDirectoryDelete ,
ShowUIDirectoryDelete : * fo . showUIDirectoryDelete ,
DownloadMaxBytesPs : int64 ( * fo . downloadMaxMBps ) * 1024 * 1024 ,
DownloadMaxBytesPs : int64 ( * fo . downloadMaxMBps ) * 1024 * 1024 ,
DiskType : * fo . diskType ,
} )
} )
if nfs_err != nil {
if nfs_err != nil {
glog . Fatalf ( "Filer startup error: %v" , nfs_err )
glog . Fatalf ( "Filer startup error: %v" , nfs_err )