Skip to content

Instantly share code, notes, and snippets.

@visvirial
Forked from damoxc/bcache-status
Created October 9, 2017 03:52
Show Gist options
  • Save visvirial/22513f28671752962f71c75a758a00f6 to your computer and use it in GitHub Desktop.
Save visvirial/22513f28671752962f71c75a758a00f6 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
#
# Dumb script to dump (some) of bcache status
# Copyright 2013 Darrick J. Wong. All rights reserved.
#
# This file is part of Bcache. Bcache is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
import os
import sys
import argparse
MAX_KEY_LENGTH = 28
DEV_BLOCK_PATH = '/dev/block/'
SYSFS_BCACHE_PATH = '/sys/fs/bcache/'
SYSFS_BLOCK_PATH = '/sys/block/'
def file_to_lines(fname):
try:
with open(fname, "r") as fd:
return fd.readlines()
except:
return []
def file_to_line(fname):
ret = file_to_lines(fname)
if ret:
return ret[0].strip()
return ''
def str_to_bool(x):
return x == '1'
def format_sectors(x):
'''Pretty print a sector count.'''
sectors = int(x)
asectors = abs(sectors)
if asectors == 0:
return '0B'
elif asectors < 2048:
return '%.2fKiB' % (sectors / 2)
elif asectors < 2097152:
return '%.2fMiB' % (sectors / 2048)
elif asectors < 2147483648:
return '%.2fGiB' % (sectors / 2097152)
else:
return '%.2fTiB' % (sectors / 2147483648)
def interpret_sectors(x):
'''Interpret a pretty-printed disk size.'''
factors = {
'k': 1 << 10,
'M': 1 << 20,
'G': 1 << 30,
'T': 1 << 40,
'P': 1 << 50,
'E': 1 << 60,
'Z': 1 << 70,
'Y': 1 << 80,
}
factor = 1
if x[-1] in factors:
factor = factors[x[-1]]
x = x[:-1]
return int(float(x) * factor / 512)
def pretty_size(x):
return format_sectors(interpret_sectors(x))
def dump_bdev(bdev_path):
'''Dump a backing device stats.'''
global MAX_KEY_LENGTH, devnum_map
attrs = [
('../dev', 'Device', lambda x: '%s (%s)' % (devnum_map.get(x, '?'), x)),
('../size', 'Size', format_sectors),
('cache_mode', 'Cache Mode', None),
('readahead', 'Readahead', None),
('sequential_cutoff', 'Sequential Cutoff', pretty_size),
('sequential_merge', 'Merge sequential?', str_to_bool),
('state', 'State', None),
('writeback_running', 'Writeback?', str_to_bool),
('dirty_data', 'Dirty Data', pretty_size),
]
print('--- Backing Device ---')
for (sysfs_name, display_name, conversion_func) in attrs:
val = file_to_line('%s/%s' % (bdev_path, sysfs_name))
if conversion_func is not None:
val = conversion_func(val)
if display_name is None:
display_name = sysfs_name
print(' %-*s%s' % (MAX_KEY_LENGTH - 2, display_name, val))
def dump_cachedev(cachedev_path):
'''Dump a cachding device stats.'''
def fmt_cachesize(val):
return '%s\t(%d%%)' % (format_sectors(val), float(val) / cache_size * 100)
global MAX_KEY_LENGTH, devnum_map
attrs = [
('../dev', 'Device', lambda x: '%s (%s)' % (devnum_map.get(x, '?'), x)),
('../size', 'Size', format_sectors),
('block_size', 'Block Size', pretty_size),
('bucket_size', 'Bucket Size', pretty_size),
('cache_replacement_policy', 'Replacement Policy', None),
('discard', 'Discard?', str_to_bool),
('io_errors', 'I/O Errors', None),
('metadata_written', 'Metadata Written', pretty_size),
('written', 'Data Written', pretty_size),
('nbuckets', 'Buckets', None),
(None, 'Cache Used', lambda x: fmt_cachesize(used_sectors)),
(None, 'Cache Unused', lambda x: fmt_cachesize(unused_sectors)),
]
stats = get_cache_priority_stats(cachedev_path)
cache_size = int(file_to_line('%s/../size' % cachedev_path))
unused_sectors = float(stats['Unused'][:-1]) * cache_size / 100
used_sectors = cache_size - unused_sectors
print('--- Cache Device ---')
for (sysfs_name, display_name, conversion_func) in attrs:
if sysfs_name is not None:
val = file_to_line('%s/%s' % (cachedev_path, sysfs_name))
if conversion_func is not None:
val = conversion_func(val)
if display_name is None:
display_name = sysfs_name
print(' %-*s%s' % (MAX_KEY_LENGTH - 2, display_name, val))
def hits_to_str(hits_str, misses_str):
'''Render a hits/misses ratio as a string.'''
hits = int(hits_str)
misses = int(misses_str)
ret = '%d' % hits
if hits + misses != 0:
ret = '%s\t(%.d%%)' % (ret, 100 * hits / (hits + misses))
return ret
def dump_stats(sysfs_path, indent_str, stats):
'''Dump stats on a bcache device.'''
stat_types = [
('five_minute', 'Last 5min'),
('hour', 'Last Hour'),
('day', 'Last Day'),
('total', 'Total'),
]
attrs = ['bypassed', 'cache_bypass_hits', 'cache_bypass_misses', 'cache_hits', 'cache_misses']
display = [
('Hits', lambda: hits_to_str(stat_data['cache_hits'], stat_data['cache_misses'])),
('Misses', lambda: stat_data['cache_misses']),
('Bypass Hits', lambda: hits_to_str(stat_data['cache_bypass_hits'], stat_data['cache_bypass_misses'])),
('Bypass Misses', lambda: stat_data['cache_bypass_misses']),
('Bypassed', lambda: pretty_size(stat_data['bypassed'])),
]
for (sysfs_name, stat_display_name) in stat_types:
if len(stats) > 0 and sysfs_name not in stats:
continue
stat_data = {}
for attr in attrs:
val = file_to_line('%s/stats_%s/%s' % (sysfs_path, sysfs_name, attr))
stat_data[attr] = val
for (display_name, str_func) in display:
d = '%s%s %s' % (indent_str, stat_display_name, display_name)
print('%-*s%s' % (MAX_KEY_LENGTH, d, str_func()))
def get_cache_priority_stats(cache):
'''Retrieve priority stats from a cache.'''
attrs = {}
for line in file_to_lines('%s/priority_stats' % cache):
x = line.split()
key = x[0]
value = x[1]
attrs[key[:-1]] = value
return attrs
def dump_bcache(bcache_sysfs_path, stats, print_subdevices, device):
'''Dump bcache stats'''
global devnum_map
def fmt_cachesize(val):
return '%s\t(%d%%)' % (format_sectors(val), 100.0 * val / cache_sectors)
attrs = [
(None, 'Device', lambda x: '%s (%s)' % (devnum_map.get(device, '?'), device)),
(None, 'UUID', lambda x: os.path.basename(bcache_sysfs_path)),
('block_size', 'Block Size', pretty_size),
('bucket_size', 'Bucket Size', pretty_size),
('congested', 'Congested?', str_to_bool),
('congested_read_threshold_us', 'Read Congestion', lambda x: '%.1fms' % (int(x) / 1000)),
('congested_write_threshold_us', 'Write Congestion', lambda x: '%.1fms' % (int(x) / 1000)),
(None, 'Total Cache Size', lambda x: format_sectors(cache_sectors)),
(None, 'Total Cache Used', lambda x: fmt_cachesize(cache_used_sectors)),
(None, 'Total Cache Unused', lambda x: fmt_cachesize(cache_unused_sectors)),
(None, 'Dirty Data', lambda x: fmt_cachesize(interpret_sectors(file_to_line('%s%s/bcache/dirty_data' % (SYSFS_BLOCK_PATH, devnum_map.get(device, '?').split('/')[2]))))),
('cache_available_percent', 'Evictable Cache', lambda x: '%s\t(%s%%)' % (format_sectors(float(x) * cache_sectors / 100), x)),
(None, 'Replacement Policy', lambda x: replacement_policies.pop() if len(replacement_policies) == 1 else '(Unknown)'),
(None, 'Cache Mode', lambda x: cache_modes.pop() if len(cache_modes) == 1 else '(Unknown)'),
]
# Calculate aggregate data
cache_sectors = 0
cache_unused_sectors = 0
cache_modes = set()
replacement_policies = set()
for obj in os.listdir(bcache_sysfs_path):
if not os.path.isdir('%s/%s' % (bcache_sysfs_path, obj)):
continue
if obj.startswith('cache'):
cache_size = int(file_to_line('%s/%s/../size' % (bcache_sysfs_path, obj)))
cache_sectors += cache_size
cstats = get_cache_priority_stats('%s/%s' % (bcache_sysfs_path, obj))
unused_size = float(cstats['Unused'][:-1]) * cache_size / 100
cache_unused_sectors += unused_size
replacement_policies.add(file_to_line('%s/%s/cache_replacement_policy' % (bcache_sysfs_path, obj)))
elif obj.startswith('bdev'):
cache_modes.add(file_to_line('%s/%s/cache_mode' % (bcache_sysfs_path, obj)))
cache_used_sectors = cache_sectors - cache_unused_sectors
# Dump basic stats
print("--- bcache ---")
for (sysfs_name, display_name, conversion_func) in attrs:
if sysfs_name is not None:
val = file_to_line('%s/%s' % (bcache_sysfs_path, sysfs_name))
else:
val = None
if conversion_func is not None:
val = conversion_func(val)
if display_name is None:
display_name = sysfs_name
print('%-*s%s' % (MAX_KEY_LENGTH, display_name, val))
dump_stats(bcache_sysfs_path, '', stats)
# Dump sub-device stats
if not print_subdevices:
return
for obj in os.listdir(bcache_sysfs_path):
if not os.path.isdir('%s/%s' % (bcache_sysfs_path, obj)):
continue
if obj.startswith('bdev'):
dump_bdev('%s/%s' % (bcache_sysfs_path, obj))
dump_stats('%s/%s' % (bcache_sysfs_path, obj), ' ', stats)
elif obj.startswith('cache'):
dump_cachedev('%s/%s' % (bcache_sysfs_path, obj))
def map_uuid_to_device():
'''Map bcache UUIDs to device files.'''
global SYSFS_BLOCK_PATH
ret = {}
for bdev in os.listdir(SYSFS_BLOCK_PATH):
link = '%s%s/bcache/cache' % (SYSFS_BLOCK_PATH, bdev)
if not os.path.islink(link):
continue
basename = os.path.basename(os.readlink(link))
ret[basename] = file_to_line('%s%s/dev' % (SYSFS_BLOCK_PATH, bdev))
return ret
def map_devnum_to_device():
'''Map device numbers to device files.'''
global DEV_BLOCK_PATH
ret = {}
for bdev in os.listdir(DEV_BLOCK_PATH):
ret[bdev] = os.path.realpath('%s%s' % (DEV_BLOCK_PATH, bdev))
return ret
def main():
'''Main function'''
global SYSFS_BCACHE_PATH
global uuid_map, devnum_map
stats = set()
reset_stats = False
print_subdevices = False
run_gc = False
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument('--help', help='show this help message and exit', action='store_true')
parser.add_argument('-f', '--five-minute', help='Print the last five minutes of stats.', action='store_true')
parser.add_argument('-h', '--hour', help='Print the last hour of stats.', action='store_true')
parser.add_argument('-d', '--day', help='Print the last day of stats.', action='store_true')
parser.add_argument('-t', '--total', help='Print total stats.', action='store_true')
parser.add_argument('-a', '--all', help='Print all stats.', action='store_true')
parser.add_argument('-r', '--reset-stats', help='Reset stats after printing them.', action='store_true')
parser.add_argument('-s', '--sub-status', help='Print subdevice status.', action='store_true')
parser.add_argument('-g', '--gc', help='Invoke GC before printing status.', action='store_true')
args = parser.parse_args()
if args.help:
parser.print_help()
return 0
if args.five_minute:
stats.add('five_minute')
if args.hour:
stats.add('hour')
if args.day:
stats.add('day')
if args.total:
stats.add('total')
if args.all:
stats.add('five_minute')
stats.add('hour')
stats.add('day')
stats.add('total')
if args.reset_stats:
reset_stats = True
if args.sub_status:
print_subdevices = True
if args.gc:
run_gc = True
if not stats:
stats.add('total')
uuid_map = map_uuid_to_device()
devnum_map = map_devnum_to_device()
for cache in os.listdir(SYSFS_BCACHE_PATH):
if not os.path.isdir('%s%s' % (SYSFS_BCACHE_PATH, cache)):
continue
if run_gc:
with open('%s%s/internal/trigger_gc' % (SYSFS_BCACHE_PATH, cache), 'w') as fd:
fd.write('1\n')
dump_bcache('%s%s' % (SYSFS_BCACHE_PATH, cache), stats, print_subdevices, uuid_map.get(cache, '?'))
if reset_stats:
with open('%s%s/clear_stats' % (SYSFS_BCACHE_PATH, cache), 'w') as fd:
fd.write('1\n')
if __name__ == '__main__':
main()
@adamryczkowski
Copy link

I have the following problem with this code:

--- bcache ---
Device                      ? (?)
UUID                        5afd5750-e992-448b-b25b-d4961aa1f6fa
Block Size                  0.50KiB
Bucket Size                 512.00KiB
Congested?                  False
Read Congestion             2.0ms
Write Congestion            20.0ms
Total Cache Size            170.00GiB
Total Cache Used            105.40GiB	(62%)
Total Cache Unused          64.60GiB	(38%)
Traceback (most recent call last):
  File "/home/adam/bin/bcache-status", line 348, in <module>
    main()
  File "/home/adam/bin/bcache-status", line 341, in main
    dump_bcache('%s%s' % (SYSFS_BCACHE_PATH, cache), stats, print_subdevices, uuid_map.get(cache, '?'))
  File "/home/adam/bin/bcache-status", line 242, in dump_bcache
    val = conversion_func(val)
  File "/home/adam/bin/bcache-status", line 209, in <lambda>
    (None,                           'Dirty Data',         lambda x: fmt_cachesize(interpret_sectors(file_to_line('%s%s/bcache/dirty_data' % (SYSFS_BLOCK_PATH, devnum_map.get(device, '?').split('/')[2]))))),
IndexError: list index out of range

Do you know, what is wrong?

For the reference, this is my setup:

