macOS Mojave(10.14.4)系统Octave 5.1.0使用pause()函数无法响应按键事件

目前 ( 2019/04/24 ),在 `macOS Mojave` (`10.14.4`)系统上使用 `brew install octave` ,安装 `Octave 5.1.0` 之后,使用 `pause()` 函数无法在点击键盘之后继续执行,除了 `Ctrl + C` 之外任意键都不响应。正常情况下,点击任意按键之后,应该继续执行后续的代码。

这个是目前使用 `brew` 安装的 `Octave 5.1.0` 在编译的时候,关联的库是 `glibc 2.28` 之后的版本。这个版本上 `glibc 2.28` 的某些行为发生变动。具体的讨论信息,参考 bug #55029: pause() with no arguments does not return like kbhit() with glibc 2.28 上的讨论。本质就是 `glibc 2.28` 之后的版本要求应用程序在接收信息结束( `EOF` )之后,主动调用 `clearerr (stdin);` ,否则会收不到后续的按键通知。这个 `BUG` 在 `Octave 5.2` 版本被修复,但是这个版本何时发布,暂时不定。

目前的修复方式为要求 `brew` 从最新版本的代码编译安装,而不是安装已发布版本,如下:

$ brew uninstall --ignore-dependencies octave

# 安装编译依赖
$ brew install texinfo

$ wget https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/octave.rb

$ sed -i "" "s/\"--enable-shared\"/\"--enable-shared\",\"--disable-docs\"/g" octave.rb

$ brew install --build-from-source --HEAD -v octave.rb

修改下载的编译配置文件,并且关闭文档编译( 目前文档编译会失败),也就是增加  `--disable-docs` 这个编译参数。

调整之后的编译脚本如下:

class Octave < Formula
  desc "High-level interpreted language for numerical computing"
  homepage "https://www.gnu.org/software/octave/index.html"
  url "https://ftp.gnu.org/gnu/octave/octave-5.1.0.tar.xz"
  mirror "https://ftpmirror.gnu.org/octave/octave-5.1.0.tar.xz"
  sha256 "87b4df6dfa28b1f8028f69659f7a1cabd50adfb81e1e02212ff22c863a29454e"
  revision 2

  bottle do
    sha256 "6bb8497839d6f7872efcd6acad0216f443420e097a9b7fad44835823e1c0e735" => :mojave
    sha256 "d1de53a30f002d8b7ec3a6065994c46d8cbd4830aa7e199f572baff48723c6e6" => :high_sierra
    sha256 "7a648cff129ec85a5ee9417a0339a3b804756f7958585b707c015d322d220b15" => :sierra
  end

  head do
    url "https://hg.savannah.gnu.org/hgweb/octave", :branch => "default", :using => :hg

    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "bison" => :build
    depends_on "icoutils" => :build
    depends_on "librsvg" => :build
  end

  # Complete list of dependencies at https://wiki.octave.org/Building
  depends_on "gnu-sed" => :build # https://lists.gnu.org/archive/html/octave-maintainers/2016-09/msg00193.html
  depends_on :java => ["1.6+", :build]
  depends_on "pkg-config" => :build
  depends_on "arpack"
  depends_on "epstool"
  depends_on "fftw"
  depends_on "fig2dev"
  depends_on "fltk"
  depends_on "fontconfig"
  depends_on "freetype"
  depends_on "gcc" # for gfortran
  depends_on "ghostscript"
  depends_on "gl2ps"
  depends_on "glpk"
  depends_on "gnuplot"
  depends_on "graphicsmagick"
  depends_on "hdf5"
  depends_on "libsndfile"
  depends_on "libtool"
  depends_on "pcre"
  depends_on "portaudio"
  depends_on "pstoedit"
  depends_on "qhull"
  depends_on "qrupdate"
  depends_on "qt"
  depends_on "readline"
  depends_on "suite-sparse"
  depends_on "sundials"
  depends_on "texinfo"
  depends_on "veclibfort"

  # Dependencies use Fortran, leading to spurious messages about GCC
  cxxstdlib_check :skip

  def install
    # Default configuration passes all linker flags to mkoctfile, to be
    # inserted into every oct/mex build. This is unnecessary and can cause
    # cause linking problems.
    inreplace "src/mkoctfile.in.cc",
              /%OCTAVE_CONF_OCT(AVE)?_LINK_(DEPS|OPTS)%/,
              '""'

    # Qt 5.12 compatibility
    # https://savannah.gnu.org/bugs/?55187
    ENV["QCOLLECTIONGENERATOR"] = "qhelpgenerator"
    # These "shouldn't" be necessary, but the build breaks without them.
    # https://savannah.gnu.org/bugs/?55883
    ENV["QT_CPPFLAGS"]="-I#{Formula["qt"].opt_include}"
    ENV.append "CPPFLAGS", "-I#{Formula["qt"].opt_include}"
    ENV["QT_LDFLAGS"]="-F#{Formula["qt"].opt_lib}"
    ENV.append "LDFLAGS", "-F#{Formula["qt"].opt_lib}"

    system "./bootstrap" if build.head?
    system "./configure", "--prefix=#{prefix}",
                          "--disable-dependency-tracking",
                          "--disable-silent-rules",
                          "--enable-link-all-dependencies",
                          "--enable-shared","--disable-docs",
                          "--disable-static",
                          "--with-hdf5-includedir=#{Formula["hdf5"].opt_include}",
                          "--with-hdf5-libdir=#{Formula["hdf5"].opt_lib}",
                          "--with-x=no",
                          "--with-blas=-L#{Formula["veclibfort"].opt_lib} -lvecLibFort",
                          "--with-portaudio",
                          "--with-sndfile"
    system "make", "all"

    # Avoid revision bumps whenever fftw's or gcc's Cellar paths change
    inreplace "src/mkoctfile.cc" do |s|
      s.gsub! Formula["fftw"].prefix.realpath, Formula["fftw"].opt_prefix
      s.gsub! Formula["gcc"].prefix.realpath, Formula["gcc"].opt_prefix
    end

    # Make sure that Octave uses the modern texinfo at run time
    rcfile = buildpath/"scripts/startup/site-rcfile"
    rcfile.append_lines "makeinfo_program(\"#{Formula["texinfo"].opt_bin}/makeinfo\");"

    system "make", "install"
  end

  test do
    system bin/"octave", "--eval", "(22/7 - pi)/pi"
    # This is supposed to crash octave if there is a problem with veclibfort
    system bin/"octave", "--eval", "single ([1+i 2+i 3+i]) * single ([ 4+i ; 5+i ; 6+i])"
  end
