Git Product home page Git Product logo

Comments (15)

xcaspar avatar xcaspar commented on May 24, 2024

It's a bug. The reason for this problem is that --mount-on value should be Mounted on value, but you passed Filesystem value. The blade predicates the --mount-on value by df -h %s | grep -v 'Mounted on' | awk '{print $NF}' command, so even if you pass the Filesystem value, it will be executed successfully. But when invoking destroy command, it cannot find the disk, so cannot delete the temp file and not process the destroy command result, so it returns success.

Thank you for reporting the issue.

from chaosblade.

alisanguo avatar alisanguo commented on May 24, 2024

ok. well, I have another question: I found command about mysql by using "./blade create -h", has this been implemented now?

from chaosblade.

xcaspar avatar xcaspar commented on May 24, 2024

ok. well, I have another question: I found command about mysql by using "./blade create -h", has this been implemented now?

Yes :-), but currently only for mysql driver in java applications.

from chaosblade.

xcaspar avatar xcaspar commented on May 24, 2024

Type: bug report

I used './blade create disk fill --mount-on /home --size 1024' to create disk fill experiment, then I found a file named 'chaos_diskfilled.log.data' in /home, but the size of it is 2G (I use 'du -sh /home/chaos_diskfilled.log.data'), and this could not be destroyed by using './blade destroy uid'

@alisanguo Currently you can solve it in two ways:

  1. Delete temp file blade filled under the disk path which is the corresponding mounted.
  2. Re-execute the experiment you just did, but change the value of --mount-on to the value of Mounted on corresponding to the Filesystem you passed in.

from chaosblade.

alisanguo avatar alisanguo commented on May 24, 2024

I tried the way you provided, but it did not work. My filesystem is /dev/mapper/rootvg-lv_home, and mounted on /home. No matter using filesystem or Mounted on value, it cannot be destroyed.

from chaosblade.

xcaspar avatar xcaspar commented on May 24, 2024

I tried the way you provided, but it did not work. My filesystem is /dev/mapper/rootvg-lv_home, and mounted on /home. No matter using filesystem or Mounted on value, it cannot be destroyed.

Can you provide the result of mount command and os version?

from chaosblade.

alisanguo avatar alisanguo commented on May 24, 2024

Can you provide the result of mount command and os version?

the result of mount is:

1791444507

The os version is red hat enterprise linux release 7.2

from chaosblade.

xcaspar avatar xcaspar commented on May 24, 2024

Can you provide the result of mount command and os version?

the result of mount is:

1791444507

The os version is red hat enterprise linux release 7.2

The blade create disk fill --mount-on /home --size 1024 command you executed is right.

The process of filling a disk is as follows:

  1. Invoke df -h /home | grep -v 'Mounted on' | awk '{print $NF}' to check the --mount-on flag value.
  2. Invoke dd if=/dev/zero of=/home/chaos_filldisk.log.dat bs=1b count=1 iflag=fullblock command to write 1b data to test execution permissions.
    3. Invoke nohup dd if=/dev/zero of=1024 bs=1M count=%s iflag=fullblock > /dev/null 2>&1 & command to fill disk.
  3. Invoke nohup dd if=/dev/zero of=/home/chaos_filldisk.log.dat bs=1M count=1024 iflag=fullblock > /dev/null 2>&1 & command to fill disk.

The stop process for the experiment is as follows:

  1. Query the dd process id by ps -ef | grep "/home/chaos_filldisk.log.dat" | grep -v grep | awk '{print $2}' | tr '\n' ' ' command.
  2. If the process id exists, the program will invoke kill -9 <PID> command.
  3. Invoke rm -rf /home/chaos_filldisk.log.dat command to delete the temp file.

Can you follow the above steps to manually execute the command?
First execute the fill disk steps, check the experimental results: the file size is expected or not.
Then execute the stop steps to check if it is deleted normally or not.