NAME                                      FSTYPE              SIZE MOUNTPOINT                  LABEL       UUID
sdf                                                           2.7T                                         
├─sdf9                                    crypto_LUKS         200G                                         cebd94c5-beaf-474f-9ea4-0fbfbc05ded7
├─sdf7                                    linux_raid_member   700G                             wielodysk:3 d92fcbb2-61da-6e6b-ca54-981c43d6b184
│ └─md3                                   bcache              3.4T                                         dfafa293-cf73-46cc-b915-121b5420fb22
│   └─bcache2                             crypto_LUKS         3.4T                                         367dc504-1585-43d6-93f1-bca1dfc51056
│     └─crypt-filmy                       LVM2_member         3.4T                                         Rwb20x-yvci-qnvS-Yer8-HQ8t-3dEA-ZBmBkg
│       └─vg--filmy-lv--filmy             btrfs               2.8T /media/wielodysk/filmy      filmy       ad3769c7-d8ac-4c07-adaa-cea35cef0c4d
├─sdf5                                    ext4                500G /mnt/mhdd4                              161ff8c8-c16c-4991-b9ce-0f75cfcd02ed
├─sdf3                                    swap                  2G                                         6b47cdf6-f64b-44cb-a39c-5b47de244f7a
│ └─cryptswap2                            swap                  2G [SWAP]                                  409fa04c-97a6-4995-bed6-d8547445f96a
├─sdf1                                                          1M                                         
├─sdf8                                    linux_raid_member   600G                             wielodysk:4 42a073b9-78c2-5c92-7b84-32c0013ff33f
│ └─md4                                   bcache              2.4T                                         85e51ff9-045a-4f11-85fc-28c4cb7dce49
│   └─bcache0                             crypto_LUKS         2.4T                                         4bbdcc84-a1c9-4a95-ae37-1763c9d516e9
│     └─crypt-niezbednik                  LVM2_member         2.4T                                         5lcKQq-aw4Y-JQGK-ytMm-kate-dpRc-qz7lic
│       └─vg--niezbednik-lv--niezbednik   ext4                1.8T /media/wielodysk/niezbednik niezbednik  ed2fd510-90cb-4452-88ae-14fd234b00f5
├─sdf6                                    linux_raid_member   300G                             wielodysk:2 3f5d962b-6583-bc13-1cf2-20f96d96ee5e
│ └─md2                                   LVM2_member         1.2T                                         2O5cud-LU4h-iWyF-Qgtk-fbBe-Ax0w-ql1YIS
│   └─vg--zdjecia-zdjecia                 btrfs             599.8G /media/wielodysk/zdjecia    zdjecia     e6d54e2e-e296-4445-b4fa-6fbaf9e49c95
├─sdf4                                    linux_raid_member 186.3G                             wielodysk:1 825adfa7-4a62-8c64-83e0-e24aa4df1715
│ └─md1                                   bcache            744.6G                                         2ac0ec42-9881-432d-a848-0c599be86465
│   └─bcache1                             crypto_LUKS       744.6G                                         a7cdd5e0-4ded-4d71-9963-53119502ada1
│     └─crypt-adama-docs                  LVM2_member       744.6G                                         BuuRnW-wuTf-csHL-6fmU-69fW-x314-ffgd3E
│       └─vg--adama--docs-lv--adama--docs btrfs             558.4G /media/wielodysk/docs       docs        3b5d5cb6-7d92-43bb-a5d4-087d4da4215e
└─sdf2                                    linux_raid_member   9.3G                             wielodysk:0 3072895d-95cb-fa63-9016-d4c71c1e41c6
  └─md0                                   ext4                9.3G                                         fdba4887-765c-41f3-97b1-3add0016efd5
