-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
filesystem tries to run mkfs every time when /dev/disk/by-id device path is used #129
Comments
I just saw this note from v3.0.3:
Would that fix this issue? |
Actually I wonder if this line alone would do the short-circuiting I need here:
update, nevermind, we have that but it's in providers/default.rb. Perhaps I can copy the same fixes you had in that PR where I see they should go. |
I wonder if we could update the |
I have created a new pull request. Resolving the symlink of the device is not sufficient, because the canonical path is not comparable with the content of /proc/mounts then. For example, the paths of Device Mapper are also symlinks (/dev/mapper/system-root -> ../dm-1). Can the maintainers evaluate and approve the pull request please? The mounted check is not reliable at the moment which can lead to data loss! Since Linux kernel 5.3 in Sep. 2019 block device names are no longer predictable. Persistent names in /dev/disk/ are now essential for Linux operation. My Change has been running on 400+ virtual machines since April. So far without problems but it should be tested in more environments as file system changes are dangerous. |
Resolved by #132 |
🗣️ Foreword
Good morning.
👻 Brief Description
Using GCP VM (GCE). We had been using
/dev/sdX
device settings but since those are not stable we are looking at changing to the recommended usage of/dev/disk/by-id/foo
. However when we do this, thefilesystem
module appears to always kick offmkfs
everytime, presumably because/proc/mounts
and/etc/mtab
etc. still refer to the/dev/sdX
value, so the device names differ?It doesn't appear to actually do anything, my data is intact and nothing was unmounted or remounted. Is this the expectation? Is there any way for
filesystem
to recognize the symlink for the/dev/sdX
device and not try to reformat everytime?🥞 Cookbook version
v1.0.0 (yes we have an old download apparently)
👩🍳 Chef-Infra Version
Chef Infra Client: 18.3.0
🎩 Platform details
Google Cloud GCE
Steps To Reproduce
Steps to reproduce the behavior:
/dev/sdb
) with aby-id
symlink pointing to it (eg/dev/disk/by-id/foo-data
)filesystem
with theby-id
path for thedevice
attributeChef client.log messages:
Again, it doesn't appear to actually be doing anything, presumably it recognizes that the volume already has a filesystem and exits. But I'd rather not have the attempt at all.
🚓 Expected behavior
Ignore the existing filesystem if the device is a symlink to an already-established device
➕ Additional context
I know our version of filesystem is terribly old. Please let me know if this behavior is fixed in a newer version.
Not sure how easy it would be to upgrade it. Obviously we can't risk any destructive changes.
The text was updated successfully, but these errors were encountered: