Symptoms
In Virtuozzo Storage, when adding the node to Storage cluster and creating the Chunk Servers with Cache (or "journal") option, the resulted CS journals are likely to occupy almost all space on the disk with Cache role. As the result, when adding more disks and CSes on the same hardware node later, it is not possible to create CS with Cache (journal) utilizing the same Cache disk, because it does not have enough free space.
Cause
In the current implementation of Virtuozzo Storage, CS journal size will not be automatically adjusted when adding more CSes with Cache (journal) option.
Resolution
It is possible to change the CS journal size manually for all CSes on the node with "vstorage configure-cs --journal-size" option:
- List all the CS journals on the node to determine their current size:
# for cluster in $(findmnt -tfuse.{p,v}storage -no source | sed s~.*://~~); do pstorage -c $cluster list-services; done |& awk '$1=="CS"{print $NF"/control/journal/journal"}' | xargs -r ls -lh - Think about the new size of the journals that you would like to apply. For example, if you have two CS journals with 50G each, and you need this Cache disk to sustain one more CS journal, you can put the new CS journal size as 30G.
- Сhange the size of the CS journal, one by one:
# vstorage -c $CLUSTERNAME configure-cs -r /$PATH/$TO/$CS_REPO --journal-size $SIZE
Where:- $CLUSTERNAME is your actual cluster name
- /$PATH/$TO/$CS_REPO is a path to the specific CS repository obtained in vstorage -c $CLUSTERNAME list-services
- $SIZE is the new size of the CS journal
Real-life example
Check the current size:
# for cluster in $(findmnt -tfuse.{p,v}storage -no source | sed s~.*://~~); do pstorage -c $cluster list-services; done |& awk '$1=="CS"{print $NF"/control/journal/journal"}' | xargs -r ls -lh -rw------- 1 vstorage vstorage 110G Aug 17 03:04 /vstorage/8714e784/cs/control/journal/journal
Check the CS repository path
# vstorage -c vhs-democluster list-services
TYPE ID ENABLED STATUS DEVICE/VOLUME GROUP DEVICE INFO PATH
CS 1027 enabled active [2266] /dev/vdb1 0x1df0 /vstorage/482ba181/cs
CS 1028 enabled active [2255] /dev/vdd1 0x1df0 /vstorage/8714e784/cs
MDS 2 enabled active [184031] vhs_demo LVM (vda4) /vstorage/mds
Change the journal size:
# vstorage -c vhs-democluster configure-cs -r /vstorage/8714e784/cs --journal-size 30G