sdd                                                         232.9G                                         
├─sdd2                                    bcache             62.9G                                         0852f132-83e6-40d9-a4e9-72edc05d4fe9
└─sdd1                                    bcache              170G                                         e4e9ee19-081b-4bfd-97c4-e83a7dc8db96
sdb                                                           2.7T                                         
├─sdb4                                    linux_raid_member 186.3G                             wielodysk:1 825adfa7-4a62-8c64-83e0-e24aa4df1715
│ └─md1                                   bcache            744.6G                                         2ac0ec42-9881-432d-a848-0c599be86465
│   └─bcache1                             crypto_LUKS       744.6G                                         a7cdd5e0-4ded-4d71-9963-53119502ada1
│     └─crypt-adama-docs                  LVM2_member       744.6G                                         BuuRnW-wuTf-csHL-6fmU-69fW-x314-ffgd3E
│       └─vg--adama--docs-lv--adama--docs btrfs             558.4G /media/wielodysk/docs       docs        3b5d5cb6-7d92-43bb-a5d4-087d4da4215e
├─sdb2                                    linux_raid_member   9.3G                             wielodysk:0 3072895d-95cb-fa63-9016-d4c71c1e41c6
│ └─md0                                   ext4                9.3G                                         fdba4887-765c-41f3-97b1-3add0016efd5
├─sdb9                                                        200G                                         
├─sdb7                                    linux_raid_member   700G                             wielodysk:3 d92fcbb2-61da-6e6b-ca54-981c43d6b184
│ └─md3                                   bcache              3.4T                                         dfafa293-cf73-46cc-b915-121b5420fb22
│   └─bcache2                             crypto_LUKS         3.4T                                         367dc504-1585-43d6-93f1-bca1dfc51056
│     └─crypt-filmy                       LVM2_member         3.4T                                         Rwb20x-yvci-qnvS-Yer8-HQ8t-3dEA-ZBmBkg
│       └─vg--filmy-lv--filmy             btrfs               2.8T /media/wielodysk/filmy      filmy       ad3769c7-d8ac-4c07-adaa-cea35cef0c4d
├─sdb5                                    ext4                500G /mnt/mhdd5                              a0ab591c-6770-4886-9eeb-3ebee9545ab5
├─sdb3                                                          2G                                         
├─sdb1                                                          1M                                         
├─sdb8                                    linux_raid_member   600G                             wielodysk:4 42a073b9-78c2-5c92-7b84-32c0013ff33f
│ └─md4                                   bcache              2.4T                                         85e51ff9-045a-4f11-85fc-28c4cb7dce49
│   └─bcache0                             crypto_LUKS         2.4T                                         4bbdcc84-a1c9-4a95-ae37-1763c9d516e9
│     └─crypt-niezbednik                  LVM2_member         2.4T                                         5lcKQq-aw4Y-JQGK-ytMm-kate-dpRc-qz7lic
│       └─vg--niezbednik-lv--niezbednik   ext4                1.8T /media/wielodysk/niezbednik niezbednik  ed2fd510-90cb-4452-88ae-14fd234b00f5
└─sdb6                                    linux_raid_member   300G                             wielodysk:2 3f5d962b-6583-bc13-1cf2-20f96d96ee5e
  └─md2                                   LVM2_member         1.2T                                         2O5cud-LU4h-iWyF-Qgtk-fbBe-Ax0w-ql1YIS
    └─vg--zdjecia-zdjecia                 btrfs             599.8G /media/wielodysk/zdjecia    zdjecia     e6d54e2e-e296-4445-b4fa-6fbaf9e49c95
