Bug #145

Error when adding ZFS volume

Added by Alex Sinotov about 3 years ago. Updated about 3 years ago.

Status:ClosedStart date:
Priority:UrgentDue date:
Assignee:-% Done:

0%

Category:GUI
Target version:8.0-RELEASE
Seen in:

Description

Can't add zfs volume to config and dataset (no such pool error)
In web see this:
test /mnt/test Error getting used space (Error) Error getting available space Error getting total space Error

OS Version: FreeBSD 8.2-RELEASE
FreeNAS Build: FreeNAS-8.0-RC1-amd64
Platform: AMD Phenom(tm) II N930 Quad-Core Processor

History

#1 Updated by Josh Paetzel about 3 years ago

Can you paste a screen shot of what the show volumes screen looks like? If you have familiarity with the CLI paste the output of the shell command mount.

#2 Updated by Alex Sinotov about 3 years ago

freenas# more /etc/fstab
/dev/ufs/FreeNASs1a / ufs ro 1 1
/dev/ufs/FreeNASs3 /cfg ufs rw,noauto 2 2
/dev/ufs/FreeNASs4 /data ufs rw 2 2

freenas# df
Filesystem          1K-blocks   Used Avail Capacity  Mounted on
/dev/ufs/FreeNASs1a    468735 394969 36267    92%    /
devfs                       1      1     0   100%    /dev
/dev/md0                 4526   2234  1930    54%    /etc
/dev/md1                  686      6   626     1%    /mnt
/dev/md2                76526   9546 60858    14%    /var
/dev/ufs/FreeNASs4      20263    318 18324     2%    /data

Add in GUI, after command to CLI

freenas# zfs list
no datasets available
freenas# zpool status -v
no pools available
freenas#

And create from CLI

freenas# zpool status -v
no pools available

freenas# zpool create -R /mnt testraidz da1 da2 da3

freenas# zpool status -v
  pool: testraidz
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        testraidz   ONLINE       0     0     0
          da1       ONLINE       0     0     0
          da2       ONLINE       0     0     0
          da3       ONLINE       0     0     0

errors: No known data errors
freenas# zfs list

NAME        USED  AVAIL  REFER  MOUNTPOINT
testraidz  85.5K  5.86G    21K  /mnt


if from cli - ok.

#3 Updated by David - about 3 years ago

Could this be related to creating and deleting pools within a single session? I had the same error shown here after:

1. Create ZFS pool tank with 6 x disks, raidz2
2. Create dataset tank/Media
3. Delete pool
4. Create pool tank (error state)
5. Delete pool
6. Create pool data - 10 x data, 2 x log, raidz2 (error as above)

#4 Updated by Philipp - about 3 years ago

Replying to [comment:5 DavidRa]:

Could this be related to creating and deleting pools within a single session? I had the same error shown here after:

1. Create ZFS pool tank with 6 x disks, raidz2
2. Create dataset tank/Media
3. Delete pool
4. Create pool tank (error state)
5. Delete pool
6. Create pool data - 10 x data, 2 x log, raidz2 (error as above)

I don't think so. I've got the same error here with a vanilla VMWare Player FreeNAS with 2 x 1GB SCSI (emulated) drives.

First thing I did after logging in the first time to the GUI was trying to set up a ZFS mirror volume. Got the same error...

#5 Updated by Jon Auer about 3 years ago

Are you setting per drive swap size to 0 under settings->advanced?

After doing that I get the same error.

/var/log/messages says:
<snip>

Mar 10 08:43:20 bnas1 freenasr1548: Executing: gpart create -s gpt /dev/da8 && gpart add -b 128 -t freebsd-swap -l swap-da8 -s 0 da8 && gpart add -t freebsd-zfs -l da8 da8
Mar 10 10:43:20 bnas1 freenas: da8 created
Mar 10 10:43:20 bnas1 freenas: gpart: size '0': Invalid argument
Mar 10 08:43:20 bnas1 freenasr1548: Executing: geom disk list da9 | grep 'Stripesize: 4096'
Mar 10 08:43:20 bnas1 freenasr1548: Executing: geom disk list da9 | grep 'Sectorsize: 512'
Mar 10 08:43:20 bnas1 freenasr1548: Executing: dd if=/dev/zero of=/dev/da9 bs=1m count=1
Mar 10 10:43:20 bnas1 freenas: 1+0 records in
Mar 10 10:43:20 bnas1 freenas: 1+0 records out
Mar 10 10:43:20 bnas1 freenas: 1048576 bytes transferred in 0.078140 secs (13419234 bytes/sec)
Mar 10 08:43:20 bnas1 freenasr1548: Executing: dd if=/dev/zero of=/dev/da9 bs=1m oseek=@diskinfo da9 | awk '{print ($3 / (1024*1024)) - 4;}'@
Mar 10 10:43:20 bnas1 freenas: dd: oseek: illegal numeric value
Mar 10 08:43:20 bnas1 freenasr1548: Executing: gpart create -s gpt /dev/da9 && gpart add -b 128 -t freebsd-swap -l swap-da9 -s 0 da9 && gpart add -t freebsd-zfs -l da9 da9
Mar 10 10:43:20 bnas1 freenas: da9 created
Mar 10 10:43:20 bnas1 freenas: gpart: size '0': Invalid argument
Mar 10 08:43:20 bnas1 freenasr1548: Executing: /usr/sbin/service ix-fstab quietstart
Mar 10 10:43:20 bnas1 freenas: find: /dev/gpt/: No such file or directory
Mar 10 08:43:20 bnas1 freenasr1548: Executing: /usr/sbin/service swap1 quietstart
Mar 10 08:43:20 bnas1 freenasr1548: Executing: /usr/sbin/service mountlate quietstart
Mar 10 08:43:20 bnas1 freenasr1548: Executing: zpool create -o cachefile=/data/zfs/zpool.cache -fm /mnt/pool0 pool0  raidz2 /dev/gpt/da0 /dev/gpt/da1 /dev/gpt/da10 /dev/gpt/da11 /dev/gpt/da12 /dev/gpt/da13 /dev/gpt/da14 /dev/gpt/da15 /dev/gpt/da2 /dev/gpt/da3 /dev/gpt/da4 /dev/gpt/da5 /dev/gpt/da6 /dev/gpt/da7 /dev/gpt/da8 /dev/gpt/da9
Mar 10 10:43:21 bnas1 freenas: cannot open '/dev/gpt/da0': No such file or directory

#6 Updated by Josh Paetzel about 3 years ago

  • Resolution set to fixed
  • Status changed from Unscreened to Closed

8.0-RC3 has this fix

#7 Updated by Xin Li about 3 years ago

Swap size has to be non-zero. I have added a validator for this, thanks for reporting this issue.

Also available in: Atom PDF