end

参考链接


解决Btrfs文件系统ext2_saved文件磁盘占用异常

最近在 `OpenMediaVault 4.1.22-1(Arrakis)` 进行磁盘文件占用分析的时候,发现磁盘空间异常占用问题,如下:

root@openmediavault:/media/6357625f-c966-49ba-9c90-9e8f8ff50433# du -ah --max-depth=1
0	./lost+found
1.5T	./MyCloud
8.0K	./aquota.user
8.0K	./aquota.group
1.3T	./ext2_saved
4.0K	./WDMyCloudSync.sh
2.7T	.

这个 `1.3T ./ext2_saved`  文件是不存在的,并且没办法通过常规命令删除。

这个文件产生的原因是,执行过 从 `EXT3/4` 转换转化分区到 `Btrfs` :

$ btrfs-convert /media/6357625f-c966-49ba-9c90-9e8f8ff50433

完成转换需要删除备份的 `ext2_saved` 子卷,否则空间会不能释放。 请注意,如果没了它(备份子卷),你将没办法还原回 `EXT3/4` 文件系统。

$ sudo apt-get install btrfs-tools

# 执行,然后无视报错
$ btrfs subvolume delete /media/6357625f-c966-49ba-9c90-9e8f8ff50433/ext2_saved

可能会报错:

ERROR: cannot access subvolume /media/6357625f-c966-49ba-9c90-9e8f8ff50433/ext2_saved: No such file or directory

无视这个报错即可。

完成后再次查询文件占用空间:

root@openmediavault:/media/6357625f-c966-49ba-9c90-9e8f8ff50433# du -ah --max-depth=1
0	./lost+found
1.5T	./MyCloud
8.0K	./aquota.user
8.0K	./aquota.group
4.0K	./WDMyCloudSync.sh
1.5T	.

可以看到空间已经被释放了。

参考链接


华为(HUAWEI)S1700-8G-AC 非网管8口千兆以太网 交换机 参数

