[Please complete the below template with details of the problem reported on your Web-UI. Be as detailed as possible. Community members, including developers, shall try and help. Thanks for your time in reporting this issue! We recommend purchasing commercial support for expedited support directly from the developers.]
Brief description of the problem
Getting the following error when i try and remove a disk from the pool of disks. It gives the same error whichever of the 4 disks that i try and remove from the 4 i have installed
Detailed step by step instructions to reproduce the problem
Install 4 disks and then try and remove one
Web-UI screenshot
[Drag and drop the image here]
Error Traceback provided on the Web-UI
Traceback (most recent call last):
File "/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py", line 41, in _handle_exception
yield
File "/opt/rockstor/src/rockstor/storageadmin/views/pool.py", line 351, in put
'as it contains the operating system.' % pid)
TypeError: %d format: a number is required, not unicode
Your reported issue has 2 parts, the first is that the code is tripping up prior to displaying the intended error message.
This is evident from the following:
and I have opened an issue to address this first part:
It is an understood oversight caused by a recent change to the pool API that ‘upset’ our still old in some places errro string formatting method. From the following code we can see the intended error message:
Which leads to the second part of your issue. It appears that Rockstor has this pool down as hosting your Rockstor install rather than just your data, and edits to the pool hosting the OS are not supported. Can you tell us more about the arrangement of your pools? Was this install a default one where the ‘rockstor_rockstor’ pool consists of a single device? Have you manually (ie via the command line) altered your system pool, device wise. Bit of a mystery currently I’m afraid so more info on what lead up to your current arrangement might help.
Could you post the output from the following command executed as root on the Rockstor machine:
Glad to know it is a kind of bug and not wholly something I did myself is a relief.
As far as I can remember all I did was install one drive first and installed the OS and then I installed 3 more drives. I don’t think I did anything to these drives.
However after realizing how it was working I like my media on separate drives and wanted to remove these drive and get it separated.
Have not changed anything via the command line manually.
However I have tried changing different options ie: the cog, label and location link icons under the disk page. I have 4 drives on there and only 1 has the Rockstor system icon, the rest have a variety on the mentioned icons.
I can’t run that command as I have not been able to log in through the shell as I have tried all details given on google and in forum but nothing seems to work.
[Spiceworld@rockstor ~]$ btrfs fi show
ERROR: cannot open /dev/sda3: Permission denied
ERROR: cannot open /dev/sdc2: Permission denied
ERROR: cannot open /dev/sdb1: Permission denied
ERROR: cannot open /dev/sdd1: Permission denied
@Spiceworld Thanks for the update. Does look like we ‘allow’ something that we then don’t deal with elegantly here so would be good to see whats going on.
So the “Permission denied” is because you have not logged in as root. This is shown from the “Spiceworld@rockstor” line, ie user Spiceworld on machine named rockstor. If you logout and then in again using the user named “root” and the password that you assigned that user during the install, which is when that user was created, you should then have permission to run that command.
Let us know how you get on.
Also a picture / screen grab of the disk page may help as well.
Oh sorry: it’s the shell you would logout from as you had previously successfully logged in as the user Spiceworlk so I was attempting to retrace those successful steps but with the user “root”.
Are your doing this via a ssh program from a desktop machine over the network, via the built in shell system within Rockstor (ie System - System shell), or via a locally connected to Rockstor machine - keyboard and monitor?
If via the Rockstor embedded shell you can ‘substitute user’ Spiceworld for root by using the ‘su’ command. This is once in as Spiceworld you can then type ‘su’ and it will default to substituting the ‘root’ user and you enter the root users pass and you are then in as root. You can always find out who you are by looking at the command line prompt or typing “whoami”.
The reason I ask as to your method of shell access is that by default the embeded shell doesn’t allow for root login so one has to first login as a regular user and then substitute that (via su command as above) for another user (default root). This default can be changed via System - Services - Shell in a Box (spanner) - and change from LOGIN to SSH. The tooltip on that option explains the requirement for su command use when using the LOGIN method.
@Spiceworld Thanks for the disks page screen grab and command output.
Unfortunately your current system config is not looking good as it appears that you have 2 pools named rockstor_rockstor which is normally something we don’t allow but it appears we have slipped up on not protecting against this and it will have undetermined consequences: we do not account for identical named pools on a single install. On top of this your non system rockstor_rockstor pool (the one without /dev/sda3 as a member) indicates a missing device so is likely not mounted anyway. I have opened an additional issue to address this bug but have only initially guessed at how this circumstance came about.
Another caveat is that you would be best advised to stick to whole disks (the default) for your disk members. You appear to have at least 2 redirect roles in play. It removes an entire layer of complexity that is best not present. Ie next time you create your disks be sure to wipe the entire disks and use all of it without a redirect role. The text on the disk role / format page has guidance on this.
Definitely something we shouldn’t have allowed, btrfs and linux are vastly more flexible than Rockstor’s appliance projection but our ‘simplified’ UI/systems inevitably constrain that flexibility in an attempt to make more accessible the most pertinent capabilities. In your case we have failed to constrain the creation of a config that we can’t then deal with properly. As such this is a great find and any info on exactly what you did to get ‘here’ would be helpful.
Which leads us to:
Yes; how it was working was not as intended, as we also try (and in this case failed) to encourage a separation between system disk (we only assume one) and data pools. What appears to have happened was definitely not intended and I would suggest that you ‘start over’ with a fresh install and make sure that you name your first pool as something other than rockstor_rockstor or whatever the existing pool is called. I was not aware that we allowed this so this is definitely a great find but your system is now in uncharted and unintended waters. Apologies for this bug and please do contribute more of any info about how it came about as it would be a great one to help avoid in the future. It may well be possible to rectify this config via command line but I wouldn’t advise this unless you are fairly conversant with such things as there are multiple issue that need resolving, ie establish a unique label for the data pool and address the missing device component of that pool. Hence the suggestion of a ‘fresh start’.
Hope that helps and thanks for the discovery. The essence of you issue now is a missing disk on a pool with the same name/label (but different member devices) as your system pool, which is the default /dev/sda3. And we don’t deal with more than one pool or share of the same name hence the potentially confused UI. Although the ‘r’ icon is correctly identifying the system disk.
Let us know how it goes.
Linking to the issue created as a result of your report, thanks:
Thats good that i have helped find a fews bugs by not knowing what i was doing.
I’m one of those people that thinks i know what i’m doing but generally just cause my own problems by not reading the instructions first
I would have and am going to do a fresh install as i kind of understand a bit better how it works now. I have only thrown it together on an old computer and a few hard drives that were laying around before investing in better hardware.