@alisanguo Thank you.

from chaosblade.

alisanguo avatar alisanguo commented on May 24, 2024

I followed the above steps to manually execute the command like this:
1394787171

but found the result is:
1822240488

It seems that the command nohup dd if=/dev/zero of=1024 bs=1M count=%s iflag=fullblock > /dev/null 2>&1 & is not right. A error 'Invalid number %s ' happended

from chaosblade.

xcaspar avatar xcaspar commented on May 24, 2024

I followed the above steps to manually execute the command like this:
1394787171

but found the result is:
1822240488

It seems that the command nohup dd if=/dev/zero of=1024 bs=1M count=%s iflag=fullblock > /dev/null 2>&1 & is not right. A error 'Invalid number %s ' happended

@alisanguo I'm very sorry for my mistake. The true command is nohup dd if=/dev/zero of=/home/chaos_filldisk.log.dat bs=1M count=1024 iflag=fullblock > /dev/null 2>&1 &, please retry the above steps. Thank you.

from chaosblade.

alisanguo avatar alisanguo commented on May 24, 2024

I retry it, and the file /home/chaos_filldisk.log.dat can be removed correctly, but I found two questions:

  1. When I use ll /home/chaos_filldisk.log.dat , the size of it is 1024M, but when I use du -sm /home/chaos_filldisk.log.dat, the size of it is 2048, and What is even more strange is that the size of it become 1024M by using du -sm /home/chaos_filldisk.log.dat later on.

257154442

  1. the file /home/chaos_filldisk.log.dat cannot be removed by using ./blade destroy uid.

from chaosblade.

xcaspar avatar xcaspar commented on May 24, 2024

I retry it, and the file /home/chaos_filldisk.log.dat can be removed correctly, but I found two questions:

  1. When I use ll /home/chaos_filldisk.log.dat , the size of it is 1024M, but when I use du -sm /home/chaos_filldisk.log.dat, the size of it is 2048, and What is even more strange is that the size of it become 1024M by using du -sm /home/chaos_filldisk.log.dat later on.

257154442

  1. the file /home/chaos_filldisk.log.dat cannot be removed by using ./blade destroy uid.

I tested again and didn't reproduce your problem.
The results of du -sm /xxx/chaos_filldisk.log.dat command and ll /xxx/chaos_filldisk.log.dat are equal. I destroyed the experiment successfully.

Screen Shot 2019-04-03 at 8 05 50 PM

Please check the uid value is right? @alisanguo

from chaosblade.

xcaspar avatar xcaspar commented on May 24, 2024

@alisanguo I will close the issue, please reopen it if your problem has not been solved.

from chaosblade.

dadadadudu avatar dadadadudu commented on May 24, 2024

我在mac上执行下面命令会报错:
blade create disk fill -d --mount-point /home --size 1024
错误为:
{"code":604,"success":false,"error":"dd: unknown operand iflag\n exit status 1 exit status 1"}

看了一下上面的讨论,我直接执行下面的命令也会报错
命令为:
dd if=/dev/zero of=/home/chaos_filldisk.log.dat bs=1b count=1 iflag=fullblock
错误为:
dd: unknown operand iflag

问题是:是不是mac系统不支持iflag属性?

from chaosblade.

xcaspar avatar xcaspar commented on May 24, 2024

我在mac上执行下面命令会报错:
blade create disk fill -d --mount-point /home --size 1024
错误为:
{"code":604,"success":false,"error":"dd: unknown operand iflag\n exit status 1 exit status 1"}

看了一下上面的讨论,我直接执行下面的命令也会报错
命令为:
dd if=/dev/zero of=/home/chaos_filldisk.log.dat bs=1b count=1 iflag=fullblock
错误为:
dd: unknown operand iflag

问题是:是不是mac系统不支持iflag属性?

是的,mac 不支持磁盘演练,因为 dd 参数不一样。

from chaosblade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.