sr0                                                          1024M                                         
sdg                                                           2.7T                                         
├─sdg9                                                        200G                                         
├─sdg7                                    linux_raid_member   700G                             wielodysk:3 d92fcbb2-61da-6e6b-ca54-981c43d6b184
│ └─md3                                   bcache              3.4T                                         dfafa293-cf73-46cc-b915-121b5420fb22
│   └─bcache2                             crypto_LUKS         3.4T                                         367dc504-1585-43d6-93f1-bca1dfc51056
│     └─crypt-filmy                       LVM2_member         3.4T                                         Rwb20x-yvci-qnvS-Yer8-HQ8t-3dEA-ZBmBkg
│       └─vg--filmy-lv--filmy             btrfs               2.8T /media/wielodysk/filmy      filmy       ad3769c7-d8ac-4c07-adaa-cea35cef0c4d
├─sdg5                                    ext4                500G /mnt/mhdd6                              b3b8fac7-d230-40bd-9c39-5a4516bc9996
├─sdg3                                                          2G                                         
├─sdg1                                                          1M                                         
├─sdg8                                    linux_raid_member   600G                             wielodysk:4 42a073b9-78c2-5c92-7b84-32c0013ff33f
│ └─md4                                   bcache              2.4T                                         85e51ff9-045a-4f11-85fc-28c4cb7dce49
│   └─bcache0                             crypto_LUKS         2.4T                                         4bbdcc84-a1c9-4a95-ae37-1763c9d516e9
│     └─crypt-niezbednik                  LVM2_member         2.4T                                         5lcKQq-aw4Y-JQGK-ytMm-kate-dpRc-qz7lic
│       └─vg--niezbednik-lv--niezbednik   ext4                1.8T /media/wielodysk/niezbednik niezbednik  ed2fd510-90cb-4452-88ae-14fd234b00f5
├─sdg6                                    linux_raid_member   300G                             wielodysk:2 3f5d962b-6583-bc13-1cf2-20f96d96ee5e
│ └─md2                                   LVM2_member         1.2T                                         2O5cud-LU4h-iWyF-Qgtk-fbBe-Ax0w-ql1YIS
│   └─vg--zdjecia-zdjecia                 btrfs             599.8G /media/wielodysk/zdjecia    zdjecia     e6d54e2e-e296-4445-b4fa-6fbaf9e49c95
├─sdg4                                    linux_raid_member 186.3G                             wielodysk:1 825adfa7-4a62-8c64-83e0-e24aa4df1715
│ └─md1                                   bcache            744.6G                                         2ac0ec42-9881-432d-a848-0c599be86465
│   └─bcache1                             crypto_LUKS       744.6G                                         a7cdd5e0-4ded-4d71-9963-53119502ada1
│     └─crypt-adama-docs                  LVM2_member       744.6G                                         BuuRnW-wuTf-csHL-6fmU-69fW-x314-ffgd3E
│       └─vg--adama--docs-lv--adama--docs btrfs             558.4G /media/wielodysk/docs       docs        3b5d5cb6-7d92-43bb-a5d4-087d4da4215e
└─sdg2                                    linux_raid_member   9.3G                             wielodysk:0 3072895d-95cb-fa63-9016-d4c71c1e41c6
  └─md0                                   ext4                9.3G                                         fdba4887-765c-41f3-97b1-3add0016efd5
