I assume this design is not recommended, but this is how my partitions were configured for clickhouse:
/dev/mapper/clickhouse-clickhouse_root_lv 10G 34M 10G 1% /var/lib/clickhouse
/dev/mapper/clickhouse-clickhouse_data_lv 2.0T 1.8T 298G 86% /var/lib/clickhouse/data
/dev/mapper/clickhouse-clickhouse_tmp_lv 10G 33M 10G 1% /var/lib/clickhouse/tmp
With Clickhouse's new disk awareness in 19.15.3, Clickhouse is only seeing the 10G allocated to /var/lib/clickhouse and as a result, I would get the following error:
2019.10.22 14:44:58.646925 [ 35 ] {} <Error> default.histograms_shard: DB::StorageReplicatedMergeTree::queueTask()::<lambda(DB::StorageReplicatedMergeTree::LogEntryPtr&)>: Code: 243, e.displayText() = DB::Exception: Cannot reserve 2.39 GiB, not enought space., Stack trace:
0. 0x557d4e572640 StackTrace::StackTrace() /usr/bin/clickhouse
1. 0x557d4e572415 DB::Exception::Exception(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) /usr/bin/clickhouse
2. 0x557d4e357b9c ? /usr/bin/clickhouse
3. 0x557d51bdb84e DB::MergeTreeData::cloneAndLoadDataPart(std::shared_ptr<DB::MergeTreeDataPart const> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, DB::MergeTreePartInfo const&) /usr/bin/clickhouse
4. 0x557d51bfaee3 DB::MergeTreeDataMergerMutator::mutatePartToTemporaryPart(DB::FutureMergedMutatedPart const&, std::vector<DB::MutationCommand, std::allocator<DB::MutationCommand> > const&, DB::MergeListEntry&, DB::Context const&, DB::DiskSpace::Reservation*, DB::TableStructureReadLockHolder&) /usr/bin/clickhouse
5. 0x557d51b515e5 DB::StorageReplicatedMergeTree::tryExecutePartMutation(DB::ReplicatedMergeTreeLogEntry const&) /usr/bin/clickhouse
6. 0x557d51b5f632 DB::StorageReplicatedMergeTree::executeLogEntry(DB::ReplicatedMergeTreeLogEntry&) /usr/bin/clickhouse
7. 0x557d51b60151 ? /usr/bin/clickhouse
8. 0x557d51c97aa1 DB::ReplicatedMergeTreeQueue::processEntry(std::function<std::shared_ptr<zkutil::ZooKeeper> ()>, std::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&, std::function<bool (std::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&)>) /usr/bin/clickhouse
9. 0x557d51b3631f DB::StorageReplicatedMergeTree::queueTask() /usr/bin/clickhouse
10. 0x557d51ba6c94 DB::BackgroundProcessingPool::threadFunction() /usr/bin/clickhouse
11. 0x557d51ba760a ? /usr/bin/clickhouse
12. 0x557d4e5bb61c ThreadPoolImpl<std::thread>::worker(std::_List_iterator<std::thread>) /usr/bin/clickhouse
13. 0x557d54282eb0 ? /usr/bin/clickhouse
14. 0x7fc2aaef2e65 start_thread /usr/lib64/libpthread-2.17.so
15. 0x7fc2aa80f88d __clone /usr/lib64/libc-2.17.so
(version 19.15.3.6 (official build))
(I opened #7439 to fix the spelling error)
I'm not expecting this to be fixed, I'm more just putting it out there for other people to find the error message and realize what the problem is.
It can be easily fixed, we just need to look at the mount point of data as the default.
Most helpful comment
It can be easily fixed, we just need to look at the mount point of
dataas the default.