家里用的华为(HUAWEI)S1700-8G-AC 非网管8口千兆以太网 交换机想查查功耗信息,可是总是找不到,好不容易在京东找到了。 详细参数如下:
继续阅读华为(HUAWEI)S1700-8G-AC 非网管8口千兆以太网 交换机 参数

基于APC BK650-CH UPS连接群晖DS718+通过NUT(Network UPS Tools)实现WDMyCloud Gen1断电自动关机

最近新入手了 群晖 `DS718+`,鉴于群晖断电容易损坏硬盘的传说,为了保证设备的安全,特别购入了 `APC BK650-CH UPS` 。

`APC BK650-CH UPS` 有多个电源插槽,可以同时为多个设备提供断电保护,但是 `APC BK650-CH UPS` 只有一个 `USB` 设备接口,这个接口用来提供电源状态信息,比如是否断电,当前电量信息等数据。这就造成收到断电通知的只能有一个设备,这个设备必须通过网络通知其他设备,才能实现全部的断电通知。

继续阅读基于APC BK650-CH UPS连接群晖DS718+通过NUT(Network UPS Tools)实现WDMyCloud Gen1断电自动关机

brew报告错误“fatal: unable to access 'https://aomedia.googlesource.com/aom.git/': Failed to connect to aomedia.googlesource.com port 443: Operation timed out”

最近在使用 `brew` 升级应用的时候,报告如下错误:

$ brew upgrade
Warning: You are using macOS 10.11.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this old version.

==> Upgrading 7 outdated packages:
doxygen 1.8.14 -> 1.8.15, ffmpeg 4.0.2 -> 4.1.3, ilmbase 2.2.1 -> 2.3.0, libpng 1.6.36 -> 1.6.37, lz4 1.8.3 -> 1.9.0, opencv 3.4.2 -> 4.1.0_1, openexr 2.2.0_1 -> 2.3.0
==> Upgrading libpng 
==> Downloading https://downloads.sourceforge.net/libpng/libpng-1.6.37.tar.xz
==> Downloading from https://jaist.dl.sourceforge.net/project/libpng/libpng16/1.
######################################################################## 100.0%
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/libpng/1.6.37
==> make
==> make test
==> make install
?  /usr/local/Cellar/libpng/1.6.37: 27 files, 1.2MB, built in 3 minutes 59 seconds
Removing: /usr/local/Cellar/libpng/1.6.36... (28 files, 1.2MB)
Removing: /Users/xxxx/Library/Caches/Homebrew/libpng--1.6.36.tar.xz... (0B)
==> Upgrading ffmpeg 
==> Installing dependencies for ffmpeg: aom, frei0r, libtasn1, nettle, libffi, p11-kit, libevent, unbound, gnutls, fribidi, ninja, meson, glib, pixman, cairo, gobject-introspection, graphite2, harfbuzz, libass, libbluray, libsoxr, opencore-amr, doxygen, little-cms2, openjpeg, rtmpdump, flac, libsndfile, libsamplerate, rubberband, speex, autoconf-archive, giflib, webp, leptonica, tesseract and x265
==> Installing ffmpeg dependency: aom
==> Cloning https://aomedia.googlesource.com/aom.git
Cloning into '/Users/xxxx/Library/Caches/Homebrew/aom--git'...
fatal: unable to access 'https://aomedia.googlesource.com/aom.git/': Failed to connect to aomedia.googlesource.com port 443: Operation timed out
Error: An exception occurred within a child process:
  DownloadError: Failed to download resource "aom"
Failure while executing; `git clone --branch v1.0.0 https://aomedia.googlesource.com/aom.git /Users/xxxx/Library/Caches/Homebrew/aom--git` exited with 128. Here's the output:
Cloning into '/Users/xxxx/Library/Caches/Homebrew/aom--git'...
fatal: unable to access 'https://aomedia.googlesource.com/aom.git/': Failed to connect to aomedia.googlesource.com port 443: Operation timed out

众所周知的原因,很早之前,就已经不能访问 `Google` 的服务器了,因此这个错误是正常现象。

解决方法如下:

$ wget https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/aom.rb

# 用本站提供的一份代码拷贝来替代原来的地址
$ sed -i "" "s/https:\/\/aomedia\.googlesource\.com\/aom\.git/https:\/\/www.mobibrw.com\/wp-content\/uploads\/2019\/04\/aom.zip/g" aom.rb

$ brew uninstall --ignore-dependencies aom

