Centos 7 guest, bhyve add additional zvol disks and mount inside VM

bimalkharel

Cadet
Joined
Feb 28, 2020
Messages
4
Hi, I have been using FreenNAS for several years and am currently on 11.3 and things are great! Although not a big fan of type 2 VMs I needed to do it for a test using bhyve. I am running Centos 7 as guest. I need to add a a second disk to the VM so I attached a zvol using the VM management UI...however I don't know how to make it show up in CentOS - I tried some scans and fdisk but I can't see the disk. I rebooted too. Can you point me to docs for this?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If you added a disk device with that ZVOL to your VM and picked type "VirtIO" (you should), the disk should show up in Linux as /dev/vdb.

HTH,
Patrick
 

bimalkharel

Cadet
Joined
Feb 28, 2020
Messages
4
Code:
dev]# ll
total 0
crw-------. 1 root root     10, 235 Feb 28 02:56 autofs
drwxr-xr-x. 2 root root         160 Feb 28 02:56 block
drwxr-xr-x. 2 root root          60 Feb 28 02:56 bsg
crw-------. 1 root root     10, 234 Feb 28 02:56 btrfs-control
drwxr-xr-x. 3 root root          60 Feb 28 02:56 bus
drwxr-xr-x. 2 root root          80 Feb 28 02:56 centos_cloud
drwxr-xr-x. 2 root root        2660 Feb 28 02:56 char
crw-------. 1 root root      5,   1 Feb 28 02:56 console
lrwxrwxrwx. 1 root root          11 Feb 28 02:56 core -> /proc/kcore
drwxr-xr-x. 4 root root          80 Feb 28 02:56 cpu
crw-------. 1 root root     10,  61 Feb 28 02:56 cpu_dma_latency
crw-------. 1 root root     10,  62 Feb 28 02:56 crash
drwxr-xr-x. 7 root root         140 Feb 28 02:56 disk
brw-rw----. 1 root disk    253,   0 Feb 28 02:56 dm-0
brw-rw----. 1 root disk    253,   1 Feb 28 02:56 dm-1
crw-rw----. 1 root video    29,   0 Feb 28 02:56 fb0
lrwxrwxrwx. 1 root root          13 Feb 28 02:56 fd -> /proc/self/fd
crw-rw-rw-. 1 root root      1,   7 Feb 28 02:56 full
crw-rw-rw-. 1 root root     10, 229 Feb 28 02:56 fuse
crw-------. 1 root root    246,   0 Feb 28 02:56 hidraw0
crw-------. 1 root root     10, 228 Feb 28 02:56 hpet
drwxr-xr-x. 2 root root           0 Feb 28 02:56 hugepages
crw-------. 1 root root     10, 183 Feb 28 02:56 hwrng
lrwxrwxrwx. 1 root root          25 Feb 28 02:56 initctl -> /run/systemd/initctl/fifo
drwxr-xr-x. 4 root root         260 Feb 28 02:56 input
crw-r--r--. 1 root root      1,  11 Feb 28 02:56 kmsg
srw-rw-rw-. 1 root root           0 Feb 28 02:56 log
crw-rw----. 1 root disk     10, 237 Feb 28 02:56 loop-control
drwxr-xr-x. 2 root root         100 Feb 28 02:56 mapper
crw-------. 1 root root     10, 227 Feb 28 02:56 mcelog
crw-r-----. 1 root kmem      1,   1 Feb 28 02:56 mem
drwxrwxrwt. 2 root root          40 Feb 28 02:56 mqueue
drwxr-xr-x. 2 root root          60 Feb 28 02:56 net
crw-------. 1 root root     10,  60 Feb 28 02:56 network_latency
crw-------. 1 root root     10,  59 Feb 28 02:56 network_throughput
crw-rw-rw-. 1 root root      1,   3 Feb 28 02:56 null
crw-------. 1 root root     10, 144 Feb 28 02:56 nvram
crw-------. 1 root root      1,  12 Feb 28 02:56 oldmem
crw-r-----. 1 root kmem      1,   4 Feb 28 02:56 port
crw-------. 1 root root    108,   0 Feb 28 02:56 ppp
crw-rw-rw-. 1 root tty       5,   2 Feb 28 09:58 ptmx
drwxr-xr-x. 2 root root           0 Feb 28 02:56 pts
crw-rw-rw-. 1 root root      1,   8 Feb 28 02:56 random
drwxr-xr-x. 2 root root          60 Feb 28 02:56 raw
lrwxrwxrwx. 1 root root           4 Feb 28 02:56 rtc -> rtc0
crw-------. 1 root root    252,   0 Feb 28 02:56 rtc0
brw-rw----. 1 root disk      8,   0 Feb 28 02:56 sda
brw-rw----. 1 root disk      8,   1 Feb 28 02:56 sda1
brw-rw----. 1 root disk      8,   2 Feb 28 02:56 sda2
brw-rw----. 1 root disk      8,   3 Feb 28 02:56 sda3
crw-rw----. 1 root disk     21,   0 Feb 28 02:56 sg0
drwxrwxrwt. 2 root root          60 Feb 28 02:56 shm
crw-------. 1 root root     10, 231 Feb 28 02:56 snapshot
drwxr-xr-x. 2 root root          80 Feb 28 02:56 snd
lrwxrwxrwx. 1 root root          15 Feb 28 02:56 stderr -> /proc/self/fd/2
lrwxrwxrwx. 1 root root          15 Feb 28 02:56 stdin -> /proc/self/fd/0
lrwxrwxrwx. 1 root root          15 Feb 28 02:56 stdout -> /proc/self/fd/1
crw-rw-rw-. 1 root tty       5,   0 Feb 28 02:56 tty
crw--w----. 1 root tty       4,   0 Feb 28 02:56 tty0
crw--w----. 1 root tty       4,   1 Feb 28 02:56 tty1
crw--w----. 1 root tty       4,  10 Feb 28 02:56 tty10
crw--w----. 1 root tty       4,  11 Feb 28 02:56 tty11
crw--w----. 1 root tty       4,  12 Feb 28 02:56 tty12
crw--w----. 1 root tty       4,  13 Feb 28 02:56 tty13
crw--w----. 1 root tty       4,  14 Feb 28 02:56 tty14
crw--w----. 1 root tty       4,  15 Feb 28 02:56 tty15
crw--w----. 1 root tty       4,  16 Feb 28 02:56 tty16
crw--w----. 1 root tty       4,  17 Feb 28 02:56 tty17
crw--w----. 1 root tty       4,  18 Feb 28 02:56 tty18
crw--w----. 1 root tty       4,  19 Feb 28 02:56 tty19
crw--w----. 1 root tty       4,   2 Feb 28 02:56 tty2
crw--w----. 1 root tty       4,  20 Feb 28 02:56 tty20
crw--w----. 1 root tty       4,  21 Feb 28 02:56 tty21
crw--w----. 1 root tty       4,  22 Feb 28 02:56 tty22
crw--w----. 1 root tty       4,  23 Feb 28 02:56 tty23
crw--w----. 1 root tty       4,  24 Feb 28 02:56 tty24
crw--w----. 1 root tty       4,  25 Feb 28 02:56 tty25
crw--w----. 1 root tty       4,  26 Feb 28 02:56 tty26
crw--w----. 1 root tty       4,  27 Feb 28 02:56 tty27
crw--w----. 1 root tty       4,  28 Feb 28 02:56 tty28
crw--w----. 1 root tty       4,  29 Feb 28 02:56 tty29
crw--w----. 1 root tty       4,   3 Feb 28 02:56 tty3
crw--w----. 1 root tty       4,  30 Feb 28 02:56 tty30
crw--w----. 1 root tty       4,  31 Feb 28 02:56 tty31
crw--w----. 1 root tty       4,  32 Feb 28 02:56 tty32
crw--w----. 1 root tty       4,  33 Feb 28 02:56 tty33
crw--w----. 1 root tty       4,  34 Feb 28 02:56 tty34
crw--w----. 1 root tty       4,  35 Feb 28 02:56 tty35
crw--w----. 1 root tty       4,  36 Feb 28 02:56 tty36
crw--w----. 1 root tty       4,  37 Feb 28 02:56 tty37
crw--w----. 1 root tty       4,  38 Feb 28 02:56 tty38
crw--w----. 1 root tty       4,  39 Feb 28 02:56 tty39
crw--w----. 1 root tty       4,   4 Feb 28 02:56 tty4
crw--w----. 1 root tty       4,  40 Feb 28 02:56 tty40
crw--w----. 1 root tty       4,  41 Feb 28 02:56 tty41
crw--w----. 1 root tty       4,  42 Feb 28 02:56 tty42
crw--w----. 1 root tty       4,  43 Feb 28 02:56 tty43
crw--w----. 1 root tty       4,  44 Feb 28 02:56 tty44
crw--w----. 1 root tty       4,  45 Feb 28 02:56 tty45
crw--w----. 1 root tty       4,  46 Feb 28 02:56 tty46
crw--w----. 1 root tty       4,  47 Feb 28 02:56 tty47
crw--w----. 1 root tty       4,  48 Feb 28 02:56 tty48
crw--w----. 1 root tty       4,  49 Feb 28 02:56 tty49
crw--w----. 1 root tty       4,   5 Feb 28 02:56 tty5
crw--w----. 1 root tty       4,  50 Feb 28 02:56 tty50
crw--w----. 1 root tty       4,  51 Feb 28 02:56 tty51
crw--w----. 1 root tty       4,  52 Feb 28 02:56 tty52
crw--w----. 1 root tty       4,  53 Feb 28 02:56 tty53
crw--w----. 1 root tty       4,  54 Feb 28 02:56 tty54
crw--w----. 1 root tty       4,  55 Feb 28 02:56 tty55
crw--w----. 1 root tty       4,  56 Feb 28 02:56 tty56
crw--w----. 1 root tty       4,  57 Feb 28 02:56 tty57
crw--w----. 1 root tty       4,  58 Feb 28 02:56 tty58
crw--w----. 1 root tty       4,  59 Feb 28 02:56 tty59
crw--w----. 1 root tty       4,   6 Feb 28 02:56 tty6
crw--w----. 1 root tty       4,  60 Feb 28 02:56 tty60
crw--w----. 1 root tty       4,  61 Feb 28 02:56 tty61
crw--w----. 1 root tty       4,  62 Feb 28 02:56 tty62
crw--w----. 1 root tty       4,  63 Feb 28 02:56 tty63
crw--w----. 1 root tty       4,   7 Feb 28 02:56 tty7
crw--w----. 1 root tty       4,   8 Feb 28 02:56 tty8
crw--w----. 1 root tty       4,   9 Feb 28 02:56 tty9
crw-rw----. 1 root dialout   4,  64 Feb 28 02:56 ttyS0
crw-rw----. 1 root dialout   4,  65 Feb 28 02:56 ttyS1
crw-rw----. 1 root dialout   4,  66 Feb 28 02:56 ttyS2
crw-rw----. 1 root dialout   4,  67 Feb 28 02:56 ttyS3
crw-------. 1 root root     10, 239 Feb 28 02:56 uhid
crw-------. 1 root root     10, 223 Feb 28 02:56 uinput
crw-rw-rw-. 1 root root      1,   9 Feb 28 02:56 urandom
crw-------. 1 root root    247,   0 Feb 28 02:56 usbmon0
crw-------. 1 root root    247,   1 Feb 28 02:56 usbmon1
crw-------. 1 root root    247,   2 Feb 28 02:56 usbmon2
crw-rw----. 1 root tty       7,   0 Feb 28 02:56 vcs
crw-rw----. 1 root tty       7,   1 Feb 28 02:56 vcs1
crw-rw----. 1 root tty       7,   2 Feb 28 02:56 vcs2
crw-rw----. 1 root tty       7,   3 Feb 28 02:56 vcs3
crw-rw----. 1 root tty       7,   4 Feb 28 02:56 vcs4
crw-rw----. 1 root tty       7,   5 Feb 28 02:56 vcs5
crw-rw----. 1 root tty       7,   6 Feb 28 02:56 vcs6
crw-rw----. 1 root tty       7, 128 Feb 28 02:56 vcsa
crw-rw----. 1 root tty       7, 129 Feb 28 02:56 vcsa1
crw-rw----. 1 root tty       7, 130 Feb 28 02:56 vcsa2
crw-rw----. 1 root tty       7, 131 Feb 28 02:56 vcsa3
crw-rw----. 1 root tty       7, 132 Feb 28 02:56 vcsa4
crw-rw----. 1 root tty       7, 133 Feb 28 02:56 vcsa5
crw-rw----. 1 root tty       7, 134 Feb 28 02:56 vcsa6
drwxr-xr-x. 2 root root          60 Feb 28 02:56 vfio
crw-------. 1 root root     10,  63 Feb 28 02:56 vga_arbiter
crw-------. 1 root root     10, 137 Feb 28 02:56 vhci
crw-------. 1 root root     10, 238 Feb 28 02:56 vhost-net
crw-rw-rw-. 1 root root      1,   5 Feb 28 02:56 zero
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Why is your first disk kisted as sda? Did you configure it as AHCI? If yes, do the same for the second disk and it should show up as sdb. I don't know how to change disk interfaces in Linux after installation, sorry.
 
Top