精华内容
下载资源
问答
  • 2018-07-17 19:10:59

    移动硬盘插入Mac之后,没有正常退出直接拔出来,插入W7没有显示出硬盘设备。

    1、在W7设备和打印机上能够看到硬盘设备。

    2、计算机—管理—存储—磁盘管理 在此处看到状态良好,但是没有卷名和文件系统没有显示
    将移动硬盘从W7上安全退出,插入Mac中,打开Mac终端

    输入diskutil list

    Mac终端显示:

    /dev/disk0 (internal):

    : TYPE NAME SIZE IDENTIFIER

    0: GUID_partition_scheme *GB disk0

    1: EFI EFI 314.6 MB disk0s1

    2: Apple_APFS Container disk1 *GB disk0s2
    /dev/disk1 (synthesized):

    : TYPE NAME SIZE IDENTIFIER

    0: APFS Container Scheme - +250.7 GB disk1

    Physical Store disk0s2

    1: APFS Volume Macintosh HD 92.6 GB disk1s1

    2: APFS Volume Preboot 22.9 MB disk1s2

    3: APFS Volume Recovery 517.8 MB disk1s3

    4: APFS Volume VM 1.1 GB disk1s4
    /dev/disk2 (external, physical):

    : TYPE NAME SIZE IDENTIFIER

    0: GUID_partition_scheme *2.0 TB disk2

    1: EFI EFI 209.7 MB disk2s1

    2: Apple_HFS 2.0 TB disk2s2
    然后输入sudo diskutil mount /dev/disk2

    提示:

    Volume on disk2 failed to mount; if it has a partitioning scheme, use “diskutil mountDisk”

    If the volume is damaged, try the “readOnly” option

    输入sudo diskutil mountDisk /dev/disk2

    提示:

    One or more volume(s) failed to mount
    找到Mac系统自带的磁盘工具,找到自己的移动磁盘,选择抹掉,抹掉是选择格式exFAT(格式化后,整个硬盘的数据丢失),确认之后等待格式化完成
    然后在终端输入diskutil list

    /dev/disk0 (internal):

    : TYPE NAME SIZE IDENTIFIER

    0: GUID_partition_scheme ** GB disk0

    1: EFI EFI 314.6 MB disk0s1

    2: Apple_APFS Container disk1 ** GB disk0s2
    /dev/disk1 (synthesized):

    : TYPE NAME SIZE IDENTIFIER

    0: APFS Container Scheme - +250.7 GB disk1

    Physical Store disk0s2

    1: APFS Volume Macintosh HD 92.6 GB disk1s1

    2: APFS Volume Preboot 22.9 MB disk1s2

    3: APFS Volume Recovery 517.8 MB disk1s3

    4: APFS Volume VM 1.1 GB disk1s4
    /dev/disk2 (external, physical):

    : TYPE NAME SIZE IDENTIFIER

    0: GUID_partition_scheme *2.0 TB disk2

    1: EFI EFI 209.7 MB disk2s1

    2: Microsoft Basic Data UNTITLED 2.0 TB disk2s2

    然后输入sudo diskutil mountDisk /dev/disk2,即可在Mac下拔出移动硬盘,同时W7能够识别到移动硬盘
    *只有exFAT格式是macOS和W7都能识别

    更多相关内容
  • rule_files: # - "first_rules.yml" # - "second_rules.yml" # A scrape configuration containing exactly one endpoint to scrape: # Here it's Prometheus itself. scrape_configs: # The job name is added as ...

    简介

    官方链接 : https://prometheus.io/docs/introduction/overview/

    Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. Since its inception in 2012, many companies and organizations have adopted Prometheus, and the project has a very active developer and user community. It is now a standalone open source project and maintained independently of any company. To emphasize this, and to clarify the project’s governance structure, Prometheus joined the Cloud Native Computing Foundation in 2016 as the second hosted project, after Kubernetes.

    Prometheus collects and stores its metrics as time series data, i.e. metrics information is stored with the timestamp at which it was recorded, alongside optional key-value pairs called labels.

    For more elaborate overviews of Prometheus, see the resources linked from the media section.

    特征

    Prometheus’s main features are:

    • a multi-dimensional data model with time series data identified by metric name and key/value pairs
    • PromQL, a flexible query language to leverage this dimensionality
    • no reliance on distributed storage; single server nodes are autonomous
    • time series collection happens via a pull model over HTTP
    • pushing time series is supported via an intermediary gateway
    • targets are discovered via service discovery or static configuration
    • multiple modes of graphing and dashboarding support

    组件

    The Prometheus ecosystem consists of multiple components, many of which are optional:

    • the main Prometheus server which scrapes and stores time series data
    • client libraries for instrumenting application code a push gateway
    • for supporting short-lived jobs special-purpose exporters for
    • services like HAProxy, StatsD, Graphite, etc. an alertmanager to
    • handle alerts various support tools

    架构

    在这里插入图片描述

    安装方式选择

    二进制安装

    Prometheus主要是由Go语言编写的,可以在官网下载 https://prometheus.io/download/ 二进制文件,直接进行启动安装

    ./prometheus --config.file=prometheus.yml
    

    prometheus.yml文件的基本配置如下:

    global:
      scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
      evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
      # scrape_timeout is set to the global default (10s).
    
    # Alertmanager configuration
    alerting:
      alertmanagers:
      - static_configs:
        - targets:
          # - alertmanager:9093
    
    # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
    rule_files:
      # - "first_rules.yml"
      # - "second_rules.yml"
    
    # A scrape configuration containing exactly one endpoint to scrape:
    # Here it's Prometheus itself.
    scrape_configs:
      # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
      - job_name: 'prometheus'
    
        # metrics_path defaults to '/metrics'
        # scheme defaults to 'http'.
    
        static_configs:
        - targets: ['localhost:9090']
    

    通过docker方式安装

    登陆docker hub,查找Prometheus
    查找一个docker镜像即可,比如
    https://hub.docker.com/layers/bitnami/prometheus/2-debian-10/images/sha256-ad4ad5965bc993979299fa366b408bd07366404f3a1d3915dc6e3eab44c42a64?context=explore

    这里关注的是Prometheus的镜像地址
    以及镜像启动的命令
    其目的是填写k8s里container配置文件参数

    在这里插入图片描述

    编写Prometheus k8s yaml文件

    deployment

    apiVersion: apps/v1
    kind: Deployment # 这里决定使用deployment来部署,所以需要考虑到pod被delete后,后端储存还能用,因此使用了pv
    metadata:
      name: prometheus-deploy
      namespace: prometheus-ns # 单独使用了命名空间,所以还需要有namespace的声明
    spec:
      selector:
        matchLabels:
          app: prometheus
      template:
        metadata:
          labels:
            app: prometheus
        spec:
          securityContext:
            runAsUser: 0 # 由于prometheus的docker启动user id是1001,在访问nfs里会权限不够,这里使用root用户来运行
          serviceAccountName: prometheus-sa # prometheus需要访问k8s里的相关信息,因此需要账号控制策略
          containers:
          - name: prometheus-container
            image: docker.io/bitnami/prometheus:2-debian-10
            imagePullPolicy: IfNotPresent
            args:
            - "--config.file=/prometheus/conf/prometheus.yml"  # 通过configmap资源对象储存
            - "--web.console.libraries=/opt/bitnami/prometheus/conf/console_libraries"  # 暂不修改,使用docker镜像里的配置
            - "--web.console.templates=/opt/bitnami/prometheus/conf/consoles"  # 暂不修改,使用docker镜像里的配置
            - "--storage.tsdb.path=/prometheus/data/"  # 通过声明pvc来储存,来做持久化
            - "--storage.tsdb.retention=24h"  # 保留多长时间的时序日志
            - "--web.enable-admin-api"  # 可以开启对admin api来访问,直接操作
            - "--web.enable-lifecycle"  # 表示开启热更新
            resources:
              limits:
                memory: "128Mi"
                cpu: "500m"
            ports:
            - containerPort: 9090
              name: app-http-port
            volumeMounts:
            - mountPath: "/prometheus/data/"  # 目录持久化
              subPath: sub1
              name: data
            - mountPath: "/prometheus/conf/"
              name: config
          volumes:
          - name: data
            persistentVolumeClaim:
              claimName: prometheus-pvc
          - name: config
            configMap:
              name: prometheus-cm  # 通过configmap来储存prometheus.yml文件
    

    Namespace

    apiVersion: v1
    kind: Namespace
    metadata:
      name: prometheus-ns
    

    PersistentVolume

    apiVersion: v1
    kind: PersistentVolume
    metadata:
      name: prometheus-pv  # 来给pvc干活用
    spec:
      capacity:
        storage: 10Gi
      accessModes:
        - ReadWriteOnce
      persistentVolumeReclaimPolicy: Recycle
      nfs:
        path: /nfsData/prometheus
        server: 192.168.56.203  # 部署的nfs储存服务
    

    PersistentVolumeClaim

    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: prometheus-pvc  # 名字和deployment中使用的保持一致
      namespace: prometheus-ns
    spec:  # 字段和pv中保持一致
      resources:
        requests:
          storage: 10Gi  # 不能大于pv中的值
      accessModes:
        - ReadWriteOnce
    

    ConfigMap

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: prometheus-cm  # 通过configmap来储存prometheus.yml文件
      namespace: prometheus-ns
    data:
      prometheus.yml: |
        global:
          scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
          evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
          # scrape_timeout is set to the global default (10s).
    
        # Alertmanager configuration
        alerting:
          alertmanagers:
            - static_configs:
                - targets:
                  # - alertmanager:9093
    
        # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
        rule_files:
          # - "first_rules.yml"
          # - "second_rules.yml"
    
        # A scrape configuration containing exactly one endpoint to scrape:
        # Here it's Prometheus itself.
        scrape_configs:
          # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
          - job_name: "prometheus"
    
            # metrics_path defaults to '/metrics'
            # scheme defaults to 'http'.
    
            static_configs:
              - targets: ["localhost:9090"]
    

    ServiceAccount

    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: prometheus-sa
      namespace: prometheus-ns
    

    ClusterRole

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      name: prometheus-cr  # 需要访问到其它namespace下的内容
    rules: # 根据使用的情况,进行适度修改
    - apiGroups: [""]
      resources:
        - nodes
        - services
        - endpoints
        - pods
        - nodes/proxy
        - configmaps
      verbs: ["get", "list", "watch"]
    - nonResourceURLs: ["/metrics"]  # 对非资源型进行操作
      verbs: ["get"]
    

    ClusterRoleBinding

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: prometheus-crb  # 将账号和集群绑定
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: prometheus-cr
    subjects:
      - kind: ServiceAccount
        name: prometheus-sa
        namespace: prometheus-ns
    

    Service

    apiVersion: v1
    kind: Service  # 也可以配置Ingress来进行访问
    metadata:
      name: prometheus-svc
      namespace: prometheus-ns  # 保持在同一个名称空间内,不然会出现无法访问的现象
    spec:
      selector:
        app: prometheus
      type: NodePort
      ports:
      - name: web
        port: 9090
        targetPort: app-http-port
    

    部署到环境

    准备声明文件

    可以将准备好的yaml文件分别执行部署

    也可以将它们放到同一个文件中执行,如prometheus-app.yaml文件

    apiVersion: v1
    kind: Namespace
    metadata:
      name: prometheus-ns
    
    ---
    apiVersion: v1
    kind: PersistentVolume
    metadata:
      name: prometheus-pv
    spec:
      capacity:
        storage: 10Gi
      accessModes:
        - ReadWriteOnce
      persistentVolumeReclaimPolicy: Recycle
      nfs:
        path: /nfsData/prometheus
        server: 192.168.56.203
    
    ---
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: prometheus-pvc
      namespace: prometheus-ns
    spec:
      resources:
        requests:
          storage: 10Gi
      accessModes:
        - ReadWriteOnce
    
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: prometheus-deploy
      namespace: prometheus-ns
    spec:
      selector:
        matchLabels:
          app: prometheus
      template:
        metadata:
          labels:
            app: prometheus
        spec:
          securityContext:
            runAsUser: 0
          serviceAccountName: prometheus-sa
          containers:
          - name: prometheus-container
            image: docker.io/bitnami/prometheus:2-debian-10
            imagePullPolicy: IfNotPresent
            args:
            - "--config.file=/prometheus/conf/prometheus.yml"
            - "--web.console.libraries=/opt/bitnami/prometheus/conf/console_libraries"
            - "--web.console.templates=/opt/bitnami/prometheus/conf/consoles"
            - "--storage.tsdb.path=/prometheus/data/"
            - "--storage.tsdb.retention=24h"
            - "--web.enable-admin-api"
            - "--web.enable-lifecycle"
            resources:
              limits:
                memory: "128Mi"
                cpu: "500m"
            ports:
            - containerPort: 9090
              name: app-http-port
            volumeMounts:
            - mountPath: "/prometheus/data/"
              subPath: sub1
              name: data
            - mountPath: "/prometheus/conf/"
              name: config
          volumes:
          - name: data
            persistentVolumeClaim:
              claimName: prometheus-pvc
          - name: config
            configMap:
              name: prometheus-cm
    
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: prometheus-svc
      namespace: prometheus-ns
    spec:
      selector:
        app: prometheus
      type: NodePort
      ports:
      - name: web
        port: 9090
        targetPort: app-http-port
    
    ---
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: prometheus-cm
      namespace: prometheus-ns
    data:
      prometheus.yml: |
        global:
          scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
          evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
          # scrape_timeout is set to the global default (10s).
    
        # Alertmanager configuration
        alerting:
          alertmanagers:
            - static_configs:
                - targets:
                  # - alertmanager:9093
    
        # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
        rule_files:
          # - "first_rules.yml"
          # - "second_rules.yml"
    
        # A scrape configuration containing exactly one endpoint to scrape:
        # Here it's Prometheus itself.
        scrape_configs:
          # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
          - job_name: "prometheus"
    
            # metrics_path defaults to '/metrics'
            # scheme defaults to 'http'.
    
            static_configs:
              - targets: ["localhost:9090"]
    
    
    ---
    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: prometheus-sa
      namespace: prometheus-ns
    
    ---
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      name: prometheus-cr
    rules:
    - apiGroups: [""]
      resources:
        - nodes
        - services
        - endpoints
        - pods
        - nodes/proxy
        - configmaps
      verbs: ["get", "list", "watch"]
    - nonResourceURLs: ["/metrics"]
      verbs: ["get"]
    
    ---
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: prometheus-crb
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: prometheus-cr
    subjects:
      - kind: ServiceAccount
        name: prometheus-sa
        namespace: prometheus-ns
    

    执行部署命令

    kubectl create -f prometheus-app.yaml
    

    在这里插入图片描述
    可以看到已成功部署
    在这里插入图片描述

    测试访问

    通过nodeip+port的方式访问

    可以看到能成功访问
    在这里插入图片描述

    展开全文
  • linux ubuntu mount success

    千次阅读 2017-08-07 10:17:12
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t cifs -o username=Administrator,password=411023 //192.168.1.100/share /home/wangshuai/win7_F errors: Options: ro (read-only mount), remove_hi


    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t cifs -o username=Administrator,password=411023 //192.168.1.100/share /home/wangshuai/win7_F



    errors:


    Options:  ro (read-only mount), remove_hiberfile, uid=, gid=,
              umask=, fmask=, dmask=, streams_interface=, syncio.
              Please see the details in the manual (type: man ntfs-3g).

    Example: ntfs-3g /dev/sda1 /mnt/windows

    Ntfs-3g news, support and information:  http://ntfs-3g.org
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t ntfs-3g -o username=Administraator,password=411023 //192.168.1.100//share /home/wangshuai/win7_F
    ntfs-3g: Failed to access volume '//192.168.1.100//share': No such file or directory

    ntfs-3g 2010.8.8 external FUSE 28 - Third Generation NTFS Driver
    Configuration type 1, XATTRS are on, POSIX ACLS are off

    Copyright (C) 2005-2007 Yura Pakhuchiy
    Copyright (C) 2006-2009 Szabolcs Szakacsits
    Copyright (C) 2007-2010 Jean-Pierre Andre
    Copyright (C) 2009 Erik Larsson

    Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>

    Options:  ro (read-only mount), remove_hiberfile, uid=, gid=,
              umask=, fmask=, dmask=, streams_interface=, syncio.
              Please see the details in the manual (type: man ntfs-3g).

    Example: ntfs-3g /dev/sda1 /mnt/windows

    Ntfs-3g news, support and information:  http://ntfs-3g.org
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t -cifx -o username=Administraator,password=411023 //192.168.1.100//share /home/wangshuai/win7_F
    mount: unknown filesystem type '-cifx'
    wangshuai@wangshuai-virtual-machine:~$ mount
    /dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    none on /sys type sysfs (rw,noexec,nosuid,nodev)
    fusectl on /sys/fs/fuse/connections type fusectl (rw)
    none on /sys/kernel/debug type debugfs (rw)
    none on /sys/kernel/security type securityfs (rw)
    none on /dev type devtmpfs (rw,mode=0755)
    none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
    none on /dev/shm type tmpfs (rw,nosuid,nodev)
    none on /var/run type tmpfs (rw,nosuid,mode=0755)
    none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
    binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
    gvfs-fuse-daemon on /home/wangshuai/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=wangshuai)
    /dev/sr0 on /media/Ubuntu 10.10 i386 type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500)
    wangshuai@wangshuai-virtual-machine:~$ mount -- help
    mount: can't find help in /etc/fstab or /etc/mtab
    wangshuai@wangshuai-virtual-machine:~$ mount --help
    Usage: mount -V                 : print version
           mount -h                 : print this help
           mount                    : list mounted filesystems
           mount -l                 : idem, including volume labels
    So far the informational part. Next the mounting.
    The command is `mount [-t fstype] something somewhere'.
    Details found in /etc/fstab may be omitted.
           mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
           mount device             : mount device at the known place
           mount directory          : mount known device here
           mount -t type dev dir    : ordinary mount command
    Note that one does not really mount a device, one mounts
    a filesystem (of the given type) found on the device.
    One can also mount an already visible directory tree elsewhere:
           mount --bind olddir newdir
    or move a subtree:
           mount --move olddir newdir
    One can change the type of mount containing the directory dir:
           mount --make-shared dir
           mount --make-slave dir
           mount --make-private dir
           mount --make-unbindable dir
    One can change the type of all the mounts in a mount subtree
    containing the directory dir:
           mount --make-rshared dir
           mount --make-rslave dir
           mount --make-rprivate dir
           mount --make-runbindable dir
    A device can be given by name, say /dev/hda1 or /dev/cdrom,
    or by label, using  -L label  or by uuid, using  -U uuid .
    Other options: [-nfFrsvw] [-o options] [-p passwdfd].
    For many more details, say  man 8 mount .
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t -smbfs -o username=Administraator,password=411023 //192.168.1.100//share /home/wangshuai/win7_F
    mount: unknown filesystem type '-smbfs'
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t smbfs -o username=Administraator,password=411023 //192.168.1.100//share /home/wangshuai/win7_F
    mount: wrong fs type, bad option, bad superblock on //192.168.1.100//share,
           missing codepage or helper program, or other error
           (for several filesystems (e.g. nfs, cifs) you might
           need a /sbin/mount.<type> helper program)
           In some cases useful info is found in syslog - try
           dmesg | tail  or so

    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t smbntfs -o username=Administraator,password=411023 //192.168.1.100//share /home/wangshuai/win7_F
    mount: unknown filesystem type 'smbntfs'
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t nfs -o username=Administraator,password=411023 //192.168.1.100//share /home/wangshuai/win7_F
    mount: wrong fs type, bad option, bad superblock on //192.168.1.100//share,
           missing codepage or helper program, or other error
           (for several filesystems (e.g. nfs, cifs) you might
           need a /sbin/mount.<type> helper program)
           In some cases useful info is found in syslog - try
           dmesg | tail  or so

    wangshuai@wangshuai-virtual-machine:~$ mount.ntf
    No command 'mount.ntf' found, did you mean:
    Command 'mount.ntfs' from package 'ntfs-3g' (main)
    mount.ntf: command not found
    wangshuai@wangshuai-virtual-machine:~$ mount.nfs
    The program 'mount.nfs' is currently not installed.  You can install it by typing:
    sudo apt-get install nfs-common
    wangshuai@wangshuai-virtual-machine:~$ sudo apt-get install nfs-common
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    Package nfs-common is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package 'nfs-common' has no installation candidate
    wangshuai@wangshuai-virtual-machine:~$ sudo apt-get install nfs
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    E: Unable to locate package nfs
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -F nfs -o username=Administraator,password=411023 //192.168.1.100//share /home/wangshuai/win7_F
    Usage: mount -V                 : print version
           mount -h                 : print this help
           mount                    : list mounted filesystems
           mount -l                 : idem, including volume labels
    So far the informational part. Next the mounting.
    The command is `mount [-t fstype] something somewhere'.
    Details found in /etc/fstab may be omitted.
           mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
           mount device             : mount device at the known place
           mount directory          : mount known device here
           mount -t type dev dir    : ordinary mount command
    Note that one does not really mount a device, one mounts
    a filesystem (of the given type) found on the device.
    One can also mount an already visible directory tree elsewhere:
           mount --bind olddir newdir
    or move a subtree:
           mount --move olddir newdir
    One can change the type of mount containing the directory dir:
           mount --make-shared dir
           mount --make-slave dir
           mount --make-private dir
           mount --make-unbindable dir
    One can change the type of all the mounts in a mount subtree
    containing the directory dir:
           mount --make-rshared dir
           mount --make-rslave dir
           mount --make-rprivate dir
           mount --make-runbindable dir
    A device can be given by name, say /dev/hda1 or /dev/cdrom,
    or by label, using  -L label  or by uuid, using  -U uuid .
    Other options: [-nfFrsvw] [-o options] [-p passwdfd].
    For many more details, say  man 8 mount .
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t nfs-3g -o username=Administraator,password=411023 //192.168.1.100//share /home/wangshuai/win7_F
    mount: unknown filesystem type 'nfs-3g'
    wangshuai@wangshuai-virtual-machine:~$ wget
    wget: missing URL
    Usage: wget [OPTION]... [URL]...

    Try `wget --help' for more options.
    wangshuai@wangshuai-virtual-machine:~$ wget http://www.ntfs-3g.org/ntfs-3g-1.11220.tgz
    --2011-04-05 21:01:54--  http://www.ntfs-3g.org/ntfs-3g-1.11220.tgz
    Resolving www.ntfs-3g.org... 217.112.248.228
    Connecting to www.ntfs-3g.org|217.112.248.228|:80... connected.
    HTTP request sent, awaiting response... 404 Not Found
    2011-04-05 21:01:56 ERROR 404: Not Found.

    wangshuai@wangshuai-virtual-machine:~$ apt-get install ntfs-3g
    E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
    E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
    wangshuai@wangshuai-virtual-machine:~$ sudo apt-get install ntfs-3g
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    ntfs-3g is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t ntfs-3g -o username=Administraator,password=411023 //192.168.1.100//share /home/wangshuai/win7_F
    ntfs-3g: Failed to access volume '//192.168.1.100//share': No such file or directory

    ntfs-3g 2010.8.8 external FUSE 28 - Third Generation NTFS Driver
    Configuration type 1, XATTRS are on, POSIX ACLS are off

    Copyright (C) 2005-2007 Yura Pakhuchiy
    Copyright (C) 2006-2009 Szabolcs Szakacsits
    Copyright (C) 2007-2010 Jean-Pierre Andre
    Copyright (C) 2009 Erik Larsson

    Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>

    Options:  ro (read-only mount), remove_hiberfile, uid=, gid=,
              umask=, fmask=, dmask=, streams_interface=, syncio.
              Please see the details in the manual (type: man ntfs-3g).

    Example: ntfs-3g /dev/sda1 /mnt/windows

    Ntfs-3g news, support and information:  http://ntfs-3g.org
    wangshuai@wangshuai-virtual-machine:~$ sudo ntfs-3g -o username=Administraator,password=411023 //192.168.1.100//share /home/wangshuai/win7_F
    ntfs-3g: Failed to access volume '//192.168.1.100//share': No such file or directory

    ntfs-3g 2010.8.8 external FUSE 28 - Third Generation NTFS Driver
    Configuration type 1, XATTRS are on, POSIX ACLS are off

    Copyright (C) 2005-2007 Yura Pakhuchiy
    Copyright (C) 2006-2009 Szabolcs Szakacsits
    Copyright (C) 2007-2010 Jean-Pierre Andre
    Copyright (C) 2009 Erik Larsson

    Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>

    Options:  ro (read-only mount), remove_hiberfile, uid=, gid=,
              umask=, fmask=, dmask=, streams_interface=, syncio.
              Please see the details in the manual (type: man ntfs-3g).

    Example: ntfs-3g /dev/sda1 /mnt/windows

    Ntfs-3g news, support and information:  http://ntfs-3g.org
    wangshuai@wangshuai-virtual-machine:~$ sudo ntfs-3g -o username=Administraator,password=411023 //192.168.1.100/share /home/wangshuai/win7_F
    ntfs-3g: Failed to access volume '//192.168.1.100/share': No such file or directory

    ntfs-3g 2010.8.8 external FUSE 28 - Third Generation NTFS Driver
    Configuration type 1, XATTRS are on, POSIX ACLS are off

    Copyright (C) 2005-2007 Yura Pakhuchiy
    Copyright (C) 2006-2009 Szabolcs Szakacsits
    Copyright (C) 2007-2010 Jean-Pierre Andre
    Copyright (C) 2009 Erik Larsson

    Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>

    Options:  ro (read-only mount), remove_hiberfile, uid=, gid=,
              umask=, fmask=, dmask=, streams_interface=, syncio.
              Please see the details in the manual (type: man ntfs-3g).

    Example: ntfs-3g /dev/sda1 /mnt/windows

    Ntfs-3g news, support and information:  http://ntfs-3g.org
    wangshuai@wangshuai-virtual-machine:~$ sudo ntfs-3g -o username=Administraator,password=411023 192.168.1.100:/share /home/wangshuai/win7_F
    ntfs-3g: Failed to access volume '192.168.1.100:/share': No such file or directory

    ntfs-3g 2010.8.8 external FUSE 28 - Third Generation NTFS Driver
    Configuration type 1, XATTRS are on, POSIX ACLS are off

    Copyright (C) 2005-2007 Yura Pakhuchiy
    Copyright (C) 2006-2009 Szabolcs Szakacsits
    Copyright (C) 2007-2010 Jean-Pierre Andre
    Copyright (C) 2009 Erik Larsson

    Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>

    Options:  ro (read-only mount), remove_hiberfile, uid=, gid=,
              umask=, fmask=, dmask=, streams_interface=, syncio.
              Please see the details in the manual (type: man ntfs-3g).

    Example: ntfs-3g /dev/sda1 /mnt/windows

    Ntfs-3g news, support and information:  http://ntfs-3g.org
    wangshuai@wangshuai-virtual-machine:~$ sudo smbmount -t  ntfs-3g -o username=Administraator,password=411023 //192.168.1.100/share /home/wangshuai/win7_F
    sudo: smbmount: command not found
    wangshuai@wangshuai-virtual-machine:~$ smbmount
    The program 'smbmount' is currently not installed.  You can install it by typing:
    sudo apt-get install smbfs
    wangshuai@wangshuai-virtual-machine:~$ smbfs
    smbfs: command not found
    wangshuai@wangshuai-virtual-machine:~$ sudo apt-get install smbfs
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    E: Unable to locate package smbfs
    wangshuai@wangshuai-virtual-machine:~$ smbmount
    The program 'smbmount' is currently not installed.  You can install it by typing:
    sudo apt-get install smbfs
    wangshuai@wangshuai-virtual-machine:~$ smbmount
    The program 'smbmount' is currently not installed.  You can install it by typing:
    sudo apt-get install smbfs
    wangshuai@wangshuai-virtual-machine:~$ sudo apt-get install smbfs
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    E: Unable to locate package smbfs
    wangshuai@wangshuai-virtual-machine:~$ smbmount
    The program 'smbmount' is currently not installed.  You can install it by typing:
    sudo apt-get install smbfs
    wangshuai@wangshuai-virtual-machine:~$ sudo apt-get samba
    E: Invalid operation samba
    wangshuai@wangshuai-virtual-machine:~$ sudo apt-get install samba
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    Package samba is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    However the following packages replace it:
      samba-common-bin smbclient samba-common

    E: Package 'samba' has no installation candidate
    wangshuai@wangshuai-virtual-machine:~$ sudo apt-get install samba-common
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    samba-common is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    wangshuai@wangshuai-virtual-machine:~$ sudo apt-get install samba-common-bin
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    samba-common-bin is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    wangshuai@wangshuai-virtual-machine:~$ samba
    The program 'samba' is currently not installed.  You can install it by typing:
    sudo apt-get install samba4
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t cifs -o username=Administraator,password=411023 //192.168.1.100/share /home/wangshuai/win7_F
    mount: block device //192.168.1.100/share is write-protected, mounting read-only
    mount: cannot mount block device //192.168.1.100/share read-only
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t smbfs -o username=Administraator,password=411023 //192.168.1.100/share /home/wangshuai/win7_F
    mount: wrong fs type, bad option, bad superblock on //192.168.1.100/share,
           missing codepage or helper program, or other error
           (for several filesystems (e.g. nfs, cifs) you might
           need a /sbin/mount.<type> helper program)
           In some cases useful info is found in syslog - try
           dmesg | tail  or so

    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t smbfs -o username=Administraator,password=411023 //192.168.1.100/share /home/wangshuai/win7_F
    mount: wrong fs type, bad option, bad superblock on //192.168.1.100/share,
           missing codepage or helper program, or other error
           (for several filesystems (e.g. nfs, cifs) you might
           need a /sbin/mount.<type> helper program)
           In some cases useful info is found in syslog - try
           dmesg | tail  or so

    wangshuai@wangshuai-virtual-machine:~$ ^C
    wangshuai@wangshuai-virtual-machine:~$ sudo apt-get install nfs-common
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    Package nfs-common is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package 'nfs-common' has no installation candidate
    wangshuai@wangshuai-virtual-machine:~$ sudo service portmap status
    portmap: unrecognized service
    wangshuai@wangshuai-virtual-machine:~$ sudo service portmap start
    portmap: unrecognized service
    wangshuai@wangshuai-virtual-machine:~$ sudo smbmnt -t cifs -o username=Administraator,password=411023 //192.168.1.100/share /home/wangshuai/win7_F
    sudo: smbmnt: command not found
    wangshuai@wangshuai-virtual-machine:~$ smbmnt
    smbmnt: command not found
    wangshuai@wangshuai-virtual-machine:~$ smbpasswd
    Old SMB password:
    New SMB password:
    Retype new SMB password:
    Unable to connect to SMB server on machine 127.0.0.1. Error was : NT_STATUS_CONNECTION_REFUSED.
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t smbfs -o username=Administraator,password=411023 //192.168.1.100/share /home/wangshuai/win7_F
    mount: wrong fs type, bad option, bad superblock on //192.168.1.100/share,
           missing codepage or helper program, or other error
           (for several filesystems (e.g. nfs, cifs) you might
           need a /sbin/mount.<type> helper program)
           In some cases useful info is found in syslog - try
           dmesg | tail  or so

    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t smbfs -o codepage=cp936  username=Administraator,password=411023 //192.168.1.100/share /home/wangshuai/win7_F
    Usage: mount -V                 : print version
           mount -h                 : print this help
           mount                    : list mounted filesystems
           mount -l                 : idem, including volume labels
    So far the informational part. Next the mounting.
    The command is `mount [-t fstype] something somewhere'.
    Details found in /etc/fstab may be omitted.
           mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
           mount device             : mount device at the known place
           mount directory          : mount known device here
           mount -t type dev dir    : ordinary mount command
    Note that one does not really mount a device, one mounts
    a filesystem (of the given type) found on the device.
    One can also mount an already visible directory tree elsewhere:
           mount --bind olddir newdir
    or move a subtree:
           mount --move olddir newdir
    One can change the type of mount containing the directory dir:
           mount --make-shared dir
           mount --make-slave dir
           mount --make-private dir
           mount --make-unbindable dir
    One can change the type of all the mounts in a mount subtree
    containing the directory dir:
           mount --make-rshared dir
           mount --make-rslave dir
           mount --make-rprivate dir
           mount --make-runbindable dir
    A device can be given by name, say /dev/hda1 or /dev/cdrom,
    or by label, using  -L label  or by uuid, using  -U uuid .
    Other options: [-nfFrsvw] [-o options] [-p passwdfd].
    For many more details, say  man 8 mount .
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t smbfs -o codepage=cp936  username=Administraator,password=411023 //192.168.1.100/share /home/wangshuai/win7_F
    [sudo] password for wangshuai:
    Usage: mount -V                 : print version
           mount -h                 : print this help
           mount                    : list mounted filesystems
           mount -l                 : idem, including volume labels
    So far the informational part. Next the mounting.
    The command is `mount [-t fstype] something somewhere'.
    Details found in /etc/fstab may be omitted.
           mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
           mount device             : mount device at the known place
           mount directory          : mount known device here
           mount -t type dev dir    : ordinary mount command
    Note that one does not really mount a device, one mounts
    a filesystem (of the given type) found on the device.
    One can also mount an already visible directory tree elsewhere:
           mount --bind olddir newdir
    or move a subtree:
           mount --move olddir newdir
    One can change the type of mount containing the directory dir:
           mount --make-shared dir
           mount --make-slave dir
           mount --make-private dir
           mount --make-unbindable dir
    One can change the type of all the mounts in a mount subtree
    containing the directory dir:
           mount --make-rshared dir
           mount --make-rslave dir
           mount --make-rprivate dir
           mount --make-runbindable dir
    A device can be given by name, say /dev/hda1 or /dev/cdrom,
    or by label, using  -L label  or by uuid, using  -U uuid .
    Other options: [-nfFrsvw] [-o options] [-p passwdfd].
    For many more details, say  man 8 mount .
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t smbfs -o codepage=cp936  username=Administrator,password=411023 //192.168.1.100/share /home/wangshuai/win7_F
    Usage: mount -V                 : print version
           mount -h                 : print this help
           mount                    : list mounted filesystems
           mount -l                 : idem, including volume labels
    So far the informational part. Next the mounting.
    The command is `mount [-t fstype] something somewhere'.
    Details found in /etc/fstab may be omitted.
           mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
           mount device             : mount device at the known place
           mount directory          : mount known device here
           mount -t type dev dir    : ordinary mount command
    Note that one does not really mount a device, one mounts
    a filesystem (of the given type) found on the device.
    One can also mount an already visible directory tree elsewhere:
           mount --bind olddir newdir
    or move a subtree:
           mount --move olddir newdir
    One can change the type of mount containing the directory dir:
           mount --make-shared dir
           mount --make-slave dir
           mount --make-private dir
           mount --make-unbindable dir
    One can change the type of all the mounts in a mount subtree
    containing the directory dir:
           mount --make-rshared dir
           mount --make-rslave dir
           mount --make-rprivate dir
           mount --make-runbindable dir
    A device can be given by name, say /dev/hda1 or /dev/cdrom,
    or by label, using  -L label  or by uuid, using  -U uuid .
    Other options: [-nfFrsvw] [-o options] [-p passwdfd].
    For many more details, say  man 8 mount .
    wangshuai@wangshuai-virtual-machine:~$ sudo mount -t smbfs -o username=Administrator,password=411023 //192.168.1.100/share /home/wangshuai/win7_Fmount: wrong fs type, bad option, bad superblock on //192.168.1.100/share,
           missing codepage or helper program, or other error
           (for several filesystems (e.g. nfs, cifs) you might
           need a /sbin/mount.<type> helper program)
           In some cases useful info is found in syslog - try
           dmesg | tail  or so


    展开全文
  • -s, --signal string Signal to send to the container (default "KILL") [root@base ~]# docker container rm --help Usage: docker container rm [OPTIONS] CONTAINER [CONTAINER...] Remove one or more ...

    Docker 常用命令:

    • 从线上仓库搜索指定镜像:
    [root@base ~]# docker search mycat
    
    NAME                             DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
    longhronshens/mycat-docker       mycat-docker                                    6                    [OK]
    mycatisblack/consul-agent        Fork of gliderlabs/consul-agent but with nag…   4                    [OK]
    cuilc/mycat                      oracle jdk8, tomcat, mycat                      3
    fify/mycat                       MyCAT database mid-ware.                        2
    manondidi/mycat                   alibaba mycat 1.6.7.5                          2
    

    • 从线上仓库拉取镜像到本地仓库:
    [root@base ~]# docker pull longhronshens/mycat-docker
    
    Using default tag: latest
    latest: Pulling from longhronshens/mycat-docker
    7b6bb4652a1b: Pull complete
    fb377b2e71cc: Pull complete
    c1c3d373acdd: Pull complete
    c8956cdc65ba: Pull complete
    3188aa6e7ac1: Pull complete
    85d3a3d2accd: Pull complete
    39f6c2431126: Downloading [=================================================> ]  15.59MB/15.68MB
    

    • 列出本地仓库所有镜像:
    [root@base ~]# docker image list -a
    
    REPOSITORY                                              TAG       IMAGE ID       CREATED       SIZE
    sonatype/nexus3                                         latest    589f7296a4a2   5 weeks ago   655MB
    registry.cn-hangzhou.aliyuncs.com/zhengqing/mycat-web   latest    b9d10dcc1d81   2 years ago   602MB
    

    • 从镜像创建容器运行:
    [root@base ~]# docker run --name mycat --net=host --privileged=true --restart=always -d -p 8066:8066 -p 9066:9066 -v /data/mycat/server.xml:/usr/local/mycat/conf/server.xml -v /data/mycat/schema.xml:/usr/local/mycat/conf/schema.xml longhronshens/mycat-docker
    
    
    解析:
    
    docker run 
        # 容器名称,后续操作可使用此名称标识容器
    --name mycat 
        # 容器的网络类型,与 vmware 网络类型选择类似:桥接、NAT、主机
    --net=host 
        # 大约在0.6版,privileged被引入docker。
        # 使用该参数,container内的root拥有真正的root权限。
        # 否则,container内的root只是外部的一个普通用户权限。
        # privileged启动的容器,可以看到很多host上的设备,并且可以执行mount。
        # 甚至允许你在docker容器中启动docker容器
    --privileged=true 
        # 容器异常退出总是重启
    --restart=always 
        # 以后台守护进程运行,关闭终端不会关闭
    -d 
        # MyCat 数据服务端口
    -p 8066:8066 
        # MyCat 管理端口,后续配置 Mycat-Web 时会用到
    -p 9066:9066 
        # 绑定宿主机指定路径文件到容器指定路径文件:MyCat 服务器用户配置
    -v /data/mycat/server.xml:/usr/local/mycat/conf/server.xml 
        # 绑定宿主机指定路径文件到容器指定路径文件:MyCat 逻辑库、逻辑表、分片、主机、主从配置
    -v /data/mycat/schema.xml:/usr/local/mycat/conf/schema.xml 
        # 镜像名称
    longhronshens/mycat-docker
    

    • 列出本地所有容器(包括在运行和停止运行的):
    [root@base ~]# docker container list -a
    
    CONTAINER ID   IMAGE                                                   COMMAND                  CREATED       STATUS       PORTS                                         NAMES
    39105ddd32af   registry.cn-hangzhou.aliyuncs.com/zhengqing/mycat-web   "/opt/start-mycat-we…"   7 hours ago   Up 7 hours   0.0.0.0:28082->8082/tcp, :::28082->8082/tcp   mycat-web
    
    

    • 查看在容器运行日志:
    [root@base ~]# docker logs --help
    
    
    Usage:  docker logs [OPTIONS] CONTAINER
    
    Fetch the logs of a container(获取容器日志)
    
    Options:
          --details        Show extra details provided to logs
      -f, --follow         Follow log output(动态跟踪日志输出)
          --since string   Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)(显示自某时间之后的日志)
      -n, --tail string    Number of lines to show from the end of the logs (default "all")(显示从结尾向前多少行的日志,类似于 Linux 命令 tail -f -n 200)
      -t, --timestamps     Show timestamps (显示时间戳)
          --until string   Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)(显示某一时间戳之前的日志)
    
    
    [root@base ~]# docker logs mycat-web -f -n 5
    
    2022-02-05 11:39:09.589 ERROR jrds.Starter.JMXConnection:705 - [service:jmx:rmi:///jndi/rmi://192.168.42.105:8066/jmxrmi] Communication error with rmi: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: non-JRMP server at remote endpoint]
    2022-02-05 11:39:15.235 INFO org.mycat.web.task.common.TaskManger:46 - 定时任务中的dbName列表:[Mycat_105]
    2022-02-05 11:39:15.236 INFO org.mycat.web.task.common.TaskManger:46 - 定时任务中的dbName列表:[Mycat_105]
    2022-02-05 11:39:15.236 INFO org.mycat.web.task.common.TaskManger:46 - 定时任务中的dbName列表:[Mycat_105]
    2022-02-05 11:40:15.236 INFO org.mycat.web.task.common.TaskManger:46 - 定时任务中的dbName列表:[Mycat_105]
    

    • 停止、启动、重启、删除容器:
    [root@base ~]# docker container stop mycat-web
    mycat-web
    
    [root@base ~]# docker container start mycat-web
    mycat-web
    
    
    
    [root@base ~]# docker container stop --help
    
    Usage:  docker container stop [OPTIONS] CONTAINER [CONTAINER...]
    
    Stop one or more running containers
    
    Options:
      -t, --time int   Seconds to wait for stop before killing it (default 10)
    
    
    
    [root@base ~]# docker container start --help
    
    Usage:  docker container start [OPTIONS] CONTAINER [CONTAINER...]
    
    Start one or more stopped containers
    
    Options:
      -a, --attach               Attach STDOUT/STDERR and forward signals
          --detach-keys string   Override the key sequence for detaching a container
      -i, --interactive          Attach container's STDIN
    
    
    
    [root@base ~]# docker container restart --help
    
    Usage:  docker container restart [OPTIONS] CONTAINER [CONTAINER...]
    
    Restart one or more containers
    
    Options:
      -t, --time int   Seconds to wait for stop before killing the container (default 10)
    
    
    
    [root@base ~]# docker container kill --help
    
    Usage:  docker container kill [OPTIONS] CONTAINER [CONTAINER...]
    
    Kill one or more running containers
    
    Options:
      -s, --signal string   Signal to send to the container (default "KILL")
    
    
    
    [root@base ~]# docker container rm --help
    
    Usage:  docker container rm [OPTIONS] CONTAINER [CONTAINER...]
    
    Remove one or more containers
    
    Options:
      -f, --force     Force the removal of a running container (uses SIGKILL)
      -l, --link      Remove the specified link
      -v, --volumes   Remove anonymous volumes associated with the container
    
    
    

    • 在宿主机和容器间拷贝文件:
    [root@base05 mycat]# docker cp mycat:/usr/local/mycat/conf/schema.xml /data/mycat/schema-1.xml
    
    
    解析:
    
    docker cp 
        # 容器中文件 /usr/local/mycat/conf/schema.xml ,前缀 mycat:
    mycat:/usr/local/mycat/conf/schema.xml 
        # 本地文件系统中文件
    /data/mycat/schema-1.xml

    • 进入容器控制台:
    [root@base05 ~]# docker container list
    CONTAINER ID   IMAGE                        COMMAND                  CREATED      STATUS       PORTS     NAMES
    0d329da4bba9   longhronshens/mycat-docker   "/bin/sh -c '/usr/lo…"   2 days ago   Up 9 hours             mycat
    [root@base05 ~]# docker exec -it 0d329da4bba9 /bin/bash
    [root@base /]# ll /usr/local/mycat/
    total 12
    drwxr-xr-x. 2 root root  190 Jul 31  2017 bin
    drwxrwxrwx. 2 root root    6 Mar  1  2016 catlet
    drwxrwxrwx. 4 root root 4096 Feb  2 22:07 conf
    drwxr-xr-x. 2 root root 4096 Jul 31  2017 lib
    drwxrwxrwx. 1 root root   74 Feb  5 12:05 logs
    -rwxrwxrwx. 1 root root  217 Oct 28  2016 version.txt
    [root@base /]# exit
    exit
    [root@base05 ~]#
    

    Docker 命令帮助:

    docker --help
    
    Usage:  docker [OPTIONS] COMMAND
    
    A self-sufficient runtime for containers
    
    Options:
          --config string      Location of client config files (default "/root/.docker")
      -c, --context string     Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var
                               and default context set with "docker context use")
      -D, --debug              Enable debug mode
      -H, --host list          Daemon socket(s) to connect to
      -l, --log-level string   Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
          --tls                Use TLS; implied by --tlsverify
          --tlscacert string   Trust certs signed only by this CA (default "/root/.docker/ca.pem")
          --tlscert string     Path to TLS certificate file (default "/root/.docker/cert.pem")
          --tlskey string      Path to TLS key file (default "/root/.docker/key.pem")
          --tlsverify          Use TLS and verify the remote
      -v, --version            Print version information and quit
    
    Management Commands:
      app*        Docker App (Docker Inc., v0.9.1-beta3)
      builder     Manage builds
      buildx*     Docker Buildx (Docker Inc., v0.7.1-docker)
      config      Manage Docker configs
      container   Manage containers
      context     Manage contexts
      image       Manage images
      manifest    Manage Docker image manifests and manifest lists
      network     Manage networks
      node        Manage Swarm nodes
      plugin      Manage plugins
      scan*       Docker Scan (Docker Inc., v0.12.0)
      secret      Manage Docker secrets
      service     Manage services
      stack       Manage Docker stacks
      swarm       Manage Swarm
      system      Manage Docker
      trust       Manage trust on Docker images
      volume      Manage volumes
    
    Commands:
      attach      Attach local standard input, output, and error streams to a running container
      build       Build an image from a Dockerfile
      commit      Create a new image from a container's changes
      cp          Copy files/folders between a container and the local filesystem
      create      Create a new container
      diff        Inspect changes to files or directories on a container's filesystem
      events      Get real time events from the server
      exec        Run a command in a running container
      export      Export a container's filesystem as a tar archive
      history     Show the history of an image
      images      List images
      import      Import the contents from a tarball to create a filesystem image
      info        Display system-wide information
      inspect     Return low-level information on Docker objects
      kill        Kill one or more running containers
      load        Load an image from a tar archive or STDIN
      login       Log in to a Docker registry
      logout      Log out from a Docker registry
      logs        Fetch the logs of a container
      pause       Pause all processes within one or more containers
      port        List port mappings or a specific mapping for the container
      ps          List containers
      pull        Pull an image or a repository from a registry
      push        Push an image or a repository to a registry
      rename      Rename a container
      restart     Restart one or more containers
      rm          Remove one or more containers
      rmi         Remove one or more images
      run         Run a command in a new container
      save        Save one or more images to a tar archive (streamed to STDOUT by default)
      search      Search the Docker Hub for images
      start       Start one or more stopped containers
      stats       Display a live stream of container(s) resource usage statistics
      stop        Stop one or more running containers
      tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
      top         Display the running processes of a container
      unpause     Unpause all processes within one or more containers
      update      Update configuration of one or more containers
      version     Show the Docker version information
      wait        Block until one or more containers stop, then print their exit codes
    
    Run 'docker COMMAND --help' for more information on a command.
    
    To get more help with docker, check out our guides at https://docs.docker.com/go/guides/
    

    Docker 镜像命令帮助:

    [root@base ~]# docker image --help
    
    Usage:  docker image COMMAND
    
    Manage images
    
    Commands:
      build       Build an image from a Dockerfile
                    从 Dockerfile 构建一个镜像
      history     Show the history of an image
                    显示一个镜像的历史
      import      Import the contents from a tarball to create a filesystem image
                    从 tar 包导入内容来创建一个文件系统镜像
      inspect     Display detailed information on one or more images
                    显示一个或多个镜像的详细信息
      load        Load an image from a tar archive or STDIN
                    从 tar 包或标准输出加载一个镜像
      ls          List images
                    列出镜像
      prune       Remove unused images
                    移除未使用的镜像
      pull        Pull an image or a repository from a registry
                    从线上仓库拉取一个镜像或一个版本库
      push        Push an image or a repository to a registry
                    把一个镜像或版本库推送到线上仓库
      rm          Remove one or more images
                    移除一个或多个镜像
      save        Save one or more images to a tar archive (streamed to STDOUT by default)
                    把一个或多个镜像保存成一个 tar 包(默认是流化到标准输出)
      tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
                    创建一个引用源镜像的标记目标镜像
    
    Run 'docker image COMMAND --help' for more information on a command.
    运行 'docker image COMMAND --help' 以获取有关一个命令的更多信息。
    

    Docker 容器命令帮助:

    [root@base ~]# docker container --help
    
    Usage:  docker container COMMAND
    
    Manage containers
    
    Commands:
      attach      Attach local standard input, output, and error streams to a running container
                    绑定本地标准输入、输出和错误流到一个运行中的容器
      commit      Create a new image from a container's changes
                    从容器的改变创建一个新的镜像
      cp          Copy files/folders between a container and the local filesystem
                    在容器和本地文件系统之间拷贝文件/文件夹
      create      Create a new container
                    创建一个新的容器
      diff        Inspect changes to files or directories on a container's filesystem
                    检查容器文件系统的文件或目录的更改
      exec        Run a command in a running container
                    在一个运行中的容器里执行一条命令
      export      Export a container's filesystem as a tar archive
                    将一个容器的文件系统导出成一个 tar 包
      inspect     Display detailed information on one or more containers
                    显示一个或多个容器的详细信息
      kill        Kill one or more running containers
                    杀死一个或多个运行中的容器
      logs        Fetch the logs of a container
                    获取一个容器的日志
      ls          List containers
                    列出容器
      pause       Pause all processes within one or more containers
                    暂停一个或多个容器中的所有进程
      port        List port mappings or a specific mapping for the container
                    列出指定容器的端口映射或只列出一个指定的映射
      prune       Remove all stopped containers
                    移除所有已停止的容器
      rename      Rename a container
                    给一个容器改名
      restart     Restart one or more containers
                    重启一个或多个容器
      rm          Remove one or more containers
                    移除一个或多个容器
      run         Run a command in a new container
                    在一个新的容器中运行一条指令
      start       Start one or more stopped containers
                    启动一个或多个已停止的容器
      stats       Display a live stream of container(s) resource usage statistics
                    显示一个容器资源使用统计的动态流
      stop        Stop one or more running containers
                    停止一个或多个运行中的容器
      top         Display the running processes of a container
                    显示一个容器的运行中进程
      unpause     Unpause all processes within one or more containers
                    恢复运行一个或多个容器中的所有进程
      update      Update configuration of one or more containers
                    更新一个或多个容器的配置
      wait        Block until one or more containers stop, then print their exit codes
                    等待一个或多个容器停止后,打印它们的退出代码
    
    Run 'docker container COMMAND --help' for more information on a command.
    运行 'docker container COMMAND --help' 以获取关于一个命令的更多信息。
    
    
    

    Docker 官方文档地址:

    Reference documentation | Docker DocumentationThis section includes the reference documentation for the Docker platform’s various APIs, CLIs, and file formats.https://docs.docker.com/reference/

    展开全文
  • SOLUTION 已验证- 已更新2014年十月23日14:14- English 环境 Red Hat Enterprise Linux 5 Red Hat Enterprise Linux 6 问题 Storage fails to activate or mount automati...
  • How to fix mount order of filesystems in RHEL 7? https://access.redhat.com/solutions/2057993 环境 Red Hat Enterprise Linux (RHEL) 7 问题 Filesystems are not mounted in the order specified in/etc/...
  • Linux磁盘挂载指令参考手册-MOUNT(8)

    千次阅读 2018-09-12 00:34:00
    the same mountpoint more times. The mount command does not implement any policy to control this behavior. All behavior is controlled by kernel and it is usually specific to filesystem driver. The ...
  • How to mount an ISO Image with AIX 6.1 TL4

    千次阅读 2012-12-20 23:53:41
    Starting with AIX 6.1 TL 4, AIX offers a new command to directly mount an ISO file. The loopmount command will mount any ISO image directly into the filesystem without the need to copy it into a raw L
  • 由用户指定存储的数据具体mount在系统的什么位置 VOLUME ["/data"] volume 的命令选项: Usage: docker volume COMMAND Manage volumes Commands: create Create a volume inspect Display detailed information on ...
  • 搭建glusterfs集群

    2020-11-09 15:06:22
    34s ago Docs: man:glusterd(8) Main PID: 80492 (glusterd) CGroup: /system.slice/glusterd.service └─80492 /usr/local/sbin/glusterd -p /usr/local/var/run/glusterd.pid --log-level INFO [root@server1 ~]...
  • volume manager存在于kubelet中,主要是管理卷的attach/detach(与AD controller作用相同,通过kubelet启动参数控制哪个组件来做该操作,后续会详细介绍)、mount/umount等操作。 简介 容器的存储挂载分为两大步: ...
  • Docker知识点记录

    千次阅读 2022-03-24 14:16:57
    docker运行方式:Docker是C/S模式,以客户端和守护进程的方式来运行。 一个docker容器同时只能管理一个进程,这个进程退出后,容器也就退出了,当然一个容器里可以同时运行多个进程。当容器启动完后执行某脚本后,该进程...
  • Docker 学习 | 第三篇:容器

    万次阅读 2018-03-20 17:49:38
    time to allow one check to run (ms|s|m|h) (default 0s) - -help Print usage - h, --hostname string Container host name - -init Run an init inside the container that forwards signals and ...
  • A one-second period is sufficient because the // sync interval is defaulted to 10s. syncTicker := time.NewTicker(time.Second) defer syncTicker.Stop() housekeepingTicker := time.NewTicker...
  • Linux命令 mount

    千次阅读 2019-02-01 15:46:34
    MOUNT(8) System Administration M...
  • gitlab runner The Docker executor

    千次阅读 2021-06-25 16:16:22
    GitLab Runner can use Docker to run jobs on user provided images. This is possible with the use of Docker executor. The Docker executor when used with GitLab CI, connects to Docker Engine and runs ...
  • flexvolume GRPC调用执行 rookflex mount操作 /usr/local/bin/rookflex --help Rook Flex volume plugin Usage: rookflex [command] Available Commands: help Help about any command init I...
  • k8s安装calico网络

    千次阅读 2021-01-19 11:29:17
    node1 Created container calico-node Normal Started 23s kubelet, k8s-node1 Started container calico-node Warning Unhealthy 14s kubelet, k8s-node1 Readiness probe failed: 2020-08-10 12:53:52.663 [INFO]...
  • 所有docker解决不了的事情,k8s来解决。 1、1Kubernetes优势 ●自动装箱,水平扩展,自我修复 ●服务发现和负载均衡 ●自动发布(默认滚动发布模式)和回滚 ●集中化配置管理和密钥管理 ●存储编排 ●任务批处理运行...
  • 组件概览 关于k8s整理架构,可参考:...request_id=164
  • 简介:pv controller是 kcm 的组件之一,它负责处理集群中的pvc/pv对象,对pvc/pv 对象进行状态转换。本文将基于 kubernetes 1.23进行解析。 作者 | 牧琦 ...初始化代码在 pkg/controller/volume/pers
  • Kubernetes学习-K8S安装篇-Kubeadm高可用安装K8S集群1. Kubernetes 高可用安装1.1 kubeadm高可用安装k8s集群1.23.11.1.1 基本环境配置1.1.2 内核配置1.1.3 基本组件安装1.1.4 高可用组件安装1.1.5 Calico组件的安装...
  • GlusterFS will fail to create a replicate volume if more than one brick of a replica set is present on the same peer. For eg. a four node replicated volume where more than one brick of a replica set ...
  • Setting up GlusterFS Volumes

    2018-10-31 15:52:00
    GlusterFS will fail to create a replicate volume if more than one brick of a replica set is present on the same peer. For eg. a four node replicated volume where more than one brick of a replica set ...
  • AttachDetach Controller is ...当 AttachDetachController 需要进行“Attach”操作时(“Attach 阶段”),它实际上会执行到 pkg/volume/csi 目录中,创建一个 VolumeAttachment 对象,从而触发 External At...
  • A Beginner's Guide To btrfs

    2017-11-15 22:05:00
    Version 1.0 Author: Falko Timme <ft [at] falkotimme [dot] com>Follow me on Twitter Last edited 11/26/2012 This guide shows how to work with the btrfs file system on L...
  • 如何从Linux终端挂载和卸载存储设备

    千次阅读 2020-09-21 06:07:55
    Whether it is out of necessity or through choice, the mount, umount and remount commands give you the ability to take control of this important aspect of your Linux system. 无论是出于必要还是通过选择...
  • kubernetes系列二:概念梳理

    千次阅读 2018-12-27 17:48:37
    文章目录一、资源对象管理1、资源对象... RS (副本集)(4)Deployment (部署)(5)Service (服务)(6)Job (任务)(7)DaemonSet (后台支撑服务集)(8)StatefulSet (有状态服务集)(9)Volume (存储卷...
  • Linux 软raid设置方法

    2021-05-20 05:34:35
    # mdadm /dev/md0 --remove /dev/sda1 mdadm: hot removed /dev/sda1 After replacing the failed drive, you add a "hot spare" and the system will automatically rebuild the failed md device(s). # mdadm /...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 1,347
精华内容 538
关键字:

one or more volume(s) failed to mount

友情链接: VSC.rar