$ brew install --build-from-source aom.rb --env=std

参考链接


OS X EI Capitan(10.11.6)执行brew upgrade cmake 升级到cmake-3.14.2/cmake-3.17.3报告错误“make: *** [all] Error 2”

$ brew upgrade cmake
Updating Homebrew...
Warning: You are using macOS 10.11.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this old version.

==> Upgrading 1 outdated package:
cmake 3.12.0 -> 3.14.2
==> Upgrading cmake 
==> Downloading https://github.com/Kitware/CMake/releases/download/v3.14.2/cmake
Already downloaded: /Users/xxxx/Library/Caches/Homebrew/downloads/348cde1c4453dba1e5e72e9bb6ae7cd45fffb907d265cd06efd513841eda8541--cmake-3.14.2.tar.gz
==> ./bootstrap --prefix=/usr/local/Cellar/cmake/3.14.2 --no-system-libs --paral
==> make
Last 15 lines from /Users/xxxx/Library/Logs/Homebrew/cmake/02.make:
[ 23%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/frm_req_name.c.o
[ 23%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/frm_scale.c.o
[ 24%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/frm_sub.c.o
[ 24%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/frm_user.c.o
[ 24%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/frm_win.c.o
[ 24%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_alnum.c.o
[ 24%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_alpha.c.o
[ 24%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_enum.c.o
[ 24%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_int.c.o
[ 25%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_ipv4.c.o
[ 25%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_num.c.o
[ 25%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_regex.c.o
[ 25%] Linking C static library libcmForm.a
[ 25%] Built target cmForm
make: *** [all] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!


Error: You are using macOS 10.11.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this old version.

查看日志`/Users/xxxx/Library/Logs/Homebrew/cmake/02.make`,内容如下:

继续阅读OS X EI Capitan(10.11.6)执行brew upgrade cmake 升级到cmake-3.14.2/cmake-3.17.3报告错误“make: *** [all] Error 2”

struts2升级之后报错“java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation”

struts2 从如下版本:

<struts2.version>2.5.10.1</struts2.version>
<apache.commons.version>3.5</apache.commons.version>

升级到

<struts2.version>2.5.20</struts2.version>

之后报错如下:

四月 13, 2019 10:07:59 上午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [default] in context with path [] threw exception [Filter execution threw an exception] with root cause
java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation(Ljava/lang/reflect/Method;Ljava/lang/Class;ZZ)Ljava/lang/annotation/Annotation;
	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:44)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:142)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:137)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:137)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:201)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:67)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:133)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:89)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:101)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:142)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:160)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:175)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:99)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:121)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:167)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:203)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:196)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
	at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:48)
	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:574)
	at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:79)
	at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:141)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1137)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:317)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

解决方法为升级

<dependency>
	<groupId>org.apache.commons</groupId>
	<artifactId>commons-lang3</artifactId>
	<version>${apache.commons.version}</version>
</dependency>

到更高的版本,如下:

<struts2.version>2.5.20</struts2.version>
<apache.commons.version>3.8.1</apache.commons.version>

参考链接


java.lang.NoSuchMethodError: org.apache.commons.lang3.math.NumberUtils.isCreatable(Ljava/lang/String

软件磁盘阵列(RAID)

RAID软件磁盘阵列

RAID 即廉价磁盘冗余阵列,其高可用性和可靠性适用于大规模环境中,相比正常使用,数据更需要被保护。RAID 是将多个磁盘整合的大磁盘,不仅具有存储功能,同时还有数据保护功能.

软件磁盘整列通过mdadm命令创建.

RAID等级

  • RAID-0: 等量模式,stripe,性能较佳,磁盘利用率100%
  • RAID-1: 镜像模式,mirror,安全性较佳,磁盘利用率50%
  • RAID-0+1: 先组成RAID-0,再有RAID-0组成RAID-1 性能安全兼顾,磁盘利用率50%
  • RAID-1+0:先组成RAID-1,再有RAID-1组成RAID-0  性能安全兼顾,磁盘利用率50%
  • RAID-5: 等量模式与分布式奇偶校验,性能与安全份均衡,磁盘可用量等于n-1
  • RAID-6: 等量模式与双分布式奇偶校验,性能与安全均衡,磁盘可用量等于n-2

继续阅读软件磁盘阵列(RAID)

ANDROID 高性能图形处理 之 二. OPENGL ES

参考链接