Skip to content

Commit

Permalink
Merge pull request #1876 from phillxnet/1866_improve_user_messaging_r…
Browse files Browse the repository at this point in the history
…e_system_disk_no_serial

improve user messaging re system disk no serial. Fixes #1866
  • Loading branch information
schakrava authored Jan 3, 2018
2 parents b608b70 + 7388b39 commit 92a5f48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@
<td>
{{#checkSerialStatus this.serial this.name}}
<div class="alert alert-danger"><h4>Warning! Disk unusable as pool member - serial number is not legitimate or unique.</h4>Disk names may change unfavourably upon reboot leading to inadvertent drive reallocation and potential data loss. This error is caused by the source of these disks such as your Hypervisor or SAN.
Please ensure that disks are provided with unique serial numbers before proceeding further.</div>
Please ensure that disks are provided with unique serial numbers before proceeding further.
See our <a href="http://rockstor.com/docs/quickstart.html#minimum-system-requirements" target="_blank">Minimum system requirements</a> for VMware config.</div>
{{else if this.serial}}
{{this.serial}}
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#disks/blink/{{this.id}}" title="A tool to physically identify the hard drive with this serial number." rel="tooltip">
Expand Down
6 changes: 4 additions & 2 deletions src/rockstor/storageadmin/views/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from rest_framework.response import Response
from django.db import transaction
from storageadmin.models import (Disk, Pool, Share)
from fs.btrfs import (enable_quota, btrfs_uuid, mount_root,
from fs.btrfs import (enable_quota, mount_root,
get_pool_info, pool_raid)
from storageadmin.serializers import DiskInfoSerializer
from storageadmin.util import handle_exception
Expand Down Expand Up @@ -325,7 +325,9 @@ def _update_disk_state():
dob.save()
p.size = p.usage_bound()
enable_quota(p)
p.uuid = btrfs_uuid(dob.name)
# scan_disks() has already acquired our fs uuid so inherit it.
# We have already established btrfs as the fs type.
p.uuid = d.uuid
p.save()
# save our updated db disk object
dob.save()
Expand Down

0 comments on commit 92a5f48

Please sign in to comment.