sde                                                           2.7T                                         
├─sde2                                    linux_raid_member   9.3G                             wielodysk:0 3072895d-95cb-fa63-9016-d4c71c1e41c6
│ └─md0                                   ext4                9.3G                                         fdba4887-765c-41f3-97b1-3add0016efd5
├─sde9                                                        200G                                         
├─sde7                                    linux_raid_member   700G                             wielodysk:3 d92fcbb2-61da-6e6b-ca54-981c43d6b184
│ └─md3                                   bcache              3.4T                                         dfafa293-cf73-46cc-b915-121b5420fb22
│   └─bcache2                             crypto_LUKS         3.4T                                         367dc504-1585-43d6-93f1-bca1dfc51056
│     └─crypt-filmy                       LVM2_member         3.4T                                         Rwb20x-yvci-qnvS-Yer8-HQ8t-3dEA-ZBmBkg
│       └─vg--filmy-lv--filmy             btrfs               2.8T /media/wielodysk/filmy      filmy       ad3769c7-d8ac-4c07-adaa-cea35cef0c4d
├─sde5                                    ext4                500G /mnt/mhdd2                              3d284b89-f99a-400f-bbaf-c16103f985e2
├─sde3                                                          2G                                         
├─sde1                                                          1M                                         
├─sde8                                    linux_raid_member   600G                             wielodysk:4 42a073b9-78c2-5c92-7b84-32c0013ff33f
│ └─md4                                   bcache              2.4T                                         85e51ff9-045a-4f11-85fc-28c4cb7dce49
│   └─bcache0                             crypto_LUKS         2.4T                                         4bbdcc84-a1c9-4a95-ae37-1763c9d516e9
│     └─crypt-niezbednik                  LVM2_member         2.4T                                         5lcKQq-aw4Y-JQGK-ytMm-kate-dpRc-qz7lic
│       └─vg--niezbednik-lv--niezbednik   ext4                1.8T /media/wielodysk/niezbednik niezbednik  ed2fd510-90cb-4452-88ae-14fd234b00f5
├─sde6                                    linux_raid_member   300G                             wielodysk:2 3f5d962b-6583-bc13-1cf2-20f96d96ee5e
│ └─md2                                   LVM2_member         1.2T                                         2O5cud-LU4h-iWyF-Qgtk-fbBe-Ax0w-ql1YIS
│   └─vg--zdjecia-zdjecia                 btrfs             599.8G /media/wielodysk/zdjecia    zdjecia     e6d54e2e-e296-4445-b4fa-6fbaf9e49c95
└─sde4                                    linux_raid_member 186.3G                             wielodysk:1 825adfa7-4a62-8c64-83e0-e24aa4df1715
  └─md1                                   bcache            744.6G                                         2ac0ec42-9881-432d-a848-0c599be86465
    └─bcache1                             crypto_LUKS       744.6G                                         a7cdd5e0-4ded-4d71-9963-53119502ada1
      └─crypt-adama-docs                  LVM2_member       744.6G                                         BuuRnW-wuTf-csHL-6fmU-69fW-x314-ffgd3E
        └─vg--adama--docs-lv--adama--docs btrfs             558.4G /media/wielodysk/docs       docs        3b5d5cb6-7d92-43bb-a5d4-087d4da4215e
