Skip to content
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

Minio creates multiple layers of directories using the MC client #3287

Closed
Fant2019 opened this issue Apr 8, 2024 · 6 comments
Closed

Minio creates multiple layers of directories using the MC client #3287

Fant2019 opened this issue Apr 8, 2024 · 6 comments

Comments

@Fant2019
Copy link

Fant2019 commented Apr 8, 2024

minio使用mc客户端创建目录出现多层目录
Minio creates multiple layers of directories using the MC client

[root@minio1 ~]# mc ls myminio/bucket1/
[2024-04-08 17:15:55 CST] 183MiB STANDARD jdk-8u201-linux-x64.tar.gz
[root@minio1 ~]# mc mb myminio/bucket1/test1
Bucket created successfully `myminio/bucket1/test1`.
[root@minio1 ~]# mc cp anaconda-ks.cfg  myminio/bucket1/test1
...conda-ks.cfg: 1.31 KiB / 1.31 KiB ┃?????????????????????????????????????┃ 10.90 KiB/s 0s

中文:
我使用mc客户端在bucket1存储桶下创建了test1目录,并且上传了anaconda-ks.cfg 文件。
在web控制台http://x.x.x.x:9001 中创建了test2目录,也上传了文件。
test1和test2有一些不同,test1目录下还有一个test1目录。
English:
I created the test1 directory in bucket1 using the mc client and uploaded the anaconda-ks.cfg file.
In the web console http://x.x.x.x:9001 ,I created the test2 directory and also uploaded files.
There are some differences between test1 and test2. There is also a test1 directory under test1 directory.

bucket
test

中文:
当我在web控制台上删除bucket1/test1/test1时,bucket1/test1被删除。
English:
When I delete bucket1/test1/test1 on the web console, bucket1/test1 is deleted。
delete
t

[root@minio1 ~]# minio  -v
minio version RELEASE.2024-04-06T05-26-02Z (commit-id=9d63bb1b418f6c1bbcc8434fff5d8aba810ee5d7)
Runtime: go1.21.9 linux/amd64
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Copyright: 2015-2024 MinIO, Inc.
[root@minio1 ~]# mc -v
mc version RELEASE.2024-03-30T15-29-52Z (commit-id=9f8147bf0e037730077a1b3baef25e53181099b0)
Runtime: go1.21.8 linux/amd64
Copyright (c) 2015-2024 MinIO, Inc.
License GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
[root@minio1 ~]# 

@harshavardhana
Copy link
Member

So what is the problem? @Fant2019 - closing this issue. You are not reporting anything. everything seems to be working as expected.

test1/ you created the folder via mc mb, which does a special PUT for the directory object
test2/ is just a parent prefix it is not the same as a directory object

@harshavardhana
Copy link
Member

English:
When I delete bucket1/test1/test1 on the web console, bucket1/test1 is deleted。

Ah this is a Console UI issue.

@harshavardhana harshavardhana transferred this issue from minio/minio Apr 8, 2024
@harshavardhana harshavardhana reopened this Apr 8, 2024
@Fant2019
Copy link
Author

Fant2019 commented Apr 8, 2024

我的问题如下,当我使用命令mc mb创建子目录时,为什么与控制台下创建子目录显示不一样。
使用mc mb创建test1时,test1目录下,除了上传的文件,还有test1目录。
使用控制台创建test2时,test2没有子目录,只有上传的文件。

My question is as follows: why does the display of creating a subdirectory using the command mc mb differ from that in the console.
When using MC MB to create test1, in the test1 directory, in addition to the uploaded files, there is also the test1 directory.
When creating test2 using the console, test2 has no subdirectories, only uploaded files.

@Fant2019
Copy link
Author

Fant2019 commented Apr 8, 2024

So what is the problem? @Fant2019 - closing this issue. You are not reporting anything. everything seems to be working as expected.

test1/ you created the folder via mc mb, which does a special PUT for the directory object test2/ is just a parent prefix it is not the same as a directory object

我不明白,为什么同样是创建子目录,命令行方式和控制台方式会出现不同的结果
I don't understand why creating subdirectories can result in different results for both command-line and console modes

@dvaldivia
Copy link
Collaborator

@Fant2019 in the UI when creating a subpath, it just takes you temporarily to the location in order to upload some files, if no file is uploaded then the subpath won't be stored, it's not a folder per-se

@Fant2019 Fant2019 closed this as completed Apr 9, 2024
@cmdel
Copy link

cmdel commented Oct 25, 2024

FWIW I'm also seeing this issue when creating buckets from mc.
If I create a new bucket as:
mc mb minio/ingres/test
then when I do to the MinIO UI and navigate to minio/ingres/test, then in there I will see the same name replicated as a path, ie. another test "folder" indicating there is a path such as minio/ingres/test/test.
If I try to delete this sub-folder than I actually delete minio/ingres/test.
This issue doesn't happen if I create the path from the UI, only remotely with mc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants