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
Healing process should not heal root disk #7089
Conversation
Mint Automation
|
cmd/posix.go
Outdated
if diskStat.Dev == rootStat.Dev { | ||
// Indicate if the disk path is on root disk. This is used to indicate the healing | ||
// process not to format the drive and end up healing it. | ||
IsRootDisk = true |
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 be simplied to IsRootDisk = diskStat.Dev == rootStat.Dev
, also variable name can be just rootDisk which has true/false
I like the idea to determine this during Heal instead of newPosix() avoids state and false positives.
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.
@krishnasrinivas can you take a look
Codecov Report
@@ Coverage Diff @@
## master #7089 +/- ##
==========================================
+ Coverage 51.19% 51.42% +0.23%
==========================================
Files 267 279 +12
Lines 33667 43976 +10309
==========================================
+ Hits 17236 22616 +5380
- Misses 14344 19273 +4929
Partials 2087 2087
Continue to review full report at Codecov.
|
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.
LGTM and tested
@krishnasrinivas you need to fix windows build issues https://travis-ci.org/minio/minio/jobs/481015811 |
bd3dc32
to
fdd7b1b
Compare
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.
LGTM and tested
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.
LGTM. Tested.
Description
If an admin umounts a disk and runs heal, currently we endup healing a directory on the root FS. This PR ensures that when we heal, format healing is done only on non-root disks.
Motivation and Context
If we heal a directory on root disk we will end up filling up the root disk
Regression
No
How Has This Been Tested?
By using a loop mounted FS, I was able to simulate actualy disk mount to test this.
mint
PR # here: )