csi-proxy icon indicating copy to clipboard operation
csi-proxy copied to clipboard

Possible to reformat a disk that has a Linux fs on it

Open msau42 opened this issue 5 years ago • 12 comments

What happened: The implementation of IsVolumeFormatted only checks for ntfs filesystem, and it returns false if it doesn't find ntfs. That means it returns unformatted if there's a linux filesystem on it, and then subsequently calling FormatVolume can override the filesystem.

More discussion in https://app.slack.com/client/T09NY5SBT/CN5JCCW31/thread/C8EJ01Z46-1603793388.212200

What you expected to happen: Format should error if a filesystem is already on the disk.

msau42 avatar Oct 27 '20 17:10 msau42

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Jan 25 '21 17:01 fejta-bot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten

fejta-bot avatar Feb 24 '21 18:02 fejta-bot

/remove-lifecycle rotten

ddebroy avatar Mar 15 '21 23:03 ddebroy

Some discussion from CSI windows meeting. We could consider to add another check, MBR in sector 0 through golang disk reads. Expectation is a fresh provisioned disk has all zeroes. Otherwise, consider disk is already formatted.

The concern is that it might result in false positive. Some disk might returns random data even though it is not formatted. With this logic, volume will not be formatted anymore.

cc @marosset

jingxu97 avatar Mar 16 '21 17:03 jingxu97

this issue is fixed by https://github.com/kubernetes-csi/csi-proxy/pull/127

jingxu97 avatar May 19 '21 04:05 jingxu97

/close

jingxu97 avatar May 19 '21 04:05 jingxu97

@jingxu97: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar May 19 '21 04:05 k8s-ci-robot

if you try a linux ext4 file system disk on the windows node with v1.0.2 version, the disk would be still formatted, expected behavior is mount error since we cannot mount ext4 disk on windows node.

Reopen this issue since original https://github.com/kubernetes-csi/csi-proxy/pull/127 does not fix the issue.

andyzhangx avatar Jan 14 '23 14:01 andyzhangx

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Apr 14 '23 14:04 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar May 14 '23 15:05 k8s-triage-robot

/lifecycle frozen /remove-lifecycle rotten

mauriciopoppe avatar May 15 '23 18:05 mauriciopoppe

is there a way to detect ext4 file system on Windows node?

CloudCopilot No, it is not possible to detect an ext4 file system on a Windows node natively. Windows does not support the ext4 file system by default, and there is no built-in tool or command that can detect it. However, there are third-party tools available that can help you detect and access ext4 file systems on Windows. One such tool is Ext2Fsd, which is an open-source file system driver for Windows that allows you to access Linux ext2, ext3, and ext4 file systems from within Windows. Keep in mind that using third-party tools to access file systems can be risky, as it may lead to data loss or corruption. It is always recommended to back up your data before attempting to access file systems using third-party tools.

andyzhangx avatar Mar 06 '24 03:03 andyzhangx

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jun 04 '24 03:06 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jul 04 '24 04:07 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Aug 03 '24 04:08 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Aug 03 '24 04:08 k8s-ci-robot