Unable to create volume (virtualbox + 4 200 Mbytes disks)

Discussion in 'Storage' started by tristezo2k, Apr 20, 2012.

  1. Offline

    tristezo2k

    Member Since:
    Apr 20, 2012
    Messages:
    4
    Message Count:
    4
    Likes Received:
    0
    Trophy Points:
    0
    tristezo2k, Apr 20, 2012

    I am testing FreeNAS on a Virtualbox VM.
    I have
    1 x 2 Gigs IDE for the OS + cdrom (ada0)
    4 x 200 Mbytes scsi disk (da0,1,2,3)
    I try to create a 4 disk RAIDZ, but it always fails. Tried zfs mirror too, same problem
    Log says:
    Apr 20 07:37:18 freenas freenas[2197]: Executing: swapoff -a
    Apr 20 07:37:19 freenas freenas[2197]: Executing: geom disk list da0 | grep 'Stripesize: 4096'
    Apr 20 07:37:19 freenas freenas[2197]: Executing: geom disk list da0 | grep 'Sectorsize: 512'
    Apr 20 07:37:19 freenas freenas[2197]: Executing: dd if=/dev/zero of=/dev/da0 bs=1m count=1
    Apr 20 07:37:19 freenas freenas: 1+0 records in
    Apr 20 07:37:19 freenas freenas: 1+0 records out
    Apr 20 07:37:19 freenas freenas: 1048576 bytes transferred in 0.011298 secs (92811246 bytes/sec)
    Apr 20 07:37:19 freenas freenas[2197]: Executing: dd if=/dev/zero of=/dev/da0 bs=1m oseek=`diskinfo da0 | awk '{print int($3 / (1024*1024)) - 4;}'`
    Apr 20 07:37:19 freenas freenas: dd: /dev/da0: end of device
    Apr 20 07:37:19 freenas freenas: 5+0 records in
    Apr 20 07:37:19 freenas freenas: 4+0 records out
    Apr 20 07:37:19 freenas freenas: 4194304 bytes transferred in 0.040849 secs (102678328 bytes/sec)
    Apr 20 07:37:19 freenas freenas[2197]: Popen()ing: gpart create -s gpt /dev/da0
    Apr 20 07:37:19 freenas freenas[2197]: Popen()ing: gpart add -b 128 -t freebsd-swap -s 4194304 da0

    Remarks:
    1) Not a clue why it runs swapoff -a when creating a volume.
    2)my diskinfo /dev/da0 says:
    [root@freenas] ~# diskinfo /dev/da0
    /dev/da0 512 209715200 409600 0 0 200 64 32
    and
    [root@freenas] ~# geom disk list da0
    Geom name: da0
    Providers:
    1. Name: da0
    Mediasize: 209715200 (200M)
    Sectorsize: 512
    Mode: r0w0e0
    fwsectors: 32
    fwheads: 64

    3) Maybe freeNAS is willing to create swap. I found that it didn't mount procfs (5), so I manually added to fstab
    swapinfo shows empty and my fstab reads:

    [root@freenas] ~# swapinfo
    Device 1K-blocks Used Avail Capacity
    [root@freenas] ~# cat /etc/fstab
    /dev/ufs/FreeNASs1a / ufs ro 1 1
    /dev/ufs/FreeNASs3 /cfg ufs rw,noauto 2 2
    /dev/ufs/FreeNASs4 /data ufs rw,noatime 2 2
    proc /proc procfs rw 0 0

    I just installed FreeNAS with a default instalation. Maybe I am doing something wrong.
    REgards
    Sebastian
  2. Offline

    tristezo2k

    Member Since:
    Apr 20, 2012
    Messages:
    4
    Message Count:
    4
    Likes Received:
    0
    Trophy Points:
    0
    tristezo2k, Apr 20, 2012

    I just reinstalled again to check the installation process.
    I am installing FreeNAS from FreeNAS-8.0.4-RELEASE-p1-x64.iso
    Put the OS disk and cdrom on a sata controller (ada0 and cd0) and all 4 x 200 Mbytes on an LSI Scsi controller.

    During the first boot:
    [root@freenas] ~# df
    Filesystem 1K-blocks Used Avail Capacity Mounted on
    /dev/ufs/FreeNASs1a 948903 387933 485058 44% /
    devfs 1 1 0 100% /dev
    /dev/md0 4663 1851 2439 43% /etc
    /dev/md1 823 1 756 0% /mnt
    /dev/md2 152791 9436 131132 7% /var
    /dev/ufs/FreeNASs4 20263 360 18282 2% /data
    [root@freenas] ~# swapinfo
    Device 1K-blocks Used Avail Capacity
    [root@freenas] ~# cat /etc/fstab
    /dev/ufs/FreeNASs1a / ufs ro 1 1
    /dev/ufs/FreeNASs3 /cfg ufs rw,noauto 2 2
    /dev/ufs/FreeNASs4 /data ufs rw,noatime 2 2
    [root@freenas] ~# gpart show /dev/ada0
    => 63 8388513 ada0 MBR (4.0G)
    63 1930257 1 freebsd [active] (943M)
    1930320 63 - free - (32K)
    1930383 1930257 2 freebsd (943M)
    3860640 3024 3 freebsd (1.5M)
    3863664 41328 4 freebsd (20M)
    3904992 4483584 - free - (2.1G)

    It still fails in the same way:
    Apr 20 04:11:23 freenas freenas[2083]: Executing: swapoff -a
    Apr 20 04:11:23 freenas freenas[2083]: Executing: geom disk list da0 | grep 'Stripesize: 4096'
    Apr 20 04:11:24 freenas freenas[2083]: Executing: geom disk list da0 | grep 'Sectorsize: 512'
    Apr 20 04:11:24 freenas freenas[2083]: Executing: dd if=/dev/zero of=/dev/da0 bs=1m count=1
    Apr 20 04:11:24 freenas freenas: 1+0 records in
    Apr 20 04:11:24 freenas freenas: 1+0 records out
    Apr 20 04:11:24 freenas freenas: 1048576 bytes transferred in 0.081347 secs (12890164 bytes/sec)
    Apr 20 04:11:24 freenas freenas[2083]: Executing: dd if=/dev/zero of=/dev/da0 bs=1m oseek=`diskinfo da0 | awk '{print int($3 / (1024*1024)) - 4;}'`
    Apr 20 04:11:24 freenas freenas: dd: /dev/da0: end of device
    Apr 20 04:11:24 freenas freenas: 5+0 records in
    Apr 20 04:11:24 freenas freenas: 4+0 records out
    Apr 20 04:11:24 freenas freenas: 4194304 bytes transferred in 0.032286 secs (129911208 bytes/sec)
    Apr 20 04:11:24 freenas freenas[2083]: Popen()ing: gpart create -s gpt /dev/da0
    Apr 20 04:11:24 freenas freenas[2083]: Popen()ing: gpart add -b 128 -t freebsd-swap -s 4194304 da0


    My questions:
    1- Isn't weird FreeNAS doesn't create the /proc entry in fstab?
    2- Should it create swap? for some reason it doesn't
    3-After 10 years with Linux and Solaris, I feel like a baby toddling on FreeBSD. The whole geom + fdisk + disklabels is quite new for me, so feel free to ask for data if I am not including the expected.

    THanks in advance.
    Sebastian
  3. Offline

    b1ghen

    Member Since:
    Oct 19, 2011
    Messages:
    113
    Message Count:
    113
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Sweden
    b1ghen, Apr 20, 2012

    I don't know if this is your problem but it sounds like it might be, I have run several instances of Freenas under Virtualbox but always with 4GB or larger drives.

    By default 2GB of each disk will be used for swap, try increasing your disk size or disable swap completely by entering 0 under Settings -> Advanced -> Swap size on each drive in GiB
  4. Offline

    tristezo2k

    Member Since:
    Apr 20, 2012
    Messages:
    4
    Message Count:
    4
    Likes Received:
    0
    Trophy Points:
    0
    tristezo2k, Apr 20, 2012

    I was not aware if tried to create swap in each of the disks. Makes sense to some extent now.
    Will try that and come back to report

    THanks!
    Sebastian
  5. Offline

    tristezo2k

    Member Since:
    Apr 20, 2012
    Messages:
    4
    Message Count:
    4
    Likes Received:
    0
    Trophy Points:
    0
    tristezo2k, Apr 20, 2012

    Good! It is working now:
    Apr 20 08:59:11 freenas freenas[2083]: Executing: swapoff -a
    Apr 20 08:59:11 freenas freenas[2083]: Executing: geom disk list da0 | grep 'Stripesize: 4096'
    Apr 20 08:59:11 freenas freenas[2083]: Executing: geom disk list da0 | grep 'Sectorsize: 512'
    Apr 20 08:59:12 freenas freenas[2083]: Executing: dd if=/dev/zero of=/dev/da0 bs=1m count=1
    Apr 20 08:59:12 freenas freenas: 1+0 records in
    Apr 20 08:59:12 freenas freenas: 1+0 records out
    Apr 20 08:59:12 freenas freenas: 1048576 bytes transferred in 0.038175 secs (27467533 bytes/sec)
    Apr 20 08:59:12 freenas freenas[2083]: Executing: dd if=/dev/zero of=/dev/da0 bs=1m oseek=`diskinfo da0 | awk '{print int($3 / (1024*1024)) - 4;}'`
    Apr 20 08:59:12 freenas freenas: dd: /dev/da0: end of device
    Apr 20 08:59:12 freenas freenas: 5+0 records in
    Apr 20 08:59:12 freenas freenas: 4+0 records out
    Apr 20 08:59:12 freenas freenas: 4194304 bytes transferred in 0.035004 secs (119823087 bytes/sec)
    Apr 20 08:59:12 freenas freenas[2083]: Popen()ing: gpart create -s gpt /dev/da0
    Apr 20 08:59:12 freenas freenas[2083]: Popen()ing: gpart add -b 128 -t freebsd-zfs da0
    Apr 20 08:59:12 freenas freenas[2083]: Popen()ing: gpart bootcode -b /boot/pmbr-datadisk /dev/da0
    Apr 20 08:59:12 freenas freenas[2083]: Executing: dd if=/dev/zero of=/dev/da1 bs=1m count=1
    Apr 20 08:59:12 freenas freenas: 1+0 records in
    Apr 20 08:59:12 freenas freenas: 1+0 records out
    Apr 20 08:59:12 freenas freenas: 1048576 bytes transferred in 0.016782 secs (62482014 bytes/sec)
    Apr 20 08:59:12 freenas freenas[2083]: Executing: dd if=/dev/zero of=/dev/da1 bs=1m oseek=`diskinfo da1 | awk '{print int($3 / (1024*1024)) - 4;}'`
    Apr 20 08:59:12 freenas freenas: dd: /dev/da1: end of device
    Apr 20 08:59:12 freenas freenas: 5+0 records in
    Apr 20 08:59:12 freenas freenas: 4+0 records out
    Apr 20 08:59:12 freenas freenas: 4194304 bytes transferred in 0.040090 secs (104621981 bytes/sec)
    Apr 20 08:59:12 freenas freenas[2083]: Popen()ing: gpart create -s gpt /dev/da1
    Apr 20 08:59:12 freenas freenas[2083]: Popen()ing: gpart add -b 128 -t freebsd-zfs da1
    Apr 20 08:59:12 freenas freenas[2083]: Popen()ing: gpart bootcode -b /boot/pmbr-datadisk /dev/da1
    Apr 20 08:59:12 freenas freenas[2083]: Executing: dd if=/dev/zero of=/dev/da2 bs=1m count=1
    Apr 20 08:59:12 freenas freenas: 1+0 records in
    Apr 20 08:59:12 freenas freenas: 1+0 records out
    Apr 20 08:59:12 freenas freenas: 1048576 bytes transferred in 0.064873 secs (16163524 bytes/sec)
    Apr 20 08:59:12 freenas freenas[2083]: Executing: dd if=/dev/zero of=/dev/da2 bs=1m oseek=`diskinfo da2 | awk '{print int($3 / (1024*1024)) - 4;}'`
    Apr 20 08:59:13 freenas freenas: dd: /dev/da2: end of device
    Apr 20 08:59:13 freenas freenas: 5+0 records in
    Apr 20 08:59:13 freenas freenas: 4+0 records out
    Apr 20 08:59:13 freenas freenas: 4194304 bytes transferred in 0.039639 secs (105812569 bytes/sec)
    Apr 20 08:59:13 freenas freenas[2083]: Popen()ing: gpart create -s gpt /dev/da2
    Apr 20 08:59:13 freenas freenas[2083]: Popen()ing: gpart add -b 128 -t freebsd-zfs da2
    Apr 20 08:59:13 freenas freenas[2083]: Popen()ing: gpart bootcode -b /boot/pmbr-datadisk /dev/da2
    Apr 20 08:59:13 freenas freenas[2083]: Executing: dd if=/dev/zero of=/dev/da3 bs=1m count=1
    Apr 20 08:59:13 freenas freenas: 1+0 records in
    Apr 20 08:59:13 freenas freenas: 1+0 records out
    Apr 20 08:59:13 freenas freenas: 1048576 bytes transferred in 0.078243 secs (13401528 bytes/sec)
    Apr 20 08:59:13 freenas freenas[2083]: Executing: dd if=/dev/zero of=/dev/da3 bs=1m oseek=`diskinfo da3 | awk '{print int($3 / (1024*1024)) - 4;}'`
    Apr 20 08:59:13 freenas freenas: dd: /dev/da3: end of device
    Apr 20 08:59:13 freenas freenas: 5+0 records in
    Apr 20 08:59:13 freenas freenas: 4+0 records out
    Apr 20 08:59:13 freenas freenas: 4194304 bytes transferred in 0.038887 secs (107859365 bytes/sec)
    Apr 20 08:59:13 freenas freenas[2083]: Popen()ing: gpart create -s gpt /dev/da3
    Apr 20 08:59:13 freenas freenas[2083]: Popen()ing: gpart add -b 128 -t freebsd-zfs da3
    Apr 20 08:59:13 freenas freenas[2083]: Popen()ing: gpart bootcode -b /boot/pmbr-datadisk /dev/da3
    Apr 20 08:59:13 freenas freenas[2083]: Popen()ing: zpool create -o cachefile=/data/zfs/zpool.cache -O aclmode=passthrough -O aclinherit=passthrough -f -m /mnt/test -o altroot=/mnt test raidz /dev/da0p1 /dev/da1p1 /dev/da2p1 /dev/da3p1
    Apr 20 08:59:14 freenas kernel: ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present;
    Apr 20 08:59:14 freenas kernel: to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf.
    Apr 20 08:59:14 freenas kernel: ZFS filesystem version 4
    Apr 20 08:59:14 freenas kernel: ZFS storage pool version 15
    Apr 20 08:59:15 freenas freenas[2083]: Popen()ing: zfs inherit mountpoint test
    Apr 20 08:59:15 freenas freenas[2083]: Executing: zpool set cachefile=/data/zfs/zpool.cache test
    Apr 20 08:59:15 freenas freenas[2083]: Executing: /usr/sbin/service ix-smartd quietstart
    Apr 20 08:59:18 freenas freenas[2083]: Executing: /usr/sbin/service smartd restart
    Apr 20 08:59:18 freenas freenas: Will not 'restart' smartd because smartd_enable is NO.
    Apr 20 08:59:18 freenas freenas[2083]: Executing: /usr/sbin/service ix-fstab quietstart
    Apr 20 08:59:21 freenas freenas[2083]: Executing: /usr/sbin/service swap1 quietstart
    Apr 20 08:59:21 freenas freenas[2083]: Executing: /usr/sbin/service mountlate quietstart
    Apr 20 08:59:21 freenas freenas[2083]: Executing: /usr/sbin/service ix-collectd quietstart
    Apr 20 08:59:21 freenas freenas[2083]: Executing: /usr/sbin/service collectd restart
    Apr 20 08:59:22 freenas freenas: Stopping collectd.
    Apr 20 08:59:22 freenas freenas: Waiting for PIDS: 2175.
    Apr 20 08:59:22 freenas freenas: Starting collectd.
    Apr 20 08:59:24 freenas freenas[2083]: Popen()ing: /sbin/zfs list -H -o name,volsize -t volume -r test


    [root@freenas] ~# zpool status -v
    pool: test
    state: ONLINE
    scrub: none requested
    config:

    NAME STATE READ WRITE CKSUM
    test ONLINE 0 0 0
    raidz1 ONLINE 0 0 0
    da0p1 ONLINE 0 0 0
    da1p1 ONLINE 0 0 0
    da2p1 ONLINE 0 0 0
    da3p1 ONLINE 0 0 0

    errors: No known data errors

    [root@freenas] ~# zpool list test
    NAME SIZE USED AVAIL CAP HEALTH ALTROOT
    test 780M 195K 780M 0% ONLINE /mnt

    thanks!
    Sebastian

Share This Page