Skip to content

Add section about volume increase #315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 7, 2018
Merged

Conversation

erthalion
Copy link
Contributor

Another important feature to document

@coveralls
Copy link

coveralls commented Jun 5, 2018

Coverage Status

Coverage remained the same at 11.17% when pulling df40cd8 on feature/doc-volume-increase into 681656c on master.

docs/user.md Outdated
## Increase volume size

PostgreSQL operator supports statefulset volume resize if you're using the
operator on top of AWS. For that you need to apply manifest with a new size,
Copy link
Contributor

@alexeyklyukin alexeyklyukin Jun 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change it something like (not clear about which size you are talking about, could be more than one volume that needs to be changed):

'you need to change the size field of the volume description in the cluster manifest and apply it; the operator compares the new value of the size field with the previous one and acts on differences.'

docs/user.md Outdated
size: 5Gi # new volume size
```

You can only increase a volume size in this way, if a new requested size is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can only enlarge the volume with the process described above, shrinking is not supported and will emit a warning.

docs/user.md Outdated

You can only increase a volume size in this way, if a new requested size is
smaller than the previous one nothing will be done. After this update all the
new pods in a statefulset will be created with a new volume size. To increase a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new volumes in the statefulset are allocated according to the new size.

docs/user.md Outdated
You can only increase a volume size in this way, if a new requested size is
smaller than the previous one nothing will be done. After this update all the
new pods in a statefulset will be created with a new volume size. To increase a
volume size on already existing pods in a statefulset, the operator will
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to enlarge persistent volumes attached to the running pods, the operator performs the following actions:

docs/user.md Outdated
volume size on already existing pods in a statefulset, the operator will
perform the following steps:

* modify EBS volume size
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call AWS API to change the volume size (AWS rate-limits this operation to no more than once every 6 hours)

docs/user.md Outdated

* modify EBS volume size

* resize an actuall filesystem use `resize2fs`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resize the filesystem with resize2fs by doing the equivalent of kubectl exec on the pod.

docs/user.md Outdated

* resize an actuall filesystem use `resize2fs`

Note that if before a volume size was increased a statefulset was scaled down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something like '
if the statefulset is scaled down before resizing the size changes are only applied to the volumes attached to the running pods; the size of the volumes that correspond to the previously running pods is not changed.'

@alexeyklyukin
Copy link
Contributor

👍

1 similar comment
@erthalion
Copy link
Contributor Author

👍

@erthalion erthalion merged commit c26962b into master Jun 7, 2018
@erthalion erthalion deleted the feature/doc-volume-increase branch June 7, 2018 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants