分类: CentOS

  • CentOS7支持exFAT格式

    yum install ./nux-dextop-release-0-5.el7.nux.noarch.rpm

    yum install exfat-utils fuse-exfat

  • Shannon PCle Flash SSD CentOS7

    下载驱动http://www.shannon-sys.com/driver

    make
    make modules_install
    modprode shannon 挂载驱动

    fdisk -l

    磁盘 /dev/dfa:1600.0 GB, 1600000098304 字节,3125000192 个扇区
    Units = 扇区 of 1 * 512 = 512 bytes
    扇区大小(逻辑/物理):512 字节 / 4096 字节
    I/O 大小(最小/最佳):4096 字节 / 65536 字节
    磁盘标签类型:dos
    磁盘标识符:0x07f5083b

    设备 Boot Start End Blocks Id System
    /dev/dfa1 * 4096 3124998143 1562497024 7 HPFS/NTFS/exFAT

    shannon-status -a可以查看磁盘状态

    Found Shannon PCIE Flash card /dev/scta:

    Basic Information:
    Control Device Node: /dev/scta
    Driver Mode: Block
    Block Device Node: /dev/dfa
    Device State: Attached
    Access Mode: ReadWrite
    Product Model: Direct-IO G2i
    Serial Number: SA14814K734031
    Part Number: TH58TEG9DDJBA89
    UDID: 1CB00275-1CB00030-04114814-4B734031
    PCI VendorID: 1CB0
    PCI DeviceID: 0275
    PCI Bus Address: a2:00:0
    PCI Link Speed: pcie 2.0 x 4
    Firmware Version: 3.2
    Firmware Build: 4a97771b
    Driver Version: 3.4.3.1
    FPGA Reconfig Support: Yes
    Logical Sector: 512
    Physical Sector: 4096
    Disk Capacity: 1600.00 GB
    Physical Capacity: 2144.37 GB
    Overprovision: 25.39%
    Max Write Bandwidth: 0 MB/s
    Atomic Write: Disabled
    Prioritize Write: Disabled

    Work Status:
    Controller Temperature: -273 degC, Max 65 degC
    Board Temperature: 38 degC, Max 57 degC
    Flash Temperature: 46 degC, Max 69 degC
    Internal Voltage: 0 mV, Max 1031 mV
    Auxiliary Voltage: 0 mV, Max 1848 mV
    Power Cycles: 411
    Power On Time: 18101 hours 3 minutes
    Dynamic Bad Blocks: 0
    Media Status: Healthy
    SEU Flag: Normal

    Lifetime Data Volumes:
    Host Write Data: 64591.55 GB
    Host Read Data: 196121.04 GB
    Total Write Data: 81471.17 GB
    Lifetime Write Amplifier: 1.260
    Estimated Life Left: 99.440%

    Realtime IO Statistics:
    Read Bandwidth: 0.001 MB/s
    Read IOPS: 0.000 K
    Avg Read Latency: 0.376 ms
    Write Bandwidth: 0.000 MB/s
    Write IOPS: 0.000 K
    Avg Write Latency: 0.000 ms
    GC Bandwidth: 0.000 MB/s
    WL Bandwidth: 0.000 MB/s
    Total Write Bandwidth: 0.000 MB/s
    Write Amplifier: 1.000
    Buffer Write Percentage: 0%

    Totally found 1 Direct-IO PCIe Flash card on this system.

    【硬盘检测工具】smartmontools

    smartctl –info /dev/sda
    smartctl 7.0 2018-12-30 r4883 [x86_64-linux-3.10.0-1127.el7.x86_64] (local build)
    Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

    === START OF INFORMATION SECTION ===
    Model Family: Marvell based SanDisk SSDs
    Device Model: SanDisk Ultra II 240GB
    Serial Number: 161814800911
    LU WWN Device Id: 5 001b44 8b44ba948
    Firmware Version: X41320RL
    User Capacity: 240,057,409,536 bytes [240 GB]
    Sector Size: 512 bytes logical/physical
    Rotation Rate: Solid State Device
    Form Factor: 2.5 inches
    Device is: In smartctl database [for details use: -P show]
    ATA Version is: ACS-2 T13/2015-D revision 3
    SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
    Local Time is: Sun Mar 27 16:03:07 2022 CST
    SMART support is: Available – device has SMART capability.
    SMART support is: Enabled

    参考资料:

    https://blog.csdn.net/weixin_34331102/article/details/90685058?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~aggregatepage~first_rank_ecpm_v1~rank_v31_ecpm-1-90685058.pc_agg_new_rank&utm_term=centos7+pci+ssd+%E9%A9%B1%E5%8A%A8&spm=1000.2123.3001.4430

  • CentOS7 编译环境准备

    yum install -y gcc gcc-c++ cmake ncurses ncurses-devel bison

  • CentOS7图形界面与命令行界面切换

    在图形界面使用 ctrl+alt+F2切换到dos界面

    dos界面 ctrl+alt+F2切换回图形界面

    在命令上 输入 init 3 命令 切换到dos界面

    输入 init 5命令 切换到图形界面

    如果想系统默认以某种方式启动, 使用systemd创建符号链接指向默认运行级别。

    修改方法为:

    1.首先删除已经存在的符号链接:

    rm /etc/systemd/system/default.target

    2.默认级别转换为3(文本模式):

    ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
    或者默认级别转换为5(图形模式):

    ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

    3.重启:

    reboot

     

    centos7以下的版本

    以管理员权限编辑/etc/inittab
    把
    id:5:initdefault:
    改为
    id:3:initdefault:
    就ok。
  • CentOS7 rc.loal执行

    不会开机执行的开机启动文件 /etc/rc.local

    检查/etc/rc.local文件内容

    #!/bin/bash
    # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
    #
    # It is highly advisable to create own systemd services or udev rules
    # to run scripts during boot instead of using this file.
    #
    # In constrast to previous versions due to parallel execution during boot
    # this script will NOT be run after all other services.
    #
    # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
    # that this script will be executed during boot.
    必须执行“chmod +x /etc/rc.d/rc.local”来确保确保这个脚本在引导时执行。
  • CentOS7修改启动的level

    CentOS7里面 修改/etc/inittab 已经没用了

    systemd uses ‘targets’ instead of runlevels.

    systemctl set-default multi-user.target      设定默认为字符界面,也就是3
    systemctl set-default graphical.target        图形界面   5