fix: Correct LV vs VG selection logic
The refresh_drives method was incorrectly showing VGs for all modes. Now correctly shows: - LVs for: lv_to_lv, lv_to_raw, lv_to_borg, files_to_borg - VGs for: vg_to_raw, vg_to_borg This fixes the issue where users couldn't select individual LVs.
This commit is contained in:
@@ -269,7 +269,7 @@ class SimpleBackupGUI:
|
|||||||
self.source_combo.grid(row=0, column=0, sticky=(tk.W, tk.E))
|
self.source_combo.grid(row=0, column=0, sticky=(tk.W, tk.E))
|
||||||
|
|
||||||
# Source options
|
# Source options
|
||||||
if mode == "vg_to_raw":
|
if mode == "vg_to_raw" or mode == "vg_to_borg":
|
||||||
# Show volume groups
|
# Show volume groups
|
||||||
success, output = self.run_command("vgs --noheadings -o vg_name,vg_size,pv_count", show_output=False)
|
success, output = self.run_command("vgs --noheadings -o vg_name,vg_size,pv_count", show_output=False)
|
||||||
if success:
|
if success:
|
||||||
@@ -289,7 +289,7 @@ class SimpleBackupGUI:
|
|||||||
self.log("No volume groups found")
|
self.log("No volume groups found")
|
||||||
self.source_combo['values'] = []
|
self.source_combo['values'] = []
|
||||||
else:
|
else:
|
||||||
# Show logical volumes (all LV modes)
|
# Show logical volumes (all LV modes: lv_to_lv, lv_to_raw, lv_to_borg, files_to_borg)
|
||||||
success, output = self.run_command("lvs --noheadings -o lv_path,lv_size,vg_name", show_output=False)
|
success, output = self.run_command("lvs --noheadings -o lv_path,lv_size,vg_name", show_output=False)
|
||||||
if success:
|
if success:
|
||||||
lv_list = []
|
lv_list = []
|
||||||
|
|||||||
Reference in New Issue
Block a user