From 3e6e749dfd0fb8a07cd5b78893e0da5e36c7fca8 Mon Sep 17 00:00:00 2001 From: Philip Guyton Date: Tue, 13 Aug 2019 19:42:23 +0100 Subject: [PATCH] [openSUSE] improve JeOS compatibility re ROOT label #2062 Summary of changes: - Change 'no root pool label' auto label mechanism to use 'ROOT'; in line with btrfs based openSUSE JeOS images. - Provide a mechanism to migrate existing source installs over to this new default: prior default was 'system'. --- conf/settings.conf.in | 2 +- conf/test-settings.conf.in | 2 +- src/rockstor/storageadmin/views/disk.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/conf/settings.conf.in b/conf/settings.conf.in index ba2f8668c..29ecca9f5 100644 --- a/conf/settings.conf.in +++ b/conf/settings.conf.in @@ -279,7 +279,7 @@ SFTP_MNT_ROOT = '/mnt3/' # System volume label when no btrfs volume label is set as per default openSUSE # install: ie 'btrfs fi show' gives 'Label: none' -SYS_VOL_LABEL = 'system' +SYS_VOL_LABEL = 'ROOT' TAP_DIR = '${django-settings-conf:taplib}' TAP_SERVER = ('127.0.0.1', ${django-settings-conf:tapport}) diff --git a/conf/test-settings.conf.in b/conf/test-settings.conf.in index b36f7e798..06991143b 100644 --- a/conf/test-settings.conf.in +++ b/conf/test-settings.conf.in @@ -266,7 +266,7 @@ SFTP_MNT_ROOT = '/mnt3/' # System volume label when no btrfs volume label is set as per default openSUSE # install: ie 'btrfs fi show' gives 'Label: none' -SYS_VOL_LABEL = 'system' +SYS_VOL_LABEL = 'ROOT' TAP_DIR = '${django-settings-conf:taplib}' TAP_SERVER = ('127.0.0.1', ${django-settings-conf:tapport}) diff --git a/src/rockstor/storageadmin/views/disk.py b/src/rockstor/storageadmin/views/disk.py index 421a70c16..9f45b2e48 100644 --- a/src/rockstor/storageadmin/views/disk.py +++ b/src/rockstor/storageadmin/views/disk.py @@ -324,7 +324,8 @@ def _update_disk_state(): # TODO: First call we reset none pool label member count times! # Corner case but room for efficiency improvement. # Consider building a list of pools relabeled to address issue. - if pool_name == 'none': + # N.B. 'system' for early source to rpm installs - openSUSE + if pool_name == 'none' or pool_name == 'system': pool_name = set_pool_label(p_info.uuid, dev_name, d.root) # Update our disk database entry with btrfs specific data. dob.devid = p_info.devid