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
init-ceph: do umount when the path exists. #6866
Conversation
@dachary would you mind take a look? |
@xiaoxichen this is a feature change and I'm not sure that's the desired behaviour. It would be great if you could include a detailed explanation, with example use cases, that demonstrate why this is always the good thing to do, including when the mount point is completely unrelated to Ceph. |
@dachary , the use case is, I think this is always better because in previous code , if we forgot that we already mount something unrelated to *this ceph osd * to the particular mount point, we will skip the mount and finally get an error complaining superblock not matching OSD ID. umount & remount is better because
Another use case is. But actually by-path is a symbol link to /dev/sdX, so after mounting, we will see /dev/sda2 146412700 398220 146014480 1% /var/lib/ceph/mnt/osd-device-5-data Now if we have some failure that make the disk lable changed(external bay power reset, for example), the init script could help us to mount the right disk to right place. |
This makes sense to me, could you amend the commit message to include your explanation ? Did you run a teuthology-test to verify it does what is expected ? |
b72f0cb
to
09e21b4
Compare
@dachary ,commit message updated. I didn't do a teuthology-test but test it manually.. If that is necessary, could you pls guide me to the test suite? And maybe we need a new testcase that mount an dump fs before upstart, so this part of code can be exercised ? |
If the specified mount point is in use, umount it instead of skipping mounting the fs. In previous code , if we forgot that we already mount something unrelated to *this ceph osd * to the particular mount point, we will skip the mount and finally get an error complaining superblock not matching OSD ID. umount & remount is better because 1. If the wrong FS not in use, we can get the right FS we want and make ceph boot smoothly. 2. If the wrong FS is in use, we will get EBUSY on umount, which seems explain the situation more clearly than superblock mismatch. Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
@xiaoxichen please ignore the bot false negative (see http://tracker.ceph.com/issues/14060 for more details). |
init-ceph: do umount when the path exists. Reviewed-by: Loic Dachary <ldachary@redhat.com>
If the specified mount point is in use, umount it instead
of skipping mounting the fs.
Signed-off-by: Xiaoxi Chen xiaoxi.chen@intel.com