sys-fs/stratisd-2.0.1-r1

Add patch wich disables xfs uuid change after snapshot create to support RAW volumes. Add patch to disable duplicates UUID and name check because of random failure to activate pool.
This commit is contained in:
2020-05-20 10:55:01 +03:00
parent c3a70502fc
commit 1291728133
4 changed files with 74 additions and 1 deletions

View File

@@ -0,0 +1,44 @@
From ef8231267c4ebb54977e3ea3d389693b20dcf1a1 Mon Sep 17 00:00:00 2001
From: Alexander Miroshnichenko <alex@millerson.name>
Date: Sun, 29 Mar 2020 12:20:08 +0300
Subject: [PATCH] disable xfs uuid change after snapshot create
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
---
src/engine/strat_engine/cmd.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/engine/strat_engine/cmd.rs b/src/engine/strat_engine/cmd.rs
index 5265ed19ff03..b9dac8a72fbb 100644
--- a/src/engine/strat_engine/cmd.rs
+++ b/src/engine/strat_engine/cmd.rs
@@ -46,6 +46,7 @@ const THIN_CHECK: &str = "thin_check";
const THIN_REPAIR: &str = "thin_repair";
const UDEVADM: &str = "udevadm";
const XFS_DB: &str = "xfs_db";
+const BINTRUE: &str = "true";
const XFS_GROWFS: &str = "xfs_growfs";
lazy_static! {
@@ -55,6 +56,7 @@ lazy_static! {
(THIN_REPAIR.to_string(), find_binary(THIN_REPAIR)),
(UDEVADM.to_string(), find_binary(UDEVADM)),
(XFS_DB.to_string(), find_binary(XFS_DB)),
+ (BINTRUE.to_string(), find_binary(BINTRUE)),
(XFS_GROWFS.to_string(), find_binary(XFS_GROWFS)),
]
.iter()
@@ -148,7 +150,7 @@ pub fn xfs_growfs(mount_point: &Path) -> StratisResult<()> {
/// Set a new UUID for filesystem on the devnode.
pub fn set_uuid(devnode: &Path, uuid: Uuid) -> StratisResult<()> {
execute_cmd(
- Command::new(get_executable(XFS_DB).as_os_str())
+ Command::new(get_executable(BINTRUE).as_os_str())
.arg("-x")
.arg(format!("-c uuid {}", uuid))
.arg(devnode),
--
2.24.1

View File

@@ -0,0 +1,20 @@
diff -ur stratisd-2.0.1/src/engine/strat_engine/thinpool/thinpool.rs stratisd-2.0.1.new/src/engine/strat_engine/thinpool/thinpool.rs
--- stratisd-2.0.1/src/engine/strat_engine/thinpool/thinpool.rs 2020-02-11 01:07:44.000000000 +0300
+++ stratisd-2.0.1.new/src/engine/strat_engine/thinpool/thinpool.rs 2020-05-19 10:53:32.716859774 +0300
@@ -428,12 +428,12 @@
let mut fs_table = Table::default();
for (name, uuid, fs) in filesystems {
let evicted = fs_table.insert(name, uuid, fs);
- if evicted.is_some() {
+ // if evicted.is_some() {
// TODO: Recover here. Failing the entire pool setup because
// of this is too harsh.
- let err_msg = "filesystems with duplicate UUID or name specified in metadata";
- return Err(StratisError::Engine(ErrorEnum::Invalid, err_msg.into()));
- }
+ // let err_msg = "filesystems with duplicate UUID or name specified in metadata";
+ // return Err(StratisError::Engine(ErrorEnum::Invalid, err_msg.into()));
+ // }
}
let thin_ids: Vec<ThinDevId> = filesystem_metadatas.iter().map(|x| x.thin_id).collect();