threefoldtecharchive / 0-core

Multi Node OS which requires no install.
Apache License 2.0
3 stars 2 forks source link

zos disk cache was not mounted properly #155

Closed Pishoy closed 5 years ago

Pishoy commented 5 years ago

var/log/core.log:2019-04-09T09:51:57.044Z: logger D >  [0]cache 2|+ btrfs check --repair
/var/log/core.log:2019-04-09T09:51:57.044Z: logger D >  [0]cache 2| /dev/disk/by-label/sp_zos-cache
/var/log/core.log:2019-04-09T09:51:57.046Z: logger D >  [0]cache 2|ERROR: 
/var/log/core.log:2019-04-09T09:51:57.046Z: logger D >  [0]cache 2|mount check: cannot open /dev/disk/by-label/sp_zos-cache: No such file or directory
/var/log/core.log:2019-04-09T09:51:57.046Z: logger D >  [0]cache 2|+ mount
/var/log/core.log:2019-04-09T09:51:57.046Z: logger D >  [0]cache 2| /dev/disk/by-label/sp_zos-cache /mnt/storagepools/sp_zos-cache
/var/log/core.log:2019-04-09T09:51:57.048Z: logger D >  [0]cache 2|mount: mounting /dev/disk/by-label/sp_zos-cache on /mnt/storagepools/sp_zos-cache failed: No such file or directory
/var/log/core.log:2019-04-09T09:51:57.048Z: logger D >  [0]cache 2|+ log 'sp_zos-cache not mounted, search for available disk'
/var/log/core.log:2019-04-09T09:51:57.048Z: logger D >  [0]cache 2|+ 
/var/log/core.log:2019-04-09T09:51:57.049Z: logger D >  [0]cache 2|echo '[+]' sp_zos-cache not mounted, search/mnt/storagepools/867cb65c-9162-45c3-8e75-ae56bbbcb1b6 'for' available disk
/var/log/core.log:[+] sp_zos-cache not mounted, search for available disk
/var/log/core.log:2019-04-09T09:51:57.049Z: logger D >  [0]cache 2|+ lsblk
/var/log/core.log:2019-04-09T09:51:57.049Z: logger D >  [0]cache 2| -e 2
/var/log/core.log:2019-04-09T09:51:57.049Z: logger D >  [0]cache 2| -e 11 -pdn -o NAME,ROTA,TYPE,TRAN
/var/log/core.log:2019-04-09T09:51:57.05Z: logger D >  [0]cache 2|+ grep -v usb
/var/log/core.log:2019-04-09T09:51:57.05Z: logger D >  [0]cache 2|+ 
/var/log/core.log:2019-04-09T09:51:57.05Z: logger D >  [0]cache 2|sort -nk 2
/var/log/core.log:2019-04-09T09:51:57.05Z: logger D >  [0]cache 2|
/var/log/core.log:2019-04-09T09:51:57.05Z: logger D >  [0]cache 2| -f 1
/var/log/core.log:2019-04-09T09:51:57.05Z: logger D >  [0]cache 2|
/var/log/core.log:2019-04-09T09:51:57.056Z: logger D >  [0]cache 2|+ lsblk -n
/var/log/core.log:2019-04-09T09:51:57.056Z: logger D >  [0]cache 2| -o TYPE
/var/log/core.log:2019-04-09T09:51:57.056Z: logger D >  [0]cache 2| /dev/nvme1n1
/var/log/core.log:2019-04-09T09:51:57.056Z: logger D >  [0]cache 2|+ 
/var/log/core.log:2019-04-09T09:51:57.056Z: logger D >  [0]cache 2|grep part
/var/log/core.log:2019-04-09T09:51:57.059Z: logger D >  [0]cache 2|+ DISK=/dev/nvme1n1
/var/log/core.log:2019-04-09T09:51:57.059Z: logger D >  [0]cache 2|+ 
/var/log/core.log:2019-04-09T09:51:57.059Z: logger D >  [0]cache 2|break
/var/log/core.log:2019-04-09T09:51:57.059Z: logger D >  [0]cache 2|+ parted -s /dev/nvme1n1 mktable gpt
/var/log/core.log:2019-04-09T09:51:57.081Z: logger D >  [0]cache 2|+ 
/var/log/core.log:2019-04-09T09:51:57.081Z: logger D >  [0]cache 2|parted -s /dev/nvme1n1
/var/log/core.log:2019-04-09T09:51:57.081Z: logger D >  [0]cache 2| mkpart primary btrfs 1 '100%'
/var/log/core.log:2019-04-09T09:51:57.095Z: logger D >  [0]cache 2|+ sync
/var/log/core.log:2019-04-09T09:51:57.097Z: logger D >  [0]cache 2|+ partprobe
/var/log/core.log:2019-04-09T09:51:57.188Z: logger D >  [0]cache 2|+ udevadm settle
/var/log/core.log:2019-04-09T09:51:58.145Z: logger D >  [0]cache 2|+ mkfs.btrfs /dev/nvme1n11 -f -L sp_zos-cache
/var/log/core.log:2019-04-09T09:51:58.147Z: logger D >  [0]cache 2|ERROR: mount check: cannot open /dev/nvme1n11: No such file or directory
/var/log/core.log:2019-04-09T09:51:58.147Z: logger D >  [0]cache 2|+ sync
/var/log/core.log:2019-04-09T09:51:58.149Z: logger D >  [0]cache 2|+ partprobe
/var/log/core.log:2019-04-09T09:51:58.357Z: logger D >  [0]cache 2|+ udevadm settle
/var/log/core.log:2019-04-09T09:51:59.161Z: logger D >  [0]cache 2|+ 
/var/log/core.log:2019-04-09T09:51:59.161Z: logger D >  [0]cache 2|return 0
/var/log/core.log:2019-04-09T09:51:59.161Z: logger D >  [0]cache 2|+ labelmount sp_zos-cache /mnt/storagepools/sp_zos-cache
/var/log/core.log:+ disk=/dev/disk/by-label/sp_zos-cache
/var/log/core.log:2019-04-09T09:51:59.161Z: logger D >  [0]cache 2|+ target=/mnt/storagepools/sp_zos-cache
/var/log/core.log:2019-04-09T09:51:59.161Z: logger D >  [0]cache 2|
/var/log/core.log:2019-04-09T09:51:59.161Z: logger D >  [0]cache 2| --repair /dev/disk/by-label/sp_zos-cache
/var/log/core.log:2019-04-09T09:51:59.162Z: logger D >  [0]cache 2|ERROR: mount check: cannot open /dev/disk/by-label/sp_zos-cache: No such file or directory
/var/log/core.log:2019-04-09T09:51:59.162Z: pm D >  Process (cache# core.system) exited with state: 1
/var/log/core.log:2019-04-09T09:51:59.163Z: main D >  Job result for command '(cache# core.system)' is 'ERROR'
/var/log/core.log:2019-04-09T09:52:13.776Z: logger D >  [0]zrobot-vol 2|ERROR: not a btrfs filesystem: /var/cache
~ #  

issue was fixed as steps mentioned in this issue

issue in zos disk script https://github.com/threefoldtech/0-core/blob/development/tools/ensurecache.sh

Pishoy commented 5 years ago

verified

In [17]: ncl.ping()
Out[17]: 'PONG Version: master @Revision: b1a1a737352fce69fd71de5f8cf1ae175f4bdcab'

In [18]: ncl.shell()
# 
# df -kh
# Filesystem                Size      Used Available Use% Mounted on
tmpfs                   512.0M    325.1M    186.9M  63% /
devtmpfs                959.7M         0    959.7M   0% /dev
cgroup_root             998.8M         0    998.8M   0% /sys/fs/cgroup
/dev/sda1                10.0G    129.4M      8.9G   1% /mnt/storagepools/sp_zos-cache
/dev/sda1                10.0G    129.4M      8.9G   1% /var/cache
/dev/sda1                10.0G    129.4M      8.9G   1% /var/log
overlay                  10.0G    129.4M      8.9G   1% /mnt/containers/1
/dev/sda1                10.0G    129.4M      8.9G   1% /mnt/containers/1/opt/code/local/stdorg/config
/dev/sda1                10.0G    129.4M      8.9G   1% /mnt/containers/1/opt/var/data/zrobot/zrobot_data
/dev/sda1                10.0G    129.4M      8.9G   1% /mnt/containers/1/root/jumpscale/cfg
/dev/sda1                10.0G    129.4M      8.9G   1% /mnt/containers/1/root/.ssh
tmpfs                   512.0M    325.1M    186.9M  63% /mnt/containers/1/tmp/redis.sock
tmpfs                   512.0M    325.1M    186.9M  63% /mnt/containers/1/coreX
/dev/sdb1                10.0G     16.2M      9.7G   0% /mnt/storagepools/bcee920a-55f7-42c3-9683-baa81546c769