Happy Every Day

No Pain No Gain


  • 首页

  • docs

  • 标签23

  • 归档67

  • 日程表

  • 站点地图

  • 公益 404

  • 搜索

linux挂载ntfs设备

发表于 2018-06-20 | 更新于 2019-05-05
本文字数: 298 | 阅读时长 ≈ 1 分钟
下载软件包
https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2016.2.22.tgz
安装依赖
yum -y install gcc gcc-c++
编译安装
tar zxvf ntfs-3g_ntfsprogs-2016.2.22.tgz
cd ntfs-3g_ntfsprogs-2016.2.22
./configure --prefix=/opt/genewiznj/ntfs-3g
make && make install
挂载测试
mount -t ntfs-3g /dev/sdb1 /opt/genewiznj/usb

浪潮服务器相关配置

发表于 2018-06-20 | 更新于 2019-05-05
本文字数: 652 | 阅读时长 ≈ 1 分钟
修改BMC密码
#!/bin/bash
bmc_user="xxx"
bmc_password="xxx"
for ip in `seq 185 192`
do
/usr/bin/ipmitool -H 10.10.38.$ip -I lanplus -U $bmc_user -P $bmc_password user set password 2 xxx &> /dev/null
if [ $? -eq 0 ];then
echo -e "\033[34mServer:$ip bmc password has been modified successful\033[0m"
else
echo -e "\033[31mServer:$ip bmc password modified failuer\033[0m"
fi
done
fru-change工具使用简介
  • 适用范围
    所有带有BMC 模块的浪潮服务器产品及Linux操作系统。

  • 功能说明
    fru-change 工具用于对本地和远端服务器上FRU 设备信息的修改。

  • FRU可修改字段明细

  • 命令格式

    -kcs:表示在服务器本机上通过KCS 方式改写FRU 设备信息
    -nw:表示通过网络改写远端服务器的FRU 设备信息

  • 修改服务器位置信息(修改即生效,无需重启服务器)

  • 查看修改信息

未修改前:

修改后:

LVM逻辑卷在线动态扩容

发表于 2018-06-20 | 更新于 2019-05-01 | 分类于 Linux
本文字数: 8.2k | 阅读时长 ≈ 7 分钟

环境:centos6

将需要扩容硬盘插入指定服务器
[root@huidu_hx_127_88 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL

Adapter #0

Enclosure Device ID: 32
Slot Number: 2
Enclosure position: 1
Device Id: 2
WWN: 5000C50084869FF8
Sequence Number: 1
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 931.512 GB [0x74706db0 Sectors]
Non Coerced Size: 931.012 GB [0x74606db0 Sectors]
Coerced Size: 931.0 GB [0x74600000 Sectors]
Sector Size: 0
Firmware state: Unconfigured(good), Spun Up
Device Firmware Level: AS0B
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c50084869ff9
SAS Address(1): 0x0
Connected Port Number: 2(path0)
Inquiry Data: SEAGATE ST91000640SS AS0B9XG9K9R0
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :17C (62.60 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No

Enclosure Device ID: 32
Slot Number: 3
Enclosure position: 1
Device Id: 3
WWN: 5000C50084857234
Sequence Number: 1
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 931.512 GB [0x74706db0 Sectors]
Non Coerced Size: 931.012 GB [0x74606db0 Sectors]
Coerced Size: 931.0 GB [0x74600000 Sectors]
Sector Size: 0
Firmware state: Unconfigured(good), Spun Up
Device Firmware Level: AS0B
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c50084857235
SAS Address(1): 0x0
Connected Port Number: 3(path0)
Inquiry Data: SEAGATE ST91000640SS AS0B9XG9KD2Q
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :18C (64.40 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No
阅读全文 »

/etc/resolv.conf配置详解

发表于 2018-06-20 | 更新于 2019-05-05
本文字数: 577 | 阅读时长 ≈ 1 分钟
options timeout:n attempts:n

timeout是指连接某个dns server有问题造成堵塞的超时值,单位是秒;
attempts是指解析域名尝试的次数。

根据内核源码/usr/include/resolv.h中的定义:
# define MAXNS 3 /* max # name servers we’ll track */
# define MAXDNSRCH 6 /* max # domains in search path */
# define RES_TIMEOUT 5 /* min. seconds between retries */
# define RES_DFLRETRY 2 /* Default #/tries. */

可以知道:

  • resolv.conf里的nameserver只能有3个,多写的无效;
  • timeout默认是5秒;
  • attempts默认是2次,也就是解析域名尝试的次数
    • 此值必须大于等于1
    • 这里的“次数”如果是1,指从nameserver1到nameserver3都做了尝试(碰巧都失败)。并非指某个nameserver的尝试次数。

Harbor部署

发表于 2018-06-14 | 更新于 2019-05-01 | 分类于 Docker
本文字数: 12k | 阅读时长 ≈ 11 分钟
服务器信息
Model:Dell PowerEdge R730xd
CPU:2*Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
MEM:32G
DISK:2*300G(RAID 1) + 16*6T(RAID 5 mount /opt/tuniu/docker)
NIC:2*10G
OS:CentOS Linux release 7.2.1511 (Core)
IP:10.40.191.176
DNS:tcr.tuniu.io(流量较大,直接解析至Harbor服务器,不经过负载均衡)
阅读全文 »
1…789…14
Jianhu Yong

Jianhu Yong

It's better when it's simple
67 日志
18 分类
23 标签
RSS
GitHub E-Mail
Links
  • wiki
  • adsl
  • router
  • nas
  • cobbler
  • mail
  • mirror
  • zabbix
© 2019 Jianhu Yong | 346k | 5:15
0%