Closed r0h4n closed 7 years ago
@nigelbabu Can you please take a look at this, This is a Tendrl env on Digital ocean similar to the Tendrl sandbox you know of
@r0h4n [root@centos-512mb-nyc1-01 ceph]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core)
512MB system memory
I manually added volumes to the node. They show up as /dev/sda, /dev/sdb, and so on though they have the weird output in the hwinfo --disk output as you noted.
The boot disk is:
[root@centos-512mb-nyc1-01 ceph]# mount |grep " / " /dev/vda1 on / type ext4 (rw,relatime,seclabel,data=ordered)
On AWS with a flash disk (xvdb) and a spinning disk (xvdc),
[root@ip-172-30-48-223 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.3 (Maipo) even with epel enabled - not sure how to get this command on RHEL in aws
[root@ip-172-30-48-223 ~]# yum provides hwinfo Loaded plugins: amazon-id, rhui-lb, search-disabled-repos No matches found
[root@ip-172-30-48-223 ~]# lsblk --all --bytes --noheadings --output=NAME,KNAME,PKNAME,MAJ:MIN,FSTYPE,MOUNTPOINT,LABEL,UUID,RA,RO,RM,SIZE,STATE,OWNER,GROUP,MODE,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,SCHED,RQ-SIZE,DISC-ALN,DISC-GRAN,DISC-MAX,DISC-ZERO,TYPE --path --raw /dev/xvda /dev/xvda 202:0 4096 0 0 10737418240 root disk brw-rw---- 0 512 0 512 512 0 deadline 128 0 0 0 0 disk /dev/xvda1 /dev/xvda1 /dev/xvda 202:1 4096 0 0 1048576 root disk brw-rw---- 0 512 0 512 512 0 deadline 128 0 0 0 0 part /dev/xvda2 /dev/xvda2 /dev/xvda 202:2 xfs / 3ed41454-00c8-4803-bf61-2ee88aa54dbf 4096 0 0 10735304192 root disk brw-rw---- 0 512 0 512 512 0 deadline 128 0 0 0 0 part /dev/xvdb /dev/xvdb 202:16 4096 0 0 11811160064 root disk brw-rw---- 0 512 0 512 512 0 deadline 128 0 0 0 0 disk /dev/xvdc /dev/xvdc 202:32 4096 0 0 536870912000 root disk brw-rw---- 0 512 0 512 512 0 deadline 128 0 0 0 0 disk
Below the larger disk is the spinning disk (500GB) and the smaller one is flash (11.8GB)
[root@ip-172-30-48-223 ~]# fdisk -l WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/xvda: 10.7 GB, 10737418240 bytes, 20971520 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 label type: gpt
Start End Size Type Name
1 2048 4095 1M BIOS boot parti 2 4096 20971486 10G Microsoft basic
Disk /dev/xvdb: 11.8 GB, 11811160064 bytes, 23068672 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/xvdc: 536.9 GB, 536870912000 bytes, 1048576000 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
You can get hwinfo from this repo https://copr.fedorainfracloud.org/coprs/tendrl/dependencies/packages/
@japplewhite closing this one, let me know if anything else is required specific to DO
Digital ocean setup ( help, @japplewhite please provide exact digital ocean os/vm/hardware details)
hwinfo --partition
hwinfo --disk
lsblk --all --bytes --noheadings --output=NAME,KNAME,PKNAME,MAJ:MIN,FSTYPE,MOUNTPOINT,LABEL,UUID,RA,RO,RM,SIZE,STATE,OWNER,GROUP,MODE,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,SCHED,RQ-SIZE,DISC-ALN,DISC-GRAN,DISC-MAX,DISC-ZERO,TYPE --path --raw
Problem 1: Tendrl uses the "Device File" attribute in "hwinfo --disk" as part of the primary key for that disk in Tendrl central store, This causes the Tendrl central store etcd key to look like "/nodes/:node_id/LocalStorage/<disk_primary_key_contains space" , etcd keys cannot have space characters.
Problem 2: The actual raw disk is "/dev/sda" as shown by "lsblk" command, but Digital ocean shows the "Device File" as "/dev/sda (/dev/sg0)"
To fix this, in such cases, Tendrl will only consider the "Device File" string until there's a space character encountered i.e the raw disk name "/dev/sda" will be considered and not "/dev/sda (/dev/sg0)"
Inputs welcome
cc: @mbukatov @nthomas-redhat @nnDarshan @shtripat @brainfunked