Closed tobiashochguertel closed 7 years ago
the samba share "share-backup" was sharing the share "backup" from the "Shares" menu from Storage. The "Share" with name "backup" is also not longer available.
I notice yesterday that I wasn't able to create an Storage->Samba-Share with the same name as a Storage->Share. The Web-UI told me that it isn't possible to create an Share with same name. That's the reason why my samba-share got the name "share-backup".
I saw that I've got an rockstor update via yum, but the UI version doesn't change, may be the underling backend got an new version which applies a fix in this area where I get this issue?
My try to add again the Storage->Share with name "backup" again, is not possible.
Traceback (most recent call last):
File "/opt/rockstor/eggs/gunicorn-0.16.1-py2.7.egg/gunicorn/workers/sync.py", line 34, in run
client, addr = self.socket.accept()
File "/usr/lib64/python2.7/socket.py", line 202, in accept
sock, addr = self._sock.accept()
error: [Errno 11] Resource temporarily unavailable
my try to edit an existing Storage->pool shows me an additional error:
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/pool_balance.py", line 49, in get_queryset
self._balance_status(pool)
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/pool_balance.py", line 73, in _balance_status
cur_status = balance_status(pool)
File "/opt/rockstor/src/rockstor/fs/btrfs.py", line 950, in balance_status
mnt_pt = mount_root(pool)
File "/opt/rockstor/src/rockstor/fs/btrfs.py", line 238, in mount_root
run_command(mnt_cmd)
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 = ['/bin/mount', '/dev/disk/by-label/backup', '/mnt2/backup', '-o', ',compress=no']. rc = 32. stdout = ['']. stderr = ['mount: wrong fs type, bad option, bad superblock on /dev/sdb,', ' missing codepage or helper program, or other error', '', ' In some cases useful info is found in syslog - try', ' dmesg | tail or so.', '']
My try to create an Storage->Share shows me the following error:
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/share.py", line 170, in post
pqid = qgroup_create(pool)
File "/opt/rockstor/src/rockstor/fs/btrfs.py", line 668, in qgroup_create
mnt_pt = mount_root(pool)
File "/opt/rockstor/src/rockstor/fs/btrfs.py", line 238, in mount_root
run_command(mnt_cmd)
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 = ['/bin/mount', '/dev/disk/by-label/backup', '/mnt2/backup', '-o', ',compress=no']. rc = 32. stdout = ['']. stderr = ['mount: wrong fs type, bad option, bad superblock on /dev/sdb,', ' missing codepage or helper program, or other error', '', ' In some cases useful info is found in syslog - try', ' dmesg | tail or so.', '']
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/share.py", line 170, in post
pqid = qgroup_create(pool)
File "/opt/rockstor/src/rockstor/fs/btrfs.py", line 668, in qgroup_create
mnt_pt = mount_root(pool)
File "/opt/rockstor/src/rockstor/fs/btrfs.py", line 238, in mount_root
run_command(mnt_cmd)
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 = ['/bin/mount', '/dev/disk/by-label/backup', '/mnt2/backup', '-o', ',compress=no']. rc = 32. stdout = ['']. stderr = ['mount: wrong fs type, bad option, bad superblock on /dev/sdb,', ' missing codepage or helper program, or other error', '', ' In some cases useful info is found in syslog - try', ' dmesg | tail or so.', '']
I think it would be helpfully to attach th rockstor.log
The Samba Share is still existing in the samba.conf file:
[root@rockstor samba]# cat smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = root
create mask = 0664
directory mask = 0775
####BEGIN: Rockstor SAMBA CONFIG####
[share-backup]
root preexec = "/opt/rockstor/bin/mnt-share share-backup"
root preexec close = yes
comment =
path = /mnt2/share-backup
browseable = yes
read only = no
guest ok = no
admin users = admin hochguertelto
####END: Rockstor SAMBA CONFIG####
[root@rockstor samba]#
Hi @tobiashochguertel , usually never had issues with samba shares through system reboots.
Back to your update:
It could be that the samba share isn't persistent in the database or after upgrade previous persist shares are removed? No
Sometimes samba updates try to overwrite current samba config, but usually you get asked about this
Reading issues both on shares & pools I think this is on a lower level, had a quick read to your Rockstor logs and it seems about disks too:
[04/Mar/2017 19:39:02] ERROR [storageadmin.views.disk:255] Error running a command. cmd = ['/usr/sbin/smartctl', '--info', '/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001110405102123-0:0']. rc = 1. stdout = ['smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.8.7-1.el7.elrepo.x86_64] (local build)', 'Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org', '', '/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001110405102123-0:0: Unknown USB bridge [0x0781:0x5583 (0x100)]', 'Please specify device type with the -d option.', '', 'Use smartctl -h to get a usage summary', '', '']. stderr = ['']
Traceback (most recent call last):
File "/opt/rockstor/src/rockstor/storageadmin/views/disk.py", line 253, in _update_disk_state
do.name, do.smart_options)
File "/opt/rockstor/src/rockstor/system/smart.py", line 316, in available
[SMART, '--info'] + get_dev_options(device, custom_options))
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 = ['/usr/sbin/smartctl', '--info', '/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001110405102123-0:0']. rc = 1. stdout = ['smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.8.7-1.el7.elrepo.x86_64] (local build)', 'Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org', '', '/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001110405102123-0:0: Unknown USB bridge [0x0781:0x5583 (0x100)]', 'Please specify device type with the -d option.', '', 'Use smartctl -h to get a usage summary', '', '']. stderr = ['']
[04/Mar/2017 19:39:03] ERROR [storageadmin.views.command:75] Exception while refreshing state for Pool(backup). Moving on: Error running a command. cmd = ['/bin/mount', '/dev/disk/by-label/backup', '/mnt2/backup', '-o', ',compress=no']. rc = 32. stdout = ['']. stderr = ['mount: wrong fs type, bad option, bad superblock on /dev/sdb,', ' missing codepage or helper program, or other error', '', ' In some cases useful info is found in syslog - try', ' dmesg | tail or so.', '']
[04/Mar/2017 19:39:03] ERROR [storageadmin.views.command:76] Error running a command. cmd = ['/bin/mount', '/dev/disk/by-label/backup', '/mnt2/backup', '-o', ',compress=no']. rc = 32. stdout = ['']. stderr = ['mount: wrong fs type, bad option, bad superblock on /dev/sdb,', ' missing codepage or helper program, or other error', '', ' In some cases useful info is found in syslog - try', ' dmesg | tail or so.', '']
Traceback (most recent call last):
File "/opt/rockstor/src/rockstor/storageadmin/views/command.py", line 65, in _refresh_pool_state
mount_root(p)
File "/opt/rockstor/src/rockstor/fs/btrfs.py", line 238, in mount_root
run_command(mnt_cmd)
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 = ['/bin/mount', '/dev/disk/by-label/backup', '/mnt2/backup', '-o', ',compress=no']. rc = 32. stdout = ['']. stderr = ['mount: wrong fs type, bad option, bad superblock on /dev/sdb,', ' missing codepage or helper program, or other error', '', ' In some cases useful info is found in syslog - try', ' dmesg | tail or so.', '']
[04/Mar/2017 19:40:03] ERROR [storageadmin.views.disk:255] Error running a command. cmd = ['/usr/sbin/smartctl', '--info', '/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001110405102123-0:0']. rc = 1. stdout = ['smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.8.7-1.el7.elrepo.x86_64] (local build)', 'Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org', '', '/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001110405102123-0:0: Unknown USB bridge [0x0781:0x5583 (0x100)]', 'Please specify device type with the -d option.', '', 'Use smartctl -h to get a usage summary', '', '']. stderr = ['']
Traceback (most recent call last):
File "/opt/rockstor/src/rockstor/storageadmin/views/disk.py", line 253, in _update_disk_state
do.name, do.smart_options)
File "/opt/rockstor/src/rockstor/system/smart.py", line 316, in available
[SMART, '--info'] + get_dev_options(device, custom_options))
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 = ['/usr/sbin/smartctl', '--info', '/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001110405102123-0:0']. rc = 1. stdout = ['smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.8.7-1.el7.elrepo.x86_64] (local build)', 'Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org', '', '/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001110405102123-0:0: Unknown USB bridge [0x0781:0x5583 (0x100)]', 'Please specify device type with the -d option.', '', 'Use smartctl -h to get a usage summary', '', '']. stderr = ['']
[04/Mar/2017 19:40:04] ERROR [storageadmin.views.command:75] Exception while refreshing state for Pool(backup). Moving on: Error running a command. cmd = ['/bin/mount', '/dev/disk/by-label/backup', '/mnt2/backup', '-o', ',compress=no']. rc = 32. stdout = ['']. stderr = ['mount: wrong fs type, bad option, bad superblock on /dev/sdb,', ' missing codepage or helper program, or other error', '', ' In some cases useful info is found in syslog - try', ' dmesg | tail or so.', '']
[04/Mar/2017 19:40:04] ERROR [storageadmin.views.command:76] Error running a command. cmd = ['/bin/mount', '/dev/disk/by-label/backup', '/mnt2/backup', '-o', ',compress=no']. rc = 32. stdout = ['']. stderr = ['mount: wrong fs type, bad option, bad superblock on /dev/sdb,', ' missing codepage or helper program, or other error', '', ' In some cases useful info is found in syslog - try', ' dmesg | tail or so.', '']
Traceback (most recent call last):
File "/opt/rockstor/src/rockstor/storageadmin/views/command.py", line 65, in _refresh_pool_state
mount_root(p)
File "/opt/rockstor/src/rockstor/fs/btrfs.py", line 238, in mount_root
run_command(mnt_cmd)
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 = ['/bin/mount', '/dev/disk/by-label/backup', '/mnt2/backup', '-o', ',compress=no']. rc = 32. stdout = ['']. stderr = ['mount: wrong fs type, bad option, bad superblock on /dev/sdb,', ' missing codepage or helper program, or other error', '', ' In some cases useful info is found in syslog - try', ' dmesg | tail or so.', '']
@phillxnet ?
M.
@MFlyer @phillxnet tell me if I shoudl provide more informations. The system is fresh, yesterday installed. Just started to play around and to evaluate rockstor as an solution for my nas to storage backups until these get archive on bluray discs.
Is the database of rockstor an mysql or an sqlite database, would it be helpfully to have the current state of the database?
@tobiashochguertel Rockstor runs over Django+PostgreSQL so working with Django ORM
Can you provide a disks page screenshot? M.
The current disk page screenshot:
I have to tell, that I have yesterday played around with the case that one drive is failed and get replaced. My drives are in an physical hot-swap case.
Name Serial Capacity Pool Power Status APM Model Transport Vendor S.M.A.R.T
ata-WDC_WD1001FALS-00E8B0_WD-WMATV3930586 WD-WMATV3930586 931.50 GB backup active/idle 20 minutes ??? WDC WD1001FALS-0 sata ATA ON OFF
ata-WDC_WD1001FALS-00E8B0_WD-WMATV3931443 WD-WMATV3931443 931.50 GB backup active/idle 20 minutes ??? WDC WD1001FALS-0 sata ATA ON OFF
usb-SanDisk_Ultra_Fit_4C530001110405102123-0:0-part3 4C530001110405102123 53.60 GB rockstor_rockstor unknown ??? Ultra Fit usb SanDisk Not Supported
@MFlyer I see 2 disk issues reported (from a quick look): The first is harmless and could be hushed by maybe adding a custom SMART option of "-d sat".
'/dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001110405102123-0:0: Unknown USB bridge [0x0781:0x5583 (0x100)]', 'Please specify device type with the -d option.'
But the second is an indication of a failed mount and could simply be an instance of issue #1547 where on rare occasions a mount by label (which is what we do) can fail. It's a know btrfs issue as explained and referenced in that issue.
['/bin/mount', '/dev/disk/by-label/backup', '/mnt2/backup', '-o', ',compress=no']. rc = 32. stdout = ['']. stderr = ['mount: wrong fs type, bad option, bad superblock on /dev/sdb ...
See my second posting in that issue, ie
btrfs device scan
Or it could be an indication of an unhealthy pool which btrfs currently defaults to not mounting. With the caveat that a repair is only possible on the first degraded mount as there after only read only mounts are permitted. It's a hotly debated default for btrfs which I hope will soon receive more attention: see: https://mail-archive.com/linux-btrfs@vger.kernel.org/msg61995.html for the most recent discussion on the list involving this default behaviour.
OK, while typing this response I see @tobiashochguertel has added a new post that fills in some info that may well relate to the know issue re 'btrfs device scan' requirements with live drive changes as drives were changed which I hadn't originally realise but fits.
So looks like mount not share issues as @MFlyer suspected.
The USB Disk usb-SanDisk_Ultra_Fit_4C530001110405102123-0:0:
is the drive with rockstor operation sytem installed. The other two drive's are both to store data - to store only backup data.
I don't really understand the keyword "degraded", what does it mean - or what have I to do?
Should it not be that the created shares and samba shares are always available also when a drive fails?
Hi @tobiashochguertel , your post about drive change probably explains your issue: Rockstor has some background routines checking disks/shares/pools state (those failing in your logs) and although your system supports hot swap, btrfs needs some specific steps to replace a disk. My suggestion is to have a new Rockstor installation to flush all db entries and start with a clean system.
Mirko
@MFlyer these steps to replace a disk are found in the following article of the rockstor documentation? http://rockstor.com/docs/data_loss.html#data-loss-prevention-and-recovery-in-raid1-pools
Reinstalling is okay, but I need to understand the way and steps to work with an harddrive fail in case of an real emergency. Currently I simulating an emergency case for raid1 fail.
Result of my first simulation is: My system is in an state of no way back - compelete data lose. Done by working with the Web-UI. I can't recover my data.
I was expecting: I tought that rockstor with the Web-Gui provides an human-friendly way to done these task via clicking around in the web-ui.
When I reinstalled the system, wiped all 3 drive's again and start again with an my cases of emergency simulation to train the reallity. Is the documentation up to date from above to replace an failed harddrive in raid1 (pool)?
Hi @tobiashochguertel ,
I was expecting: I tought that rockstor with the Web-Gui provides an human-friendly way to done these task via clicking around in the web-ui.
Currently data recovery over CLI, not via WebUI
@MFlyer Thanks for clarify.
For the posterity, the the steps for hard drive replace when failed is writen down in the documentation of rockstor http://rockstor.com/docs/data_loss.html#data-loss-prevention-and-recovery-in-raid1-pools.
I think we can close this issue now?
Hi @tobiashochguertel , if you agree you can close this issue :)
Obviously our plans are to have a nice recovery system via WebUI :wink:
@tobiashochguertel and @MFlyer Linking to partly relevant (as just disk replace) existing open issue:
Implement a disk replacement UI #1611
@tobiashochguertel Sorry forgot about:
"I don't really understand the keyword "degraded", what does it mean - or what have I to do?"
"degraded" is a mandatory mount option in order to successfully mount a pool which has, for example, a missing member, or other flagged issue. This option is not implemented by Rockstor and is generally only required during manual repair procedures as otherwise all mount efforts are rejected, which from Rockstor's perspective leaves empty shares as there is no backing pool to present data to those shares (sub-volumes).
My previously referenced link to the linux-btrfs mailing list shows some disagreement and acknowledgement on how this places btrfs aside from pretty much all other raid systems, where a degraded mount is default. Rockstor currently adheres to these defaults but that may change when we come to implement better disk and pool health reporting.
@MFlyer apologies if I'm butting in here.
@phillxnet thanks for answer my question. By the way, I've read the mailing list discussion. Was quite intressting :) I alos notice the updated btrfs.wiki article to yellow state for raid1. Yes I was expecting that a raid is a raid - so if something in a mirror raid went wrong the raid system will start the work from self to replicate the data to the new drive.
It bothers me that in the Ui all related entries disappear - but they are in the background even there. I can't access these configurations in Storage->shares and Storage->samba-shares any longer. So they are still there but not shown until the behind error (pool error, degraded state) is fixed as I
Would it be possible to highlight these entries "red" or with an different ui-behavior instead of complete not showing them?
If I can see these entries also when a error is behind them I will have a good user experience. In large environmens I can see quick which shares are effected by an error.
@schakrava : disk replacement related - there's another open issue -, I think we can close this not samba related
Mirko
@tobiashochguertel and @MFlyer I agree that this issue need to be close really. Useful to have highlighted known current limitations with btrfs and current requirement for degraded mount option and the also known limitation of pool status reporting. @tobiashochguertel If you are still in attendance with this issue then please feel free to close it (if @schakrava hasn't done so already) as I think we have now established that your expectation is not in line with current btrfs defaults and that we are currently falling short on pool health / mount status reporting. This is definitely on the road map and given recent disk management / reporting work the pool health / status reporting shouldn't be too far down the line.
Thanks for you contributions in this issue.
@schakrava I think we can close this one now as not well defined in itself and base Rockstor function re pool state reporting is understood as a future feature requirement but is not currently part of our existing (and near end) milestone.
I have closed the issue - but I'm not sure if this issue is not fixed or will be fixed because there are no related (linked) issues with this issue?
@tobiashochguertel Thanks. The problem with this issue was that is was not very focused. Ie started with samba shares not preserved over reboot (as well as repo key issues), which they are. And the initial title suggestion took @MFlyer, our samba person (among many other talents), off on a goose chase, however this turned out to be as an artefact of your tests, which you didn't initially introduce but showed up in the logs, re removing drives. This lead to links to btrfs default behaviour, which we currently follow: ergo the degraded mount option requirement discussion, pointers to btrfs mailing list etc.
As this is a very long and meandering tale involving a number of issues I thought it best that we 'tidy up' by attempting to have only more focused issues open as otherwise it takes quite a while for each developer to re-read what has gone before when it is already very well known by all developers that there is no pool health reporting and that once we have more of the fundamentals sorted we can move up to that level. By which time maybe the current work at facebook on multi-drive btrfs (one of this years focus points) and the long pending work by Anand Jain on adding drive health awareness to btrfs will help us on our way, ie btrfs has no current concept of a bad drive.
If you want to open a new clean issue with a focus on one item. Or a few issues, each focused on a single element of your original report, each with reproducible steps, then that would be a further contribution. There is no single issue here other than re-describing the behaviour of the test you performed but did not initially report: ie removed disks and pool didn't mount. But there is also repo key issue, which I haven't seen myself for a bit either.
So sorry to potentially come across as a little short but I think your contribution would be more valuable and accessible if it was distributed across maybe several more focused issues as the winding nature of this one (partly through your impression of how btrfs should work and our adhearing to current default bahaviour which is different from most current raid behaviour) has already take quite a while and hasn't really helped with development as much as it might have done.
You requested links to other issues, yet my attempted focus on another issue and it's link to this issue was what brought me to re-address and re-read this entire thread. That issue was "insufficient use of btrfs device scan" #1547 which I had linked to this issue on 4th march, the day you opened this issue and @MFlyer asked that I look to the disk side of your log entries. That issue in turn links to known behaviour and btrfs wiki entries confirming that behaviour and reproducible steps. The issue in turn linked to an only recently closed issue #550 which in turn also was related to the reproducible steps. The originally linked issue also contains the exact same report of drive mount failure I saw in your logs, hence the link (and it remains open). And as of #550 (closed as merged as of 15 days ago) also contains pool mount failure logging improvements that would further assist diagnosing what happened in your reported scenario specifically commit: https://github.com/phillxnet/rockstor-core/commit/3045722e8d85b3363dc6f10cac2c391dd7ebc332 which was one of 76 commits related to drive management, which follows on from another rather large pull request which itself deals with better drive categorisation / management #1622 (93 commits). The two referenced issues / pull requests in turn link to multiple other issues for context.
My suggestion in order to avoid these less focused issues is to first open a forum thread as it will one, get more eyes, and two, hopefully lead to the required focus in the GitHub issues themselves. All current members of the development team are very active on the forum so hopefully between us we can tease out what is already know and what is not so that we either open issues on that basis or request that particular reports be transferred to issues by the reporters.
Hope that helps and sorry if this is terse sounding, but focused issues are a must really. I've been picked up on the same myself in the past so appreciate how this could be coming across.
Thanks again for your efforts and rest assured that you are not being ignored. I think the many more eyes of the forum is the place to start with whittling down what is know and unknown behaviour though. And again feel free to open new issues on single topics with reproducible steps using current testing channel update releases.
Thanks for you understanding and efforts in making Rockstor better, bit by bit.
After these steps I recognized that my mounted CIFS (samba) share in Windows (10) wasn't not longer available - and reconnecting failed. I checked samba shares via web-ui and there was not longer my share "share-backup" listed.
It could be that the samba share isn't persistent in the database or after upgrade previous persist shares are removed?
E-Mail from Anarcron (bullet-point number 2):
Output of the manual
yum upgrade
via ssh (bullet-point number 3)