[SOLVED]Error running command scan for disks in ui

Brief description of the problem

Added physical disks via VMWare Workstation. ON CLI I see them without problem, there are not formated, but initialized.
Seems like the UI / the triggered command is only allowed to have to deal with btrfs volumes

Detailed step by step instructions to reproduce the problem

didn’t try to reproduce since this would mean to create a second vm and not use the drives in the meantime.<img

Web-UI screenshot

Error Traceback provided on the Web-UI

        Traceback (most recent call last):

File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 40, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/disk.py”, line 272, in post
return self._update_disk_state()
File “/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/utils/decorators.py”, line 145, in inner
return func(*args, **kwargs)
File “/opt/rockstor/src/rockstor/storageadmin/views/disk.py”, line 218, in _update_disk_state
p.uuid = btrfs_uuid(dob.name)
File “/opt/rockstor/src/rockstor/fs/btrfs.py”, line 985, in btrfs_uuid
[BTRFS, ‘filesystem’, ‘show’, ‘/dev/disk/by-id/%s’ % disk])
File “/opt/rockstor/src/rockstor/system/osi.py”, line 109, in run_command
raise CommandException(cmd, out, err, rc)
CommandException: Error running a command. cmd = [‘/sbin/btrfs’, ‘filesystem’, ‘show’, ‘/dev/disk/by-id/sda3’]. rc = 1. stdout = [‘’]. stderr = [‘ERROR: not a valid btrfs filesystem: /dev/disk/by-id/sda3’, ‘’]

interesting…

[root@rockstor ~]# mkfs.btrfs /dev/sde btrfs-progs v4.8.3 See http://btrfs.wiki.kernel.org for more information.

/dev/sde appears to contain an existing filesystem (btrfs).
ERROR: use the -f option to force overwrite of /dev/sde

I can assure you that the file-system was ntfs… there was an vhdx-file on it, containing btrfs from an previous installation.

same error after using mkfs.btrfs -f

        Traceback (most recent call last):

File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 40, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/disk.py”, line 272, in post
return self._update_disk_state()
File “/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/utils/decorators.py”, line 145, in inner
return func(*args, **kwargs)
File “/opt/rockstor/src/rockstor/storageadmin/views/disk.py”, line 218, in _update_disk_state
p.uuid = btrfs_uuid(dob.name)
File “/opt/rockstor/src/rockstor/fs/btrfs.py”, line 985, in btrfs_uuid
[BTRFS, ‘filesystem’, ‘show’, ‘/dev/disk/by-id/%s’ % disk])
File “/opt/rockstor/src/rockstor/system/osi.py”, line 109, in run_command
raise CommandException(cmd, out, err, rc)
CommandException: Error running a command. cmd = [’/sbin/btrfs’, ‘filesystem’, ‘show’, ‘/dev/disk/by-id/sda3’]. rc = 1. stdout = [’’]. stderr = [‘ERROR: not a valid btrfs filesystem: /dev/disk/by-id/sda3’, ‘’]

@Henning Hello again. From the error report it would seem like the drives you have added do not have udev by-id entries. This can happen from not assigning them unique serial numbers, either that or there is a serial clash with sda3.

Rockstor requires that all drives have a /dev/disk/by-id listing created by udev, which in turn creates these entries based on the devices serial numbers.

Hope that helps.

Your more recent posts re mkfs.btrfs are purely btrfs related and it is advisable to wipe drives prior to their use anyway.
Once the serial problem is sorted this can be done in the Disk page.

@phillxnet makes sence :slight_smile:
so quick question: why is udev missing on sda3 when sda is an vdisk created on creating the VM. In other words sda didn’t exist before and the first one who touched it was rockstor on installation.

The only things I did:
create VM, add the physical (big) drives to it and install rockstor.

How to fix this? Recreate the vm?

current status:

[root@rockstor ~]# lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,UUID NAME FSTYPE SIZE MOUNTPOINT LABEL UUID sdd ext4 2.7T 233f3f58-6f34-419c-9cee-70b0bb421e6b sdb ext4 2.7T 13a5e289-a48e-4b15-96ca-d60e8a3c24c3 sr0 779M sde ext4 2.7T 89289f53-e10f-46e1-9389-f740b8f08363 sdc ext4 2.7T ca6a098c-016c-40dd-a2da-796b530d3bcd sda 20G ├─sda2 swap 2G [SWAP] 346a2cd3-f2cc-4e3a-bbc3-fad8625e323a ├─sda3 btrfs 17.5G /mnt2/rockstor_rockstor rockstor_rockstor 8de8e405-2e92-48fa-a708-eb997e36cad8 └─sda1 ext4 500M /boot 905def45-d87d-4586-8211-9ad261d8d5b0 [root@rockstor ~]# any hint?