mount

数据卷(Data Volumes)

流过昼夜 提交于 2019-12-15 20:42:06
Docker 宿主机和容器之间文件拷贝 docker copy 前言: Docker 数据管理 在生产环境中使用 Docker ,往往需要对数据进行持久化,或者需要在多个容器之间进行 数据共享,这必然涉及容器的数据管理操作 容器中的管理数据主要有两种方式: 数据卷 Data Volumes 容器内数据直接映射到本地主机环境; 数据卷容器( Data Volume Containers 使用特定容器维护数据卷 当然还有最原始的copy 方式,这个也是管理数据的方式,但是基本不会用到; 最原始的 copy 方式管理数据: 宿主机文件 copy to 容器内 docker cp 需要拷贝的文件或者目录 容器名称:容器目录 docker cp /jt/monitorlogs/ db3:/jt/software 容器内 copy to 宿主机 docker cp 容器名称:容器目录 宿主机目录 数据卷 数据卷 (Data Volumes) 数据卷是一个可供一个或多个容器使用的 特殊目录,它将主机操作系统目录直接映射进容器, 它可以提供很多有用的特性: 1. 数据卷 可以在容器之间共享和重用 2. 对数据卷的修改会立马生效 3. 对数据卷的更新,不会影响镜像 4. 数据卷 默认会一直存在,即使容器被删除 数据卷相关操作 1. 创建数据卷 docker volume create my-vol

linux访问windows共享文件夹的两种方法

守給你的承諾、 提交于 2019-12-15 14:42:05
摘自:https://www.cnblogs.com/dengtang/p/11630482.html 有时需要在linux下需要访问windows的共享文件夹,可以使用mount挂载或者使用samba连接。 1、mount挂载 首先创建被挂载的目录: $ mkdir windows将共享文件夹挂载到windows文件夹: $ sudo mount -t cifs -o username=share,password=share //192.168.66.198/share ./windows其中几个参数表示含义:cifs:Common Internet File System,可以理解为网络文件系统。usrname:访问共享文件夹的用户名password:访问密码//192.168.66.198/share:表示网络文件夹的地址,注意这里最后不能加/,如果是//192.168.66.198/share/则会报如下错误:mount: //192.168.66.198/share/ is not a valid block deviceTips:使用mount挂载的方法在系统重新启动后就会失效,如果希望开机时自动挂载,将下面设置加入/etc/fstab文件最后面就可以了。 //192.168.66.198/share /home/windows cifs defaults

win10 mount error 112 : host is down解决方案

安稳与你 提交于 2019-12-15 14:41:32
摘自:https://www.baidu.com/link?url=xZrOVRqR9gqGRq0esfVaivByR9E5-ixyAuKsQ_8Hiedl1sY6J7ezBlgSW3oe_X-koo2k0zfP0mHp0hKvZeVBUzR_0Elr_obQymIYHl5AE43&wd=&eqid=8af79857002f811e000000035df5c941 安装好Win10操作系统之后,使用ssh mount -t cifs //IP/共享目录 /mount挂载点的命令时候,提示 mount error(112): Host is down Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 解决方案如下: 在控制面板->程序和功能->启动或关闭windows更能中勾选SMB的相关项,之后重启电脑即可 点赞 3 来源: https://www.cnblogs.com/LiuYanYGZ/p/12043943.html

Mounting and untar'ing a file in Java

一曲冷凌霜 提交于 2019-12-13 17:56:51
问题 I'm currently working on a web application that involves mounting a drive and extracting a tar.gz file, all in Java. Since the application runs in a linux environment, I figured I'd try using unix commands like "mount" and "tar". Runtime runtime = Runtime.getRuntime(); Process proc; String mountCommand = "mount -t cifs -o username=..."; String extractCommand = "tar xzf ..." proc = runtime.exec(mountCommand); proc.waitFor(); proc = runtime.exec(extractCommand); proc.waitFor(); Running the

Linux命令

北慕城南 提交于 2019-12-13 16:10:56
系统信息 arch 显示机器的处理器架构(1) uname -m 显示机器的处理器架构(2) uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统部件 - (SMBIOS / DMI) hdparm -i /dev/hda 罗列一个磁盘的架构特性 hdparm -tT /dev/sda 在磁盘上执行测试性读取操作 cat /proc/cpuinfo 显示CPU info的信息 cat /proc/interrupts 显示中断 cat /proc/meminfo 校验内存使用 cat /proc/swaps 显示哪些swap被使用 cat /proc/version 显示内核的版本 cat /proc/net/dev 显示网络适配器及统计 cat /proc/mounts 显示已加载的文件系统 lspci -tv 罗列 PCI 设备 lsusb -tv 显示 USB 设备 date 显示系统日期 cal 2007 显示2007年的日历表 date 041217002007.00 设置日期和时间 - 月日时分年.秒 clock -w 将时间修改保存到 BIOS 关机 (系统的关机、重启以及登出 ) shutdown -h now 关闭系统(1) init 0 关闭系统(2) telinit 0 关闭系统(3) shutdown -h hours

mount system call in linux cannot display the mountpoint of file system by df command

谁说我不能喝 提交于 2019-12-13 14:17:41
问题 I am trying to use mount() instead of mount command in my program, I use the following mount() successfully, the result returned success instead of Invalid Argument . int rc = mount("172.16.74.20:/data/redun/snmp","/mnt/data/redun/snmp", "nfs",0,"soft,timeo=2,addr=172.16.74.20"); if (rc != 0) { printf("mount failed, errCode=%d, reason=%s\n",errno, strerror(errno)); } But when I use df -h to check the mountpoint, there are nothing displayed. I found the related device was not mounted yet. What

Remote mounting

青春壹個敷衍的年華 提交于 2019-12-13 07:11:12
问题 mount -t smbfs -o username=Administrator,password=Password //severIP/dev/hda1 /mnt/mountTemp where /dev/hda1 - filesystem in the remote machine /mnt/mountTemp - mount pont in the local machine This command mounts a remote filesystem in your local machine. But is there a possibility where you can mount the remote filesystem in the remote machine itself??(but the command has to be fired from your local machine) 回答1: You can use ssh to run command on remote machine ssh user@remote command 来源:

Mount/Unmount SDcard, or Simulate it - Android

为君一笑 提交于 2019-12-13 06:42:01
问题 Edit: The default media player for Android phones scans the sdcard for song files and then allows the user to play these songs based on what it has scanned. My app that I have made writes additional song files to the sdcard, but the default media player does not see these songs because it only scans for song files when it is either A: Rebooted (phone turns on). or B: when the phone's sdcard is mounted . My problem is that I need to either programatically unmount/mount the sdcard, or simulate

Executing Shell script from Java code

馋奶兔 提交于 2019-12-13 04:12:55
问题 I have the gui which have the button as "mount to server"....am having the ubuntu client and server system.....When I click the mount button ,it should mount to server folder... for example, one folder name "OUTPUT" is in the server..in client machine folder is "OUTPUT FILES"...through linux command i can mount the server "OUTPUT" folder from client folder "OUTPUT FILES".... But , in java when i press the mount button, it should mount the server "OUTPUT" folder..should i need any shellscript

writing to storage instead of emulated on nexus 7

醉酒当歌 提交于 2019-12-13 03:35:30
问题 In my code, write stuff to file using this code //the path String fileName = Environment.getExternalStoragePublicDirectory(fileName) + File.separator+"Foo"+File.separator; File dir = new File(fileName); //the file fileName += "bar" File file = new File(fileName); try { file.createNewFile(); } catch (IOException e) { //do nothing, for now } return; This results with the file being written /storage/emulated/0/ and not to /storage/sdcard0 . The problem I have with this is that I dont see