Reboot centos 7 crashes while continuous write operation is going on in a disk with no partition

General support questions
Post Reply
wijay2k
Posts: 2
Joined: 2018/10/15 05:37:49

Reboot centos 7 crashes while continuous write operation is going on in a disk with no partition

Post by wijay2k » 2018/10/15 07:14:46

Step 1 : Created a new disk in cent OS 7 say /dev/sdb (note : new disk doesn't contain a valid partition table).

Step 2 : Created a shell script named /usr/local/datawrite.sh which will keep writing some text output to this new disk.
#!/bin/bash
while :;
do
echo -n
111111111111111111111111111111111111111111111111111111111111111111111111111111111|dd of=/dev/sdb bs=128 count=1 seek=0;
done

Step 3 : Started the script run using cat >> /etc/rc.local<<-EOF /usr/local/datawrite.sh EOF

Step 4 : Reboot the PC.

Issue: Centos 7 OS is crashing after step 4 (same steps working fine for centos 5)

Please let me know why the same step working for centos 5 but failing in centos 7

Regards,
vijay.R

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Reboot centos 7 crashes while continuous write operation is going on in a disk with no partition

Post by avij » 2018/10/15 07:33:15

What kind of a crash? Error messages?

Besides, what you are doing seems fairly pointless. Is there a reason why you do that?

wijay2k
Posts: 2
Joined: 2018/10/15 05:37:49

Re: Reboot centos 7 crashes while continuous write operation is going on in a disk with no partition

Post by wijay2k » 2018/10/16 08:42:53

Hi,

I need to do this steps as part of my API functional verification testing, while some continuous output is being written in a computer hard disk, i will verify the functionality of my APIs in the computer. As part of API test verification, I need to reboot the machine and do some API verification.

With Thanks & Regards,
vijay.R

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: Reboot centos 7 crashes while continuous write operation is going on in a disk with no partition

Post by tunk » 2018/10/16 10:48:57

What kind of a crash? Error messages?
Instead of the script you could try to run one these from the command line:
badblocks -svw -b 65536 /dev/sdb
dd if=/dev/zero of=/dev/sdb bs=1M

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Reboot centos 7 crashes while continuous write operation is going on in a disk with no partition

Post by TrevorH » 2018/10/16 15:04:28

Your current, rather strange, script is writing only 128 bytes to the disk and always to the same (one quarter of a) sector. It's not testing much that's of any use.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply