How to limit storage node into usage disk space

40 views
Skip to first unread message

Павел Андреев

unread,
Apr 2, 2017, 3:02:12 PM4/2/17
to LeoProject.LeoFS
Hi
If I understand correctly for this purpose there is a watchdog. Specifically, the parameter watchdog.disk.threshold_disk_use. Right?

If so, is it safe to leave the storage node in a state where disk usage has reached the threshold value?

For example
I have 3 storage node with disk capacity 2TB each and I want that one of the storage nodes not to occupy more than 1 TB of disk space. Since the rest of the free space may be needed for other purposes

Leo Hara

unread,
Apr 3, 2017, 8:22:03 PM4/3/17
to Павел Андреев, LeoProject.LeoFS
Hi,
You can configure each LeoStorage' watchdog.disk to restrict using disk capacity by three configuration items as below:

```
## Example:

## Is disk-watchdog enabled - default:false
watchdog.disk.is_enabled = true

## Threshold use(%) of a target disk's capacity ( 50% = 1TB/2TB)
watchdog.disk.threshold_disk_use = 50

## disk target devices for checking disk utilization
## watchdog.disk.target_devices = []

## https://github.com/leo-project/leofs/blob/master/apps/leo_storage/priv/leo_storage.conf#L131-L153
```

--
You received this message because you are subscribed to the Google Groups "LeoProject.LeoFS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leoproject_leo...@googlegroups.com.
To post to this group, send email to leoproje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leoproject_leofs/54dc81b6-641e-4011-8dfd-e9f105bc8113%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yoshiyuki kanno

unread,
Apr 3, 2017, 9:36:24 PM4/3/17
to Leo Hara, Павел Андреев, LeoProject.LeoFS
Hi,

While the answer from Hara got the point for keeping the disk usage
under a certain threshold,
Let me add the one more tip

> I have 3 storage node with disk capacity 2TB each and I want that one of the storage nodes not to occupy more than 1 TB of disk space. Since the rest of the free space may be needed for other purposes

In other words,
You have 3 storage nodes with different disk spaces.
- 2 have 2TB
- 1 have 1TB

That being said,
you would have to distribute data into each node NOT EVENLY
BUT distribute data according to its disk space like the below.

disk space : data distribution = 2 : 1

You can solve this distribution problem by tweaking num_of_vnodes
which details are described at
http://leo-project.net/leofs/docs/configuration/configuration_2.html .

In your case, You would need to set num_of_vnodes on the leo_storage
with 1TB to 84 (= 168 / 2) while leaving that on other leo_storage(s)
the default(168).

Please let me know if you have any further question.

Best,
Kanno.
> https://groups.google.com/d/msgid/leoproject_leofs/CANRQ_DU7h%3Dgga-6C-VZX5VyAC%3DWUXstxNRjGc3vbiT3%2BTiaEOg%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Yoshiyuki Kanno
LeoFS Committer(http://www.leofs.org)
--------------------------------------------------
Stoic Corp.
URL: http://www.stoic.co.jp/
E-mail: yoshiyu...@stoic.co.jp
Reply all
Reply to author
Forward
0 new messages