I have installed an ISO image 667 version which is stable and created template,now I started with few commnads and was able to run docker ,now I had a sh file with
docker run calling the images repository and run ,I got space issue when trying to download few of the images from docker ,
Now I added a data disk using fdisk /dev/sda command and was able to create partition but when I try mount it onto /var directory and run it it fails to recognize docker
I am getting error can you please help me resolve the mounting issue all I need is to be able to expand the memory to download the images
login as: core
Last login: Mon Jun 1 12:42:20 2015 from 202.165.62.2
CoreOS stable (647.0.0)
Update Strategy: No Reboots
core@CoreOSdocker ~ $ ls
cloud-config.yaml
core@CoreOSdocker ~ $ pwd
/home/core
core@CoreOSdocker ~ $ pwd
/home/core
core@CoreOSdocker ~ $ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 8.3M 2.0G 1% /run
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 2.0G 6.2M 2.0G 1% /
/dev/loop0 136M 136M 0 100% /usr
tmpfs 2.0G 24K 2.0G 1% /tmp
tmpfs 2.0G 0 2.0G 0% /media
core@CoreOSdocker ~ $ fdisk -h
Usage:
fdisk [options] <disk> change partition table
fdisk [options] -l [<disk>] list partition table(s)
Display or manipulate a disk partition table.
Options:
-b, --sector-size <size> physical and logical sector size
-c, --compatibility[=<mode>] mode is 'dos' or 'nondos' (default)
-L, --color[=<when>] colorize output (auto, always or never)
colors disabled by default
-l, --list display partitions end exit
-o, --output <list> output columns
-t, --type <type> recognize specified partition table type only
-u, --units[=<unit>] display units: 'cylinders' or 'sectors' (default)
-s, --getsz display device size in 512-byte sectors [DEPRECAT ED]
--bytes print SIZE in bytes rather than in human readable format
-C, --cylinders <number> specify the number of cylinders
-H, --heads <number> specify the number of heads
-S, --sectors <number> specify the number of sectors per track
-h, --help display this help and exit
-V, --version output version information and exit
Available columns (for -o):
gpt: Device Start End Sectors Size Type Type-UUID Attrs Name UUID
dos: Device Start End Sectors Cylinders Size Type Id Attrs Boot End-C/H/S
Start-C/H/S
bsd: Slice Start End Sectors Cylinders Size Type Bsize Cpg Fsize
sgi: Device Start End Sectors Cylinders Size Type Id Attrs
sun: Device Start End Sectors Cylinders Size Type Id Flags
For more details see fdisk(8).
core@CoreOSdocker ~ $ fdisk -l
fdisk: cannot open /dev/loop0: Permission denied
fdisk: cannot open /dev/sda: Permission denied
fdisk: cannot open /dev/sr0: Permission denied
core@CoreOSdocker ~ $ sudo -i
CoreOSdocker ~ # df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 8.3M 2.0G 1% /run
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 2.0G 6.2M 2.0G 1% /
/dev/loop0 136M 136M 0 100% /usr
tmpfs 2.0G 24K 2.0G 1% /tmp
tmpfs 2.0G 0 2.0G 0% /media
CoreOSdocker ~ # fdisk -l
Disk /dev/loop0: 135.5 MiB, 142110720 bytes, 277560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 4096 266239 262144 128M c W95 FAT32 (LBA)
/dev/sda2 1 4095 4095 2M ee GPT
Partition table entries are not in disk order.
CoreOSdocker ~ # fdisk /dev/sda
Welcome to fdisk (util-linux 2.26.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): n
Partition type
p primary (2 primary, 0 extended, 2 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (3,4, default 3):
First sector (266240-83886079, default 266240):
Last sector, +sectors or +size{K,M,G,T,P} (266240-83886079, default 83886079):
Created a new partition 3 of type 'Linux' and of size 39.9 GiB.
Command (m for help):
Command (m for help): p
p
Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 4096 266239 262144 128M c W95 FAT32 (LBA)
/dev/sda2 1 4095 4095 2M ee GPT
/dev/sda3 266240 83886079 83619840 39.9G 83 Linux
Partition table entries are not in disk order.
Command (m for help): w
Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 4096 266239 262144 128M c W95 FAT32 (LBA)
/dev/sda2 1 4095 4095 2M ee GPT
/dev/sda3 266240 83886079 83619840 39.9G 83 Linux
Partition table entries are not in disk order.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next rebo ot or after you run partprobe(8) or kpartx(8).
CoreOSdocker ~ # df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 8.3M 2.0G 1% /run
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 2.0G 6.2M 2.0G 1% /
/dev/loop0 136M 136M 0 100% /usr
tmpfs 2.0G 0 2.0G 0% /tmp
tmpfs 2.0G 0 2.0G 0% /media
CoreOSdocker ~ # mkfs -t ext4 /dev/sda3
mke2fs 1.42.10 (18-May-2014)
/dev/sda3 contains a ext4 file system labelled 'USR-A'
last mounted on Thu Apr 9 01:57:39 2015
Proceed anyway? (y,n) y
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: 965847a8-1817-4216-8e64-6d8c9474fa4e
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
CoreOSdocker ~ # mount /dev/sda3 /var
CoreOSdocker ~ # df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 8.3M 2.0G 1% /run
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 2.0G 6.2M 2.0G 1% /
/dev/loop0 136M 136M 0 100% /usr
tmpfs 2.0G 0 2.0G 0% /tmp
tmpfs 2.0G 0 2.0G 0% /media
/dev/sda3 976M 1.3M 908M 1% /var
CoreOSdocker ~ # fdisk -l
Disk /dev/loop0: 135.5 MiB, 142110720 bytes, 277560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 4096 266239 262144 128M c W95 FAT32 (LBA)
/dev/sda2 1 4095 4095 2M ee GPT
/dev/sda3 266240 83886079 83619840 39.9G 83 Linux
Partition table entries are not in disk order.
CoreOSdocker ~ # mount -o subvol=root /dev/sda3 var/
mount: mount point var/ does not exist
CoreOSdocker ~ # mount -o subvol=root /dev/sda3 /var
mount: /dev/sda3 is already mounted or /var busy
/dev/sda3 is already mounted on /var
CoreOSdocker ~ # df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 8.3M 2.0G 1% /run
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 2.0G 6.2M 2.0G 1% /
/dev/loop0 136M 136M 0 100% /usr
tmpfs 2.0G 0 2.0G 0% /tmp
tmpfs 2.0G 0 2.0G 0% /media
/dev/sda3 976M 1.3M 908M 1% /var
CoreOSdocker ~ # fdisk -l
Disk /dev/loop0: 135.5 MiB, 142110720 bytes, 277560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 4096 266239 262144 128M c W95 FAT32 (LBA)
/dev/sda2 1 4095 4095 2M ee GPT
/dev/sda3 266240 83886079 83619840 39.9G 83 Linux
Partition table entries are not in disk order.
CoreOSdocker ~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 40G 0 disk
|-sda1 8:1 0 128M 0 part
|-sda2 8:2 0 2M 0 part
|-sda3 8:3 0 1G 0 part /var
|-sda4 8:4 0 1G 0 part
|-sda6 8:6 0 128M 0 part
|-sda7 8:7 0 64M 0 part
`-sda9 8:9 0 2.1G 0 part
sr0 11:0 1 162M 0 rom
loop0 7:0 0 135.5M 0 loop /usr
CoreOSdocker ~ # docker
Usage: docker [OPTIONS] COMMAND [arg...]
A self-sufficient runtime for linux containers.
Options:
--api-enable-cors=false Enable CORS headers in the remote API
-b, --bridge="" Attach containers to a pre-existing net work bridge
use 'none' to disable container netwo rking
--bip="" Use this CIDR notation address for the network bridge's IP, not compatible with -b
-D, --debug=false Enable debug mode
-d, --daemon=false Enable daemon mode
--dns=[] Force Docker to use specific DNS server s
--dns-search=[] Force Docker to use specific DNS search domains
-e, --exec-driver="native" Force the Docker runtime to use a speci fic exec driver
--fixed-cidr="" IPv4 subnet for fixed IPs (e.g. 10.20.0 .0/16)
this subnet must be nested in the bri dge subnet (which is defined by -b or --bip)
--fixed-cidr-v6="" IPv6 subnet for fixed IPs (e.g.: 2001:a 02b/48)
-G, --group="docker" Group to assign the unix socket specifi ed by -H when running in daemon mode
use '' (the empty string) to disable setting of a group
-g, --graph="/var/lib/docker" Path to use as the root of the Docker r untime
-H, --host=[] The socket(s) to bind to in daemon mode or connect to in client mode, specified using one or more tcp://host:port, unix :///path/to/socket, fd://* or fd://socketfd.
-h, --help=false Print usage
--icc=true Allow unrestricted inter-container and Docker daemon host communication
--insecure-registry=[] Enable insecure communication with spec ified registries (no certificate verification for HTTPS and enable HTTP fallback ) (e.g., localhost:5000 or
10.20.0.0/16)
--ip=0.0.0.0 Default IP address to use when binding container ports
--ip-forward=true Enable net.ipv4.ip_forward and IPv6 for warding if --fixed-cidr-v6 is defined. IPv6 forwarding may interfere with your e xisting IPv6 configuration when using Router Advertisement.
--ip-masq=true Enable IP masquerading for bridge's IP range
--iptables=true Enable Docker's addition of iptables ru les
--ipv6=false Enable IPv6 networking
-l, --log-level="info" Set the logging level (debug, info, war n, error, fatal)
--label=[] Set key=value labels to the daemon (dis played in `docker info`)
--mtu=0 Set the containers network MTU
if no value is provided: default to t he default route MTU or 1500 if no default route is available
-p, --pidfile="/var/run/docker.pid" Path to use for daemon PID file
--registry-mirror=[] Specify a preferred Docker registry mir ror
-s, --storage-driver="" Force the Docker runtime to use a speci fic storage driver
--selinux-enabled=false Enable selinux support. SELinux does no t presently support the BTRFS storage driver
--storage-opt=[] Set storage driver options
--tls=false Use TLS; implied by --tlsverify flag
--tlscacert="/root/.docker/ca.pem" Trust only remotes providing a certific ate signed by the CA given here
--tlscert="/root/.docker/cert.pem" Path to TLS certificate file
--tlskey="/root/.docker/key.pem" Path to TLS key file
--tlsverify=false Use TLS and verify the remote (daemon: verify client, client: verify daemon)
-v, --version=false Print version information and quit
Commands:
attach Attach 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 from a container's filesystem to the host path
create Create a new container
diff Inspect changes on a container's filesystem
events Get real time events from the server
exec Run a command in a running container
export Stream the contents of a container as a tar archive
history Show the history of an image
images List images
import Create a new filesystem image from the contents of a tarball
info Display system-wide information
inspect Return low-level information on a container or image
kill Kill a running container
load Load an image from a tar archive
login Register or log in to a Docker registry server
logout Log out from a Docker registry server
logs Fetch the logs of a container
port Lookup the public-facing port that is NAT-ed to PRIVATE_PORT
pause Pause all processes within a container
ps List containers
pull Pull an image or a repository from a Docker registry server
push Push an image or a repository to a Docker registry server
rename Rename an existing container
restart Restart a running container
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save an image to a tar archive
search Search for an image on the Docker Hub
start Start a stopped container
stats Display a live stream of one or more containers' resource usage st atistics
stop Stop a running container
tag Tag an image into a repository
top Lookup the running processes of a container
unpause Unpause a paused container
version Show the Docker version information
wait Block until a container stops, then print its exit code
Run 'docker COMMAND --help' for more information on a command.
CoreOSdocker ~ # docker info
FATA[0000] Get http:///var/run/docker.sock/v1.17/info: dial unix /var/run/docker .sock: no such file or directory. Are you trying to connect to a TLS-enabled dae mon without TLS?
CoreOSdocker ~ # ssh-add /root/.ssh/
Could not open a connection to your authentication agent.
CoreOSdocker ~ # FATA[0000] Get http:///var/run/docker.sock/v1.17/info:
-bash: FATA[0000]: command not found
CoreOSdocker ~ # docker -D -d
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
FATA[0000] open /var/run/docker.pid: no such file or directory
CoreOSdocker ~ # sudo -i
CoreOSdocker ~ # docker
Usage: docker [OPTIONS] COMMAND [arg...]
A self-sufficient runtime for linux containers.
Options:
--api-enable-cors=false Enable CORS headers in the remote API
-b, --bridge="" Attach containers to a pre-existing net work bridge
use 'none' to disable container netwo rking
--bip="" Use this CIDR notation address for the network bridge's IP, not compatible with -b
-D, --debug=false Enable debug mode
-d, --daemon=false Enable daemon mode
--dns=[] Force Docker to use specific DNS server s
--dns-search=[] Force Docker to use specific DNS search domains
-e, --exec-driver="native" Force the Docker runtime to use a speci fic exec driver
--fixed-cidr="" IPv4 subnet for fixed IPs (e.g. 10.20.0 .0/16)
this subnet must be nested in the bri dge subnet (which is defined by -b or --bip)
--fixed-cidr-v6="" IPv6 subnet for fixed IPs (e.g.: 2001:a 02b/48)
-G, --group="docker" Group to assign the unix socket specifi ed by -H when running in daemon mode
use '' (the empty string) to disable setting of a group
-g, --graph="/var/lib/docker" Path to use as the root of the Docker r untime
-H, --host=[] The socket(s) to bind to in daemon mode or connect to in client mode, specified using one or more tcp://host:port, unix :///path/to/socket, fd://* or fd://socketfd.
-h, --help=false Print usage
--icc=true Allow unrestricted inter-container and Docker daemon host communication
--insecure-registry=[] Enable insecure communication with spec ified registries (no certificate verification for HTTPS and enable HTTP fallback ) (e.g., localhost:5000 or
10.20.0.0/16)
--ip=0.0.0.0 Default IP address to use when binding container ports
--ip-forward=true Enable net.ipv4.ip_forward and IPv6 for warding if --fixed-cidr-v6 is defined. IPv6 forwarding may interfere with your e xisting IPv6 configuration when using Router Advertisement.
--ip-masq=true Enable IP masquerading for bridge's IP range
--iptables=true Enable Docker's addition of iptables ru les
--ipv6=false Enable IPv6 networking
-l, --log-level="info" Set the logging level (debug, info, war n, error, fatal)
--label=[] Set key=value labels to the daemon (dis played in `docker info`)
--mtu=0 Set the containers network MTU
if no value is provided: default to t he default route MTU or 1500 if no default route is available
-p, --pidfile="/var/run/docker.pid" Path to use for daemon PID file
--registry-mirror=[] Specify a preferred Docker registry mir ror
-s, --storage-driver="" Force the Docker runtime to use a speci fic storage driver
--selinux-enabled=false Enable selinux support. SELinux does no t presently support the BTRFS storage driver
--storage-opt=[] Set storage driver options
--tls=false Use TLS; implied by --tlsverify flag
--tlscacert="/root/.docker/ca.pem" Trust only remotes providing a certific ate signed by the CA given here
--tlscert="/root/.docker/cert.pem" Path to TLS certificate file
--tlskey="/root/.docker/key.pem" Path to TLS key file
--tlsverify=false Use TLS and verify the remote (daemon: verify client, client: verify daemon)
-v, --version=false Print version information and quit
Commands:
attach Attach 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 from a container's filesystem to the host path
create Create a new container
diff Inspect changes on a container's filesystem
events Get real time events from the server
exec Run a command in a running container
export Stream the contents of a container as a tar archive
history Show the history of an image
images List images
import Create a new filesystem image from the contents of a tarball
info Display system-wide information
inspect Return low-level information on a container or image
kill Kill a running container
load Load an image from a tar archive
login Register or log in to a Docker registry server
logout Log out from a Docker registry server
logs Fetch the logs of a container
port Lookup the public-facing port that is NAT-ed to PRIVATE_PORT
pause Pause all processes within a container
ps List containers
pull Pull an image or a repository from a Docker registry server
push Push an image or a repository to a Docker registry server
rename Rename an existing container
restart Restart a running container
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save an image to a tar archive
search Search for an image on the Docker Hub
start Start a stopped container
stats Display a live stream of one or more containers' resource usage st atistics
stop Stop a running container
tag Tag an image into a repository
top Lookup the running processes of a container
unpause Unpause a paused container
version Show the Docker version information
wait Block until a container stops, then print its exit code
Run 'docker COMMAND --help' for more information on a command.
CoreOSdocker ~ # docker info
FATA[0000] Get http:///var/run/docker.sock/v1.17/info: dial unix /var/run/docker .sock: no such file or directory. Are you trying to connect to a TLS-enabled dae mon without TLS?
CoreOSdocker ~ # sudo
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
[command]
usage: sudo [-AbEHknPS] [-C num] [-g group] [-h host] [-p prompt] [-u user]
[VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-C num] [-g group] [-h host] [-p prompt] [-u user] file
...
CoreOSdocker ~ # sudo service docker start
sudo: service: command not found
Warning: "docker" or "lxc-docker" command appears to already exist.
Please ensure that you do not already have docker installed.
You may press Ctrl+C now to abort this process and rectify this situation.
+ sleep 20
Either your platform is not easily detectable, is not supported by this
installer script (yet - PRs welcome! [hack/install.sh]), or does not yet have
a package for Docker. Please visit the following URL for more detailed
installation instructions:
CoreOSdocker ~ # docker info
FATA[0000] Get http:///var/run/docker.sock/v1.17/info: dial unix /var/run/docker .sock: no such file or directory. Are you trying to connect to a TLS-enabled dae mon without TLS?
CoreOSdocker ~ # sudo usermod -a -G docker core
CoreOSdocker ~ # docker info
FATA[0000] Get http:///var/run/docker.sock/v1.17/info: dial unix /var/run/docker .sock: no such file or directory. Are you trying to connect to a TLS-enabled dae mon without TLS?
CoreOSdocker ~ #