-
Notifications
You must be signed in to change notification settings - Fork 44
LVM: expand/reduce host filesystem space #908
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
Conversation
|
DAppNode bot has built and pinned the release to an IPFS node, for commit: b545909 This is a development version and should only be installed for testing purposes, install link (by dappnodebot/build-action) |
|
When going into the Hardware tab the URL ends with |
| `-- --extend ${disk} ${volumeGroup} ${logicalVolume}` | ||
| ); | ||
| }, | ||
| { promise: true, maxAge: 2000 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function have to be dealt with extreme care, doing memoize here is not the best strategy. Questions:
- What happens if two extend calls are run at once? What's the damage if that happens? Then there must be a much stronger guarantee that --extend calls will run strictly sequential
- How long does this call take on average?
- Can and --extend call survive the DAPPMANAGER restarting? Can the disk end-up in an unknown state if the DAPPMANAGER dies during the execution of an --extend call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- What happens if two extend calls are run at once? What's the damage if that happens? Then there must be a much stronger guarantee that --extend calls will run strictly sequential
Gotcha, will implement it
- How long does this call take on average?
on a dappnode extreme less than 5 s, on a less powerful dappnode may take a bit more
- Can and --extend call survive the DAPPMANAGER restarting? Can the disk end-up in an unknown state if the DAPPMANAGER dies during the execution of an --extend call?
Since the dappmanager container starts the process of expanding the disk, if it dies then the process will die as well so It cannot survive the DAPPMANAGER restart.
The extension is composed mainly by 4 steps:
# 2. Create pv
pvcreate "/dev/${1}"
# 3. Extend vg
vgextend "$2" "/dev/${1}"
# 4. Extend lv
lvextend -l +100%FREE "/dev/${2}/${3}"
# 5. Resize fs
resize2fs -p "/dev/${2}/${3}"
Maybe having a rollback function called if any of these steps fails to leave everything as it was before starting the extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you do blue checkmark for each of those steps? It would make support much easier if users know where it fails.
|
Nice work overall! The current process requires the user to take some decisions:
Is a regular user able to take this decisions without external help? The UI should link to well written resources in the docs AND have a minimal guide of why each of the option should be chosen. Also the DAPPMANAGER should try to guess a sane default in case the user just goes "next", "next", "next" |
|
We need to really think over warning messages we show users before doing this since this is critical operation. Also, there is still pending research to be done. This comes to mind:
|
We definitely need docs which would describe every option and advise them of "default" ones, but I would disallow users going "next", "next" and make them fill out fields themselves because that will make them think. |
|
I was thinking on writting a pretty and well documented how-to in the forum explaining how to upgrade the disk space with screenshots and pictures |
I would say it is really dangerous to assume which hard disk, volume group and logical volume to use since we dont know the host architecture, except for dappnodes that was purchased from our shop. We could easily add more info so users can recognize which one to choose:
|
|
The current flow looks great!
|
Expand the disk space of the dappnode with LVM
screenshots


