我试图通过管道将 tar 传输到 dd 并使用 dd 写入磁带以取得进展:
export TAPE=/dev/nst0
tar -b 128 -c *| dd of=$TAPE bs=65536 status=progress
但是我得到了一个错误
tar: /dev/nst0: Cannot open: Device or resource busy
tar: Error is not recoverable: exiting now
tar dd 自己写入驱动器就好了。
HP Ultrium 1760 驱动器的写入速度指定为 120MB/s(使用 LTO-4 介质)和 80MB/s(使用 LTO-3 介质)。但是我得到了其中的一半——分别为 80/40 MB/s。连接器是驱动器上的 SFF-8482 和控制器上的 SATA。SFF-8482 在技术上支持 2 个 SAS 通道,并且有 SFF-8482 到 2x SATA 的电缆(第二张照片)。但是我不确定是否:
我确实尝试将其插入 Windows 并运行 HP 的一些诊断工具,它提到了“驱动器未全速运行”之类的内容。
更新:硬盘速度不是问题:
dd if=/dev/zero of=$TAPE bs=1M count=5000 5000+0 个记录 5000+0 个记录输出 5242880000 字节(5.2 GB)复制,67.8001 秒,77.3 MB/秒
我想使用照片上的电缆将HP StorageWorks LTO-4 Ultrium 1760磁带机连接到LSI SAS 3041E控制器。该电缆被宣传为0.7M Mini SFF-8482 to SAS 29P SATA。或者像这样的适配器(第二张图片):SAS To Sata 22pin Adapter Cable SFF-8482 Conversion
更新:该设备使用第一张照片中的蓝色电缆。
我有一个简单的文件服务器(centos 7 上的 apache 2.4),其结构如下: /index.html - 一个确保此处没有目录列表的页面 /upload - 用于上传的 php 脚本 /storage - 文件的基本目录 /storage/ upload - 由 php 上传的文件 /storage/public - 不受密码保护的文件
我无法使目录列表工作。例如在 /storage/public 我看到 /index.html 页面。/storage/public 中没有 index.html。如果我删除此页面,我会在 /page 中看到默认的 apache“testing 123”页面,并且目录列表在 /storage/public(以及所有其他具有 +Indexes 的地方)中有效。为什么 /index.html 显示在 /storage/public/
<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot "/home/webroot/www"
ServerName subdomain.example.com
ErrorLog "/home/rootdir/log/subdomain.error.log"
CustomLog "/home/rootdir/log/subdomain.access.log" common
SuexecUserGroup user apache
#Set caching on image files for 11 months
<filesMatch "\.(ico|gif|jpg|png|js|css)$">
#ExpiresActive On
#ExpiresDefault "access plus 11 month"
Header append Cache-Control "public"
</filesMatch>
<Directory "/home/webroot/www" >
AllowOverride None
Options -ExecCGI -Indexes +Includes +SymLinksIfOwnerMatch +MultiViews
Require all granted
</Directory>
<Directory "/home/webroot/www/storage/upload" >
AllowOverride None
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /home/rootdir/.htpasswd
Require valid-user
<FilesMatch "\.php$">
SetHandler "proxy:unix:/usr/local/php73/var/run/php-fpm.sock|fcgi://localhost/"
</FilesMatch>
</Directory>
<Directory "/home/webroot/www/storage/" >
AllowOverride None
Options +Indexes +SymLinksIfOwnerMatch +MultiViews
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /home/rootdir/.htpasswd
Require valid-user
#Require all granted
RemoveType .php
Order allow,deny
Allow from all
</Directory>
<Directory "/home/webroot/www/storage/public" >
Options +Indexes +SymLinksIfOwnerMatch +MultiViews
AuthType None
Require all granted
Satisfy Any
</Directory>
<Directory "/home/webroot/www/.well-known" >
AuthType None
Require all granted
Satisfy Any
Allow from all
</Directory>
<Directory "/home/webroot/www/storage/upload" >
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /home/rootdir/.htpasswd
Require valid-user
</Directory>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript
</IfModule>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/subdomain.example.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/subdomain.example.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/subdomain.example.com/chain.pem
</VirtualHost>
</IfModule>
更新:
# apachectl -M|grep autoindex
autoindex_module (shared)
另一个虚拟主机有以下问题:我使用的虚拟主机的根文件夹中有 index.html
Options -ExecCGI -Indexes
所以我有一个子目录 /test 并放了另一个 index.html,但是当我在浏览器中打开 /test/ 时,我看到 /index.html 而不是 /test/index.html
这个虚拟主机中根本没有 php。
我在英特尔 S1200V3RPL 服务器板上使用串行局域网控制台。它工作得很好,但是文件系统损坏了,我不得不重新安装。我以同样的方式设置了串行控制台,但在 grub2 中没有输入。启动后输入在 BIOS 和 centos 控制台中有效,但在组中无效。我无法选择其他选项或中断启动过程。启动后我可以登录,一切正常。
# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_TERMINAL_OUTPUT="serial console"
# I tried with and without following line
#GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 quiet"
GRUB_DISABLE_RECOVERY="true"
唯一的区别是我通过 EFI 安装了以前的 CentOS,现在是旧版引导。
我有一个备份脚本,我在其中卸载了一个 squashfs 文件,我进行备份然后再次将其安装回去。脚本的简化版本是:
umount /home/backup/auto/mnt/os
mksquashfs /src-dir /home/backup/auto/os.sqfs.img
mount -t squashfs -o loop /home/backup/auto/os.sqfs.img /home/backup/auto/mnt/os
这个想法是随时可以访问备份数据。
这工作了很长时间。但是,我收到一个错误,即没有足够的环回设备,并且我看到 umount 不再分离安装有 mount 的循环设备。
最近我有两个主要变化:
我刚刚注意到有新的内核更新 2.6.32-754.12.1.el6,所以我更新了,但它并没有解决问题。
操作系统:CentOS 6.10 i686
更新: 这是在故障系统上:
# strace -e trace=ioctl,mount mount -t squashfs -o loop os.sqfs.img mnt/os
ioctl(3, LOOP_GET_STATUS, {number=0, offset=0, flags=0, name="/home/squash/web.img", ...}) = 0
ioctl(3, LOOP_GET_STATUS, {number=0, offset=0, flags=0, name="/home/squash/web.img", ...}) = -1 ENXIO (No such device or address)
ioctl(4, LOOP_SET_FD, 0x3) = 0
ioctl(4, LOOP_SET_STATUS64, {offset=0, number=0, flags=0, file_name="/home/backup/auto/os.sqfs.img", ...}) = 0
mount("/dev/loop1", "mnt/os", "squashfs", MS_MGC_VAL, NULL) = 0
+++ exited with 0 +++
# cat /etc/mtab|grep 'mnt/os'
/dev/loop1 /home/backup/auto/mnt/os squashfs ro,relatime 0 0
# ls -la /etc/mtab
lrwxrwxrwx. 1 root root 12 Apr 17 02:53 /etc/mtab -> /proc/mounts
# notice that here there is no even the umount call. Am I missing something?
# strace -e trace=ioctl,umount,mount umount mnt/os
+++ exited with 0 +++
这是在另一个具有相同版本的所有系统上,但它是 64 位的:
# strace -e trace=ioctl,mount mount -t squashfs -o loop os.sqfs.img mnt/os
ioctl(3, LOOP_GET_STATUS, {number=0, offset=0, flags=0, name="/storage/backup/auto/home.sqfs.img", ...}) = 0
ioctl(3, LOOP_GET_STATUS, {number=1, offset=0, flags=0, name="/storage/backup/auto/mail.sqfs.img", ...}) = 0
ioctl(3, LOOP_GET_STATUS, {number=1, offset=0, flags=0, name="/storage/backup/auto/mail.sqfs.img", ...}) = -1 ENXIO (No such device or address)
ioctl(4, LOOP_SET_FD, 0x3) = 0
ioctl(4, LOOP_SET_STATUS64, {offset=0, number=0, flags=0, file_name="/storage/backup/auto/os.sqfs.img", ...}) = 0
mount("/dev/loop2", "mnt/os", "squashfs", MS_MGC_VAL, NULL) = 0
+++ exited with 0 +++
# strace -e trace=ioctl,umount,mount umount mnt/os
umount("/storage/backup/auto/mnt/os", 0) = 0
ioctl(3, LOOP_CLR_FD) = 0
+++ exited with 0 +++
# losetup -a
/dev/loop0: [0904]:35656625 (/storage/backup/auto/home.sqfs.img)
/dev/loop1: [0904]:35656626 (/storage/backup/auto/mail.sqfs.img)
我也没有在好的系统上看到 LO_FLAGS_AUTOCLEAR。但我确实看到了 umount 的不同。
我重新安装util-linux-ng
了 - 它没有帮助。此软件包没有更新,也从未更新过。也许它与内核有关。我想知道为什么它在 64 位操作系统上运行良好。我可能会安装一个 32 位 VM 来测试它是否会这样做。
- 使固定 -
问题是我在系统复制期间使用 CentOS 7 的实时 CD 将 /etc/mtab 链接到 /proc/mounts 并且我忘记了它。我不得不重新安装 grub,所以我 chroot 到操作系统并建立了链接,因为 grub-install 不起作用。我忘了恢复它。我通过以下方式解决了这个问题:
rm -f /etc/mtab && cat /proc/mounts |grep -v rootfs > /etc/mtab
所以它现在有效:
root@home auto# smount os.sqfs.img mnt/os
root@home auto# losetup -a
/dev/loop0: [0816]:7090072 (/home/squash/web.img)
/dev/loop1: [0816]:7864675 (/home/backup/auto/os.sqfs.img)
/dev/loop4: [0816]:7864569 (/home/backup/auto/web.sqfs.img)
root@home auto# umount mnt/os
root@home auto# losetup -a
/dev/loop0: [0816]:7090072 (/home/squash/web.img)
/dev/loop4: [0816]:7864569 (/home/backup/auto/web.sqfs.img)
我最近将 CentOS 更新到 6.8 版(最终版)。我不确定dovecot是否停止工作或稍后停止工作。我在正确的密码登录和错误密码的“失败”登录中什么也看不到。我从来没有碰过 /etc/pam.d - 应该是操作系统的默认值。它以前工作过。我不知道为什么它现在不起作用。secure
我正在使用 dovecot + sendmail。Sendmail 正在通过 sasl->PAM 进行身份验证,并且工作正常。
我试过 passdbshadow
看看有什么问题,但没有成功。
这可能是巧合,但由于某种原因,强制执行 md 检查(在所有分区上使用 raid 1)
更新: raid 检查完成后 dmesg 显示了这一点。
auth[14058]: segfault at 9c ip 000000000040f8e0 sp 00007ffe99788070 error 4 in auth[400000+37000]
auth[14133]: segfault at 8c ip 000000000040f8e0 sp 00007ffc7ec2ee60 error 4 in auth[400000+37000]
在 dmesg 充满这些消息之前:“延迟 md4 的数据检查直到 md3 完成”,所以我看不到段错误......
配置:
# dovecot -n
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-642.1.1.el6.centos.plus.x86_64 x86_64 CentOS release 6.8 (Final)
auth_debug = yes
auth_gssapi_hostname = $ALL
auth_verbose = yes
log_path = /var/log/dovecot.log
mail_debug = yes
mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
mbox_write_locks = fcntl
passdb {
args = failure_show_msg=yes dovecot
driver = pam
}
passdb {
driver = shadow
}
protocols = imap pop3
service auth-worker {
user = root
}
service auth {
user = root
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
driver = passwd
}
verbose_proctitle = yes
鸽舍日志:
Jul 18 02:18:12 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Jul 18 02:18:12 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Jul 18 02:18:12 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Jul 18 02:18:12 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Jul 18 02:18:12 auth: Debug: auth client connected (pid=24897)
Jul 18 02:18:16 auth: Debug: client in: AUTH 1 PLAIN service=imap secured lip=5.9.143.206 rip=176.12.6.242 lport=143 rport=64099
Jul 18 02:18:16 auth: Debug: client out: CONT 1
Jul 18 02:18:16 auth: Debug: client in: CONT<hidden>
Jul 18 02:18:16 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Jul 18 02:18:16 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Jul 18 02:18:16 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Jul 18 02:18:16 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Jul 18 02:18:16 auth: Debug: pam(npelov,176.12.6.242): lookup service=dovecot
Jul 18 02:18:16 auth: Debug: pam(npelov,176.12.6.242): #1/1 style=1 msg=Password:
Jul 18 02:18:19 auth: Info: pam(npelov,176.12.6.242): pam_authenticate() failed: Authentication failure (password mismatch?)
Jul 18 02:18:19 master: Error: service(auth): child 24898 killed with signal 11 (core dumps disabled)
Jul 18 02:18:19 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Jul 18 02:18:19 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Jul 18 02:18:19 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Jul 18 02:18:19 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Jul 18 02:18:19 auth: Debug: auth client connected (pid=24897)
Jul 18 02:18:19 auth: Debug: client in: AUTH 2 PLAIN service=imap secured lip=5.9.143.206 rip=176.12.6.242 lport=143 rport=64099 resp=<hidden>
Jul 18 02:18:19 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Jul 18 02:18:19 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Jul 18 02:18:19 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Jul 18 02:18:19 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Jul 18 02:18:19 auth: Debug: pam(npelov,176.12.6.242): lookup service=dovecot
Jul 18 02:18:19 auth: Debug: pam(npelov,176.12.6.242): #1/1 style=1 msg=Password:
Jul 18 02:18:20 auth: Info: pam(npelov,176.12.6.242): pam_authenticate() failed: Authentication failure (password mismatch?)
Jul 18 02:18:20 master: Error: service(auth): child 25050 killed with signal 11 (core dumps disabled)
Jul 18 02:18:24 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Jul 18 02:18:24 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Jul 18 02:18:24 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Jul 18 02:18:24 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Jul 18 02:18:24 auth: Debug: auth client connected (pid=24897)
手动测试:
# openssl s_client -connect <host>:993
CONNECTED(00000003)
..............................................
..............................................
..............................................
a1 LOGIN npelov validpassword
a1 NO [UNAVAILABLE] Temporary authentication failure.
* OK Waiting for authentication process to respond..
我正在将邮件服务器从一个 CentOS 6 移动到另一个。我使用带有 sasl pam 身份验证的 sendmail。当我尝试发送邮件时,它失败了,因为用户未通过身份验证并且邮件客户端不需要密码。新旧服务器上的所有配置文件都相同。我用 telnet(新服务器)对此进行了测试:
# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 new.mldb.org ESMTP Sendmail 8.14.4/8.14.4; Wed, 4 Feb 2015 14:05:18 +0100
ehlo localhost
250-new.mldb.org Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-STARTTLS
250-DELIVERBY
250 HELP
旧服务器:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mldb.org ESMTP Sendmail 8.14.4/8.14.4; Wed, 4 Feb 2015 16:07:23 +0200
ehlo localhost
250-mldb.org Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH LOGIN PLAIN
250-STARTTLS
250-DELIVERBY
250 HELP
新服务器上缺少此行 250-AUTH LOGIN PLAIN。
以下是 sendmail 配置的一部分:
define(`confAUTH_OPTIONS', `A')dnl
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
define(`confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl
define(`confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
我使用这个命令测试了 sasl
# testsaslauthd -s smtp -u <user> -p <password>
0: OK "Success."
我检查过的其他文件:
# cat /etc/sasl2/Sendmail.conf
pwcheck_method:saslauthd
saslauthd_path:/var/run/saslauthd
mech_list: LOGIN PLAIN
# cat /etc/pam.d/smtp
#%PAM-1.0
auth include password-auth
account include password-auth
# cat /etc/sysconfig/saslauthd
SOCKETDIR=/var/run/saslauthd
MECH=pam
FLAGS=
当我尝试发送邮件时,我在日志中得到了这个:
# tail /var/log/maillog
Feb 4 15:17:38 new sendmail[12070]: STARTTLS=server, relay=*******.spectrumnet.bg [****], version=TLSv1/SSLv3, verify=NO, cipher=DHE-RSA-AES256-SHA, bits=256/256
Feb 4 15:17:38 new sendmail[12070]: t14EHba9012070: ruleset=check_rcpt, arg1=<****@mail.bg>, relay=*****.spectrumnet.bg [**********], reject=550 5.7.1 <****@mail.bg>... Relaying denied. Proper authentication required.
Feb 4 15:17:40 new sendmail[12070]: t14EHba9012070: from=<*****@*****.eu>, size=422, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=*******.spectrumnet.bg [******]
在我更改任何内容 /etc/mail 后,我运行“make”
sendmail 不提供身份验证的原因应该是什么?
更新
sendmail 不需要身份验证的主要原因是我没有安装这个数据包:cyrus-sasl-plain
我安装了它,现在邮件客户端要求输入密码,但密码总是失败。
更多来自配置:# grep TrustAuthMech sendmail.cf C{TrustAuthMech}EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN R$* $| $={TrustAuthMech} $# RELAY # grep AuthMechanisms sendmail.cf O AuthMechanisms=EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN