Compare commits
2 Commits
63be905bdc
...
ebf24bac9a
Author | SHA1 | Date |
---|---|---|
Vitaliy Filippov | ebf24bac9a | |
Vitaliy Filippov | edd9051f81 |
|
@ -6,7 +6,12 @@
|
|||
|
||||
# Architecture
|
||||
|
||||
- [Server-side components](#server-side-components)
|
||||
- [Basic concepts](#basic-concepts)
|
||||
- [Client-side components](#client-side-components)
|
||||
- [Additional utilities](#additional-utilities)
|
||||
- [Overall read/write process](#overall-read-write-process)
|
||||
- [Nuances of request handling](#nuances-of-request-handling)
|
||||
- [Similarities to Ceph](#similarities-to-ceph)
|
||||
- [Differences from Ceph](#differences-from-ceph)
|
||||
- [Implementation Principles](#implementation-principles)
|
||||
|
@ -39,10 +44,10 @@
|
|||
|
||||
## Client-side components
|
||||
|
||||
- **Client library** incapsulates client I/O logic. Client library connects to etcd and to all OSDs,
|
||||
- **Client library** encapsulates client I/O logic. Client library connects to etcd and to all OSDs,
|
||||
receives cluster state from etcd, sends read and write requests directly to all OSDs. Due
|
||||
to the symmetric distributed architecture, all data blocks (each 128 KB by default) are placed
|
||||
to different OSDs, but clients always knows where each data block is stored and connects directly
|
||||
to different OSDs, but clients always know where each data block is stored and connect directly
|
||||
to the right OSD.
|
||||
|
||||
All other client-side components are based on the client library:
|
||||
|
@ -77,8 +82,8 @@ All other client-side components are based on the client library:
|
|||
|
||||
## Additional utilities
|
||||
|
||||
- **vitastor-disk** — утилита для разметки дисков под Vitastor OSD. С её помощью можно
|
||||
создавать, удалять, менять размеры или перемещать разделы OSD.
|
||||
- **vitastor-disk** — a Vitastor OSD disk management tool. You can create, remove,
|
||||
resize and move OSD partitions with it.
|
||||
|
||||
## Overall read/write process
|
||||
|
||||
|
|
|
@ -108,6 +108,10 @@ int disk_tool_t::prepare_one(std::map<std::string, std::string> options, int is_
|
|||
try
|
||||
{
|
||||
dsk.parse_config(options);
|
||||
// Set all offsets to 4096 to calculate metadata size with excess
|
||||
dsk.journal_offset = 4096;
|
||||
dsk.meta_offset = 4096;
|
||||
dsk.data_offset = 4096;
|
||||
dsk.data_io = dsk.meta_io = dsk.journal_io = (options["io"] == "cached" ? "cached" : "direct");
|
||||
dsk.open_data();
|
||||
dsk.open_meta();
|
||||
|
@ -171,8 +175,8 @@ int disk_tool_t::prepare_one(std::map<std::string, std::string> options, int is_
|
|||
}
|
||||
sb["osd_num"] = osd_num;
|
||||
// Zero out metadata and journal
|
||||
if (write_zero(dsk.meta_fd, dsk.meta_offset, dsk.meta_len) != 0 ||
|
||||
write_zero(dsk.journal_fd, dsk.journal_offset, dsk.journal_len) != 0)
|
||||
if (write_zero(dsk.meta_fd, sb["meta_offset"].uint64_value(), dsk.meta_len) != 0 ||
|
||||
write_zero(dsk.journal_fd, sb["journal_offset"].uint64_value(), dsk.journal_len) != 0)
|
||||
{
|
||||
fprintf(stderr, "Failed to zero out metadata or journal: %s\n", strerror(errno));
|
||||
dsk.close_all();
|
||||
|
@ -498,6 +502,9 @@ int disk_tool_t::get_meta_partition(std::vector<vitastor_dev_info_t> & ssds, std
|
|||
{
|
||||
blockstore_disk_t dsk;
|
||||
dsk.parse_config(options);
|
||||
dsk.journal_offset = 4096;
|
||||
dsk.meta_offset = 4096;
|
||||
dsk.data_offset = 4096;
|
||||
dsk.data_io = dsk.meta_io = dsk.journal_io = "cached";
|
||||
dsk.open_data();
|
||||
dsk.open_meta();
|
||||
|
|
Loading…
Reference in New Issue