portworx/px-dev

How does PX format and partition

Closed this issue · 2 comments

I am trying to use px-dev to pick up a device (/dev/ram0) for px-dev use, but the issue I keep running into is the following error when I start PX using a config.json

time="2017-07-31T22:23:31Z" level=info msg="PX cluster manager running." 
time="2017-07-31T22:23:31Z" level=info msg="Starting server on port: 9001" 
time="2017-07-31T22:23:31Z" level=info msg="PX API server running on port 9001." 
time="2017-07-31T22:23:31Z" level=info msg="Adding cluster event listener: PX Storage Service" 
time="2017-07-31T22:23:31Z" level=info msg="Adding cluster event listener: Scheduler" 
time="2017-07-31T22:23:31Z" level=info msg="Cluster manager starting..." 
time="2017-07-31T22:23:31Z" level=info msg="LoggingURL during initializing a new cluster.%s  " 
time="2017-07-31T22:23:31Z" level=info msg="Cluster state is OK... Joining the cluster." 
time="2017-07-31T22:23:31Z" level=info msg="Node 0ad91d4e-10g4-46c9-8152-c9c95bb492b4 joining cluster..." 
time="2017-07-31T22:23:31Z" level=info msg="Cluster ID: 5ac2ed6f-7e4e-4e1d-8e8c-3a6df1fb61a5" 
time="2017-07-31T22:23:31Z" level=info msg="Node Mgmt IP: 192.168.x.x" 
time="2017-07-31T22:23:31Z" level=info msg="Node Data IP: 192.168.x.x" 
time="2017-07-31T22:23:31Z" level=info msg="Cluster Logging URL : " 
time="2017-07-31T22:23:41Z" level=warning msg="Error while getting service provider information: Get http://ip-api.com/json: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)" 
time="2017-07-31T22:23:44Z" level=info msg="Made 1 pools" 
time="2017-07-31T22:23:44Z" level=error msg="hal.Renit() Failed with error: Failed to format [-f --nodiscard /dev/ram0]: '/dev/ram0' is too small to make a usable filesystem\nMinimum size for each btrfs device is 41943040.\nbtrfs-progs v4.4\nSee http://btrfs.wiki.kernel.org for more information.\n\n (exit status 1)" 
time="2017-07-31T22:23:44Z" level=info Error=<nil> Function=nodeMap.Add MID=0ad91d4e-10f5-46c9-8152-c9c95bb492b4 NID=14 Status=InitializationError Version= 
time="2017-07-31T22:23:44Z" level=warning msg="Failed to initialize Init PX Storage Service: Storage failed initialization" 
time="2017-07-31T22:23:44Z" level=info msg="Cleanup Init services" 
time="2017-07-31T22:23:44Z" level=warning msg="Cleanup Init for service PX Storage Service." 
time="2017-07-31T22:23:44Z" level=info msg="Cleanup Init for Storage provider PXD" 
time="2017-07-31T22:23:44Z" level=warning msg="Cleanup Init for service Scheduler." 
time="2017-07-31T22:23:44Z" level=info msg="Cleanup Initializing node and joining the cluster 5ac2ed6f-7e4e-4e1d-8e8c-3a6df1fb61a5..." 
time="2017-07-31T22:23:44Z" level=error msg="Failed to initialize node in cluster. Storage failed initialization" 
time="2017-07-31T22:23:44Z" level=error msg="Cluster Manager Failure: Storage failed initialization" 
time="2017-07-31T22:23:45Z" level=error msg="HTTP error: Unavailable" status=500 
time="2017-07-31T22:23:45Z" level=error msg="Error while calling home: HTTP-500: Unavailable\n" 

I am using ubuntu 16.04 and using the following modprobe command to create a ram block device. I am doing this within virtbox on my local mac, so not lots of memory to allocate to the ram drive

#modprobe brd rd_size=16384

#rmmod brd removes the device successfully as well

this seems to create /dev/ram0, and I am defining that in config.json to have px pick up the device and begin to prepare to use it. However the logs above seems to indicate its having an issue perhaps with the way its partitioning and formatting the device.

thnx for any advice or help you can provide

more info

root@node2:~# modprobe brd rd_size=1024

root@node2:~# mkfs /dev/ram0
mke2fs 1.42.13 (17-May-2015)
Discarding device blocks: done
Creating filesystem with 1024 1k blocks and 128 inodes

Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done

root@node2:# mount /dev/ram0 /mnt/tmpfs
root@node2:
# cd /mnt/tmpfs
root@node2:/mnt/tmpfs# ls -l
total 12
drwx------ 2 root root 12288 Jul 31 19:05 lost+found

root@node2:/mnt/tmpfs# dd if=/dev/zero of=/mnt/tmpfs/test.img bs=1M count=199
dd: error writing '/mnt/tmpfs/test.img': No space left on device
1+0 records in
0+0 records out
1003520 bytes (1.0 MB, 980 KiB) copied, 0.00317252 s, 316 MB/s
root@node2:/mnt/tmpfs# dd if=/dev/zero of=/tmp/test.img bs=1M count=199
199+0 records in
199+0 records out
208666624 bytes (209 MB, 199 MiB) copied, 0.439093 s, 475 MB/s

This is due to the disk being too small for px config