令我惊讶的是,CentOS 7 安装程序允许我创建一个 RAID0 设备,其中包含大约 17 GB 磁盘和 26 GB 磁盘。我预计即使允许,逻辑大小也将是2 * min(17 GB, 26 GB) ~= 34 GB. 但我确实可以在文件系统级别看到 44 GB 的可用大小:
$ cat /sys/block/md127/md/dev*/size
16955392
26195968
$ df -h |grep md
/dev/md127 44G 1.9G 40G 5% /
Run Code Online (Sandbox Code Playgroud)
与磁盘相同的情况相比,md 子系统的性能表现如何?因为不可能在 2 个磁盘上进行简单的平衡条带化。
有没有办法明确获取 samba 守护进程的运行配置?
我在手册中找不到任何关于它的参考。当然,您运行 testparm,但这只会显示显式配置的有效性;我还想查看加载的隐式配置
我们有一个foobar不属于我的文件,但它在我的组中:
$ ll
total 4,0K
-rw-rw-r-- 1 root hbogert 4 jan 19 12:27 foobar
Run Code Online (Sandbox Code Playgroud)
我可以触摸它,它会一直更新:
$ stat foobar
File: 'foobar'
Size: 4 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 4869333 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 0/ root) Gid: ( 1000/ hbogert)
Access: 2017-01-19 12:27:04.499412133 +0100
Modify: 2017-01-19 12:27:04.499412133 +0100
Change: 2017-01-19 12:27:04.499412133 +0100
Birth: -
$ touch foobar
$ stat foobar
File: 'foobar'
Size: 4 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d …Run Code Online (Sandbox Code Playgroud) 我想从服务器 C 下载一个文件,通过服务器 B(堡垒)到我的本地服务器 A。
通常我会用 处理 ssh/config 中的混乱ProxyCommand,但在这种情况下我不能。我们可以用 rsync 制作一个单线,它仍然可以让我做上面的事情吗?
我有很长的命令大致是这样的:
$ command-outer "long command which references a file here: filename1, and another file reference here: filename2"
Run Code Online (Sandbox Code Playgroud)
这些文件是另一个命令的输出。所以我在做:
$ command-outer "long ... "<(command-inner "again long params")"... "\
<(command-inner "again long params")" ..."
Run Code Online (Sandbox Code Playgroud)
为了可读性,我想<()从长命令调用中提取内部未命名/匿名管道(带有 的管道)。但是我似乎不能这样做;执行以下操作:
RESULT_FILE_DESCRIPTOR1=<(command-inner ....)
Run Code Online (Sandbox Code Playgroud)
当我RESULT_FILE_DESCRIPTOR1在 params 列表中实际使用时,导致文件描述符已经关闭command-outer
并command-outer在同一行调用,因此:
RESULT_FILE_DESCRIPTOR1=<(command-inner ....) outer-command "long ... $RESULT_FILE_DESCRIPTOR1 ... "
Run Code Online (Sandbox Code Playgroud)
返回一个空结果 RESULT_FILE_DESCRIPTOR1,这并不奇怪,因为:
FOO=BAR echo $FOO
Run Code Online (Sandbox Code Playgroud)
也不起作用。
bash ×1
files ×1
mdadm ×1
permissions ×1
pipe ×1
raid0 ×1
rsync ×1
samba ×1
samba4 ×1
shell-script ×1
ssh ×1
stat ×1
timestamps ×1
touch ×1