sdc                                                           2.7T                                         
├─sdc2                                    linux_raid_member   9.3G                             wielodysk:0 3072895d-95cb-fa63-9016-d4c71c1e41c6
│ └─md0                                   ext4                9.3G                                         fdba4887-765c-41f3-97b1-3add0016efd5
├─sdc9                                    crypto_LUKS         200G                                         a57e5dc3-1d6d-4db1-a050-07a006dd9790
├─sdc7                                    linux_raid_member   700G                             wielodysk:3 d92fcbb2-61da-6e6b-ca54-981c43d6b184
│ └─md3                                   bcache              3.4T                                         dfafa293-cf73-46cc-b915-121b5420fb22
│   └─bcache2                             crypto_LUKS         3.4T                                         367dc504-1585-43d6-93f1-bca1dfc51056
│     └─crypt-filmy                       LVM2_member         3.4T                                         Rwb20x-yvci-qnvS-Yer8-HQ8t-3dEA-ZBmBkg
│       └─vg--filmy-lv--filmy             btrfs               2.8T /media/wielodysk/filmy      filmy       ad3769c7-d8ac-4c07-adaa-cea35cef0c4d
├─sdc5                                    ext4                500G /mnt/mhdd1                              071b71b0-0a0d-47e0-9ade-85d2c8c8ce33
├─sdc3                                    swap                  2G                                         bad228ad-16dc-4f11-a25d-20cbe71e4c3c
│ └─cryptswap1                            swap                  2G [SWAP]                                  73f49f35-a9ac-4064-8121-b5b1801300e4
├─sdc1                                                          1M                                         
├─sdc8                                    linux_raid_member   600G                             wielodysk:4 42a073b9-78c2-5c92-7b84-32c0013ff33f
│ └─md4                                   bcache              2.4T                                         85e51ff9-045a-4f11-85fc-28c4cb7dce49
│   └─bcache0                             crypto_LUKS         2.4T                                         4bbdcc84-a1c9-4a95-ae37-1763c9d516e9
│     └─crypt-niezbednik                  LVM2_member         2.4T                                         5lcKQq-aw4Y-JQGK-ytMm-kate-dpRc-qz7lic
│       └─vg--niezbednik-lv--niezbednik   ext4                1.8T /media/wielodysk/niezbednik niezbednik  ed2fd510-90cb-4452-88ae-14fd234b00f5
├─sdc6                                    linux_raid_member   300G                             wielodysk:2 3f5d962b-6583-bc13-1cf2-20f96d96ee5e
│ └─md2                                   LVM2_member         1.2T                                         2O5cud-LU4h-iWyF-Qgtk-fbBe-Ax0w-ql1YIS
│   └─vg--zdjecia-zdjecia                 btrfs             599.8G /media/wielodysk/zdjecia    zdjecia     e6d54e2e-e296-4445-b4fa-6fbaf9e49c95
└─sdc4                                    linux_raid_member 186.3G                             wielodysk:1 825adfa7-4a62-8c64-83e0-e24aa4df1715
  └─md1                                   bcache            744.6G                                         2ac0ec42-9881-432d-a848-0c599be86465
    └─bcache1                             crypto_LUKS       744.6G                                         a7cdd5e0-4ded-4d71-9963-53119502ada1
      └─crypt-adama-docs                  LVM2_member       744.6G                                         BuuRnW-wuTf-csHL-6fmU-69fW-x314-ffgd3E
        └─vg--adama--docs-lv--adama--docs btrfs             558.4G /media/wielodysk/docs       docs        3b5d5cb6-7d92-43bb-a5d4-087d4da4215e
