Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWX-34423: Add checksummed flag to volume spec #2372

Merged
merged 1 commit into from
Nov 9, 2023
Merged

Conversation

vivekpx
Copy link
Contributor

@vivekpx vivekpx commented Nov 8, 2023

What this PR does / why we need it:
Added new flag --checksummed to volume spec for specifying integrity volumes

Which issue(s) this PR fixes (optional)
Closes #
or
PWX-34423

Testing Notes
Tested with pxctl changes

root@vpatidar-49-1:~\\# pxctl v c --checksum  vol1 
Checksummed Volume successfully created: 45299841310009306
root@vpatidar-49-1:~# pxctl v l
ID			NAME	SIZE	HA	SHARED	ENCRYPTED	PROXY-VOLUME	IO_PRIORITY	STATUS		SNAP-ENABLED	
45299841310009306	vol1	1 GiB	1	no	no		no		LOW		up - detached	no
root@vpatidar-49-1:~# pxctl host attach vol1 
Volume successfully attached at: /dev/mapper/pxd-enc45299841310009306
root@vpatidar-49-1:~# pxctl v i vol1 -j 
[{
 "id":  "45299841310009306",
 "source":  {
  "parent":  "",
  "seed":  ""
 },
 "group":  null,
 "readonly":  false,
 "locator":  {
  "name":  "vol1",
  "volume_labels":  {},
  "ownership":  null,
  "group":  null,
  "volume_ids":  []
 },
 "ctime":  "2023-11-08T04:40:24.512847585Z",
 "spec":  {
  "ephemeral":  false,
  "size":  "1073741824",
  "format":  "ext4",
  "block_size":  "4096",
  "ha_level":  "1",
  "cos":  "low",
  "io_profile":  "IO_PROFILE_SEQUENTIAL",
  "dedupe":  false,
  "snapshot_interval":  0,
  "volume_labels":  {},
  "shared":  false,
  "replica_set":  {
   "nodes":  [],
   "pool_uuids":  [],
   "id":  0
  },
  "aggregation_level":  1,
  "encrypted":  false,
  "passphrase":  "",
  "snapshot_schedule":  "",
  "scale":  1,
  "sticky":  false,
  "group":  null,
  "group_enforced":  false,
  "compressed":  false,
  "cascaded":  false,
  "journal":  false,
  "sharedv4":  false,
  "queue_depth":  128,
  "force_unsupported_fs_type":  false,
  "nodiscard":  false,
  "io_strategy":  {
   "async_io":  false,
   "early_ack":  false,
   "direct_io":  false
  },
  "placement_strategy":  null,
  "storage_policy":  "",
  "ownership":  null,
  "export_spec":  null,
  "fp_preference":  true,
  "xattr":  "COW_ON_DEMAND",
  "scan_policy":  {
   "trigger":  "on_mount",
   "action":  "scan_repair"
  },
  "mount_options":  null,
  "sharedv4_mount_options":  null,
  "proxy_write":  false,
  "proxy_spec":  null,
  "sharedv4_service_spec":  null,
  "sharedv4_spec":  null,
  "auto_fstrim":  false,
  "io_throttle":  {
   "read_iops":  0,
   "write_iops":  0,
   "read_bw_mbytes":  0,
   "write_bw_mbytes":  0
  },
  "number_of_chunks":  0,
  "readahead":  true,
  "topology_requirement":  null,
  "winshare":  false,
  "fa_create_options":  "",
  "near_sync":  false,
  "near_sync_replication_strategy":  "NEAR_SYNC_STRATEGY_NONE",
  "checksum_clone_id":  "",
  "checksummed":  true                                          <<--------------------------------
 },
 "usage":  "1073634432",
 "last_scan":  null,
 "format":  "ext4",
 "status":  "up",
 "state":  "attached",
 "attached_on":  "10.13.8.121",
 "attached_state":  "ATTACH_STATE_EXTERNAL",
 "device_path":  "/dev/mapper/pxd-enc45299841310009306",
 "secure_device_path":  "/dev/mapper/pxd-enc45299841310009306",
 "attach_path":  [],
 "attach_info":  {},
 "replica_sets":  [
  {
   "nodes":  [
    "4e6eacba-288d-41ff-aa5f-b26ff37f27d3"
   ],
   "pool_uuids":  [
    "f567a6bc-1169-464d-a5a0-7332d1367d8f"
   ],
   "id":  0
  }
 ],
 "runtime_state":  [
  {
   "runtime_state":  {
    "FullResyncBlocks":  "[{0 0} {-1 0} {-1 0} {-1 0} {-1 0}]",
    "ID":  "0",
    "PXReplReAddNodeMid":  "",
    "PXReplReAddPools":  "",
    "ReadQuorum":  "1",
    "ReadSet":  "[0]",
    "ReplNodePools":  "0",
    "ReplRemoveMids":  "",
    "ReplicaSetCreateMid":  "4e6eacba-288d-41ff-aa5f-b26ff37f27d3",
    "ReplicaSetCurr":  "[0]",
    "ReplicaSetCurrMid":  "4e6eacba-288d-41ff-aa5f-b26ff37f27d3",
    "ReplicaSetNext":  "[0]",
    "ReplicaSetNextMid":  "4e6eacba-288d-41ff-aa5f-b26ff37f27d3",
    "ResyncBlocks":  "[{0 0} {-1 0} {-1 0} {-1 0} {-1 0}]",
    "RuntimeState":  "clean",
    "TimestampBlocksPerNode":  "[0 0 0 0 0]",
    "TimestampBlocksTotal":  "0",
    "WriteQuorum":  "1",
    "WriteSet":  "[0]"
   }
  }
 ],
 "error":  "",
 "volume_consumers":  [],
 "fs_resize_required":  false,
 "attach_time":  "2023-11-08T04:40:44.816941336Z",
 "detach_time":  "2023-11-08T04:40:29.616381522Z",
 "fpConfig":  {
  "setup_on":  0,
  "promote":  true,
  "status":  "FASTPATH_ACTIVE",
  "replicas":  [
   {
    "dev_id":  "45299841310009306",
    "node_id":  0,
    "protocol":  "FASTPATH_PROTO_LOCAL",
    "acl":  true,
    "exported_device":  "/dev/pwx0/45299841310009306",
    "block":  true,
    "target":  "/dev/pwx0/45299841310009306",
    "exported":  true,
    "imported":  true,
    "devpath":  "/dev/pwx0/45299841310009306",
    "node_uuid":  "4e6eacba-288d-41ff-aa5f-b26ff37f27d3"
   }
  ],
  "dirty":  false,
  "coord_uuid":  "4e6eacba-288d-41ff-aa5f-b26ff37f27d3",
  "force_failover":  false,
  "verbose":  ""
 },
 "last_scan_fix":  null,
 "last_scan_status":  "FS_HEALTH_STATUS_UNKNOWN",
 "mount_options":  {
  "options":  {
   "discard":  ""
  }
 },
 "sharedv4_mount_options":  {
  "options":  {
   "actimeo":  "60",
   "proto":  "tcp",
   "retrans":  "2",
   "soft":  "",
   "timeo":  "600",
   "vers":  "3.0"
  }
 },
 "derived_io_profile":  "none",
 "in_trashcan":  false
}]

Special notes for your reviewer:
Add any notes for the reviewer here.

@vivekpx vivekpx self-assigned this Nov 8, 2023
@vivekpx vivekpx closed this Nov 9, 2023
@vivekpx vivekpx reopened this Nov 9, 2023
@vivekpx vivekpx merged commit 93127db into master Nov 9, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants