|
20 | 20 | #include <seastar/core/seastar.hh>
|
21 | 21 | #include <seastar/net/api.hh>
|
22 | 22 |
|
| 23 | +namespace { |
| 24 | +ss::sstring to_string(ss::fs_type fs) { |
| 25 | + switch (fs) { |
| 26 | + case ss::fs_type::other: |
| 27 | + return "other"; |
| 28 | + case ss::fs_type::xfs: |
| 29 | + return "xfs"; |
| 30 | + case ss::fs_type::ext2: |
| 31 | + return "ext2"; |
| 32 | + case ss::fs_type::ext3: |
| 33 | + return "ext3"; |
| 34 | + case ss::fs_type::ext4: |
| 35 | + return "ext4"; |
| 36 | + case ss::fs_type::btrfs: |
| 37 | + return "btrfs"; |
| 38 | + case ss::fs_type::hfs: |
| 39 | + return "hfs"; |
| 40 | + case ss::fs_type::tmpfs: |
| 41 | + return "tmpfs"; |
| 42 | + }; |
| 43 | + return "bad_enum"; |
| 44 | +} |
| 45 | +} // namespace |
| 46 | + |
23 | 47 | namespace syschecks {
|
24 | 48 | ss::logger checklog{"syschecks"};
|
25 | 49 |
|
26 | 50 | ss::future<> disk(const ss::sstring& path) {
|
27 | 51 | return ss::check_direct_io_support(path).then([path] {
|
28 | 52 | return ss::file_system_at(path).then([path](auto fs) {
|
29 |
| - if (fs == ss::fs_type::ext4) { |
| 53 | + checklog.info0("Detected file system type is {}", to_string(fs)); |
| 54 | + // Currently, all of ext2, 3 and 4 are detected as ext2, so we just |
| 55 | + // assume an ext2 detection means ext4 for now, see: |
| 56 | + // https://github.com/redpanda-data/redpanda/issues/13469 |
| 57 | + // We also still check for ext4, since if that is returned it means |
| 58 | + // that seastar has been fixed to be able to detect ext4. |
| 59 | + if (fs == ss::fs_type::ext2 || fs == ss::fs_type::ext4) { |
30 | 60 | checklog.warn(
|
31 | 61 | "Path: `{}' is on ext4, not XFS. This will probably work, "
|
32 | 62 | "but Redpanda is only tested on XFS and XFS is recommended "
|
33 | 63 | "for best performance.",
|
34 | 64 | path);
|
35 | 65 | } else if (fs != ss::fs_type::xfs) {
|
36 | 66 | checklog.error(
|
37 |
| - "Path: `{}' is not on XFS or ext4. This is a non-supported " |
| 67 | + "Path: `{}' uses {} filesystem which is not XFS or ext4. " |
| 68 | + "This is a unsupported " |
38 | 69 | "configuration. You may experience poor performance or "
|
39 | 70 | "instability.",
|
40 |
| - path); |
| 71 | + path, |
| 72 | + to_string(fs)); |
41 | 73 | }
|
42 | 74 | });
|
43 | 75 | });
|
|
0 commit comments