sda                                                         698.7G                                         
├─sda4                                                      511.7G                                         
├─sda2                                    ext3                572M /boot                                   9269d79c-d874-4ae4-adab-0c2692511f97
├─sda3                                    btrfs             186.3G /home                                   ddd41ec7-c5cd-4343-ace4-2c4c12569246
└─sda1                                    vfat                 94M /boot/efi                               254E-A7BE
sr1                                       iso9660            82.4M                             NX          2015-03-03-13-21-25-89
sdh                                                           2.7T                                         
├─sdh9                                    crypto_LUKS         200G                                         52c4e592-e13c-4c0d-be9d-be3dff2bff2d
├─sdh7                                    linux_raid_member   700G                             wielodysk:3 d92fcbb2-61da-6e6b-ca54-981c43d6b184
│ └─md3                                   bcache              3.4T                                         dfafa293-cf73-46cc-b915-121b5420fb22
│   └─bcache2                             crypto_LUKS         3.4T                                         367dc504-1585-43d6-93f1-bca1dfc51056
│     └─crypt-filmy                       LVM2_member         3.4T                                         Rwb20x-yvci-qnvS-Yer8-HQ8t-3dEA-ZBmBkg
│       └─vg--filmy-lv--filmy             btrfs               2.8T /media/wielodysk/filmy      filmy       ad3769c7-d8ac-4c07-adaa-cea35cef0c4d
├─sdh5                                    ext4                500G /mnt/mhdd3                              cc84c160-fce5-4202-ab03-04b910e428d5
├─sdh3                                    swap                  2G                                         93a81831-1274-4dcd-a523-27484833824b
│ └─cryptswap3                            swap                  2G [SWAP]                                  9bfea592-1442-4a86-81f3-833ae774df8e
├─sdh1                                                          1M                                         
├─sdh8                                    linux_raid_member   600G                             wielodysk:4 42a073b9-78c2-5c92-7b84-32c0013ff33f
│ └─md4                                   bcache              2.4T                                         85e51ff9-045a-4f11-85fc-28c4cb7dce49
│   └─bcache0                             crypto_LUKS         2.4T                                         4bbdcc84-a1c9-4a95-ae37-1763c9d516e9
│     └─crypt-niezbednik                  LVM2_member         2.4T                                         5lcKQq-aw4Y-JQGK-ytMm-kate-dpRc-qz7lic
│       └─vg--niezbednik-lv--niezbednik   ext4                1.8T /media/wielodysk/niezbednik niezbednik  ed2fd510-90cb-4452-88ae-14fd234b00f5
├─sdh6                                    linux_raid_member   300G                             wielodysk:2 3f5d962b-6583-bc13-1cf2-20f96d96ee5e
│ └─md2                                   LVM2_member         1.2T                                         2O5cud-LU4h-iWyF-Qgtk-fbBe-Ax0w-ql1YIS
│   └─vg--zdjecia-zdjecia                 btrfs             599.8G /media/wielodysk/zdjecia    zdjecia     e6d54e2e-e296-4445-b4fa-6fbaf9e49c95
├─sdh4                                    linux_raid_member 186.3G                             wielodysk:1 825adfa7-4a62-8c64-83e0-e24aa4df1715
│ └─md1                                   bcache            744.6G                                         2ac0ec42-9881-432d-a848-0c599be86465
│   └─bcache1                             crypto_LUKS       744.6G                                         a7cdd5e0-4ded-4d71-9963-53119502ada1
│     └─crypt-adama-docs                  LVM2_member       744.6G                                         BuuRnW-wuTf-csHL-6fmU-69fW-x314-ffgd3E
│       └─vg--adama--docs-lv--adama--docs btrfs             558.4G /media/wielodysk/docs       docs        3b5d5cb6-7d92-43bb-a5d4-087d4da4215e
└─sdh2                                    linux_raid_member   9.3G                             wielodysk:0 3072895d-95cb-fa63-9016-d4c71c1e41c6
  └─md0                                   ext4                9.3G                                         fdba4887-765c-41f3-97b1-3add0016efd5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment