HPE 9000 and HPE e3000 Servers
1752756 Members
4879 Online
108789 Solutions
New Discussion юеВ

Re: single user mode can't run command dd to test drive

 
Eric Firkey
Regular Advisor

single user mode can't run command dd to test drive

I am trying to test the drive on my server by booting into single user mode and running: dd if=/dev/rdsk/c1t2d0 of=/dev/null bs=1024k and I get a dd command not found and I also can't find the man command. I can run ioscan. Why can't I run these commands? Thanks

I am unfamiliar with this so any help is appreciated.
8 REPLIES 8
Torsten.
Acclaimed Contributor

Re: single user mode can't run command dd to test drive

Hi Eric,

because you are in single user mode, /usr and others are not mounted.

# whence dd
/usr/bin/dd

# whereis dd
dd: /usr/bin/dd

You need to activate vg00 and mount /usr

# vgchange -a y vg00
# mount -a

(this will mount everything in vg00 - other VGs will give errors which is normal)

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Eric Firkey
Regular Advisor

Re: single user mode can't run command dd to test drive

I tried what you suggested and received the following:

vxfs mount: /dev/vg00/lvol8 is corrupted needs checking
same for lvol7, lvol6, lvol5, lvol4

mount: /dev/vg00/lvol1 is already mounted on /stand

I still received the same command not found for dd and man.
Robert-Jan Goossens
Honored Contributor

Re: single user mode can't run command dd to test drive

well you will need a fsck these lvols.

# fsck -y -ofull /dev/vg00/rlvol4

the same for the other lvols, try to mount your filesystems again after the fsck.

Regards,
Robert-Jan
Eric Firkey
Regular Advisor

Re: single user mode can't run command dd to test drive

Will running any of these commands change how the system is currently configured or runs?

# vgchange -a y vg00
# mount -a
# fsck -y -ofull /dev/vg00/rlvol4

I am fearful that these will alter the file systems in some way and make them inoperable.
TTr
Honored Contributor

Re: single user mode can't run command dd to test drive

The 3 commands you listed are always run when the system boots up. They are part of the boot sequence and they do not alter anything. They activate the disk volumes and make them available for use in the operating system. You have them listed in the wrong order.

1. vgchange -a y vg00
(activate the vg00 volume group)
2. fsck -y -o full /dev/vg00/rlvol4
(filesystem check. Check the consistency of the filesystem and correct any issues)
3. mount -a
(connect each volume under a directory)

Why are you testing the drive in single user mode? Did your system crash? Do you have i/o errors with this particular disk? It looks like it did because you received the "vxfs mount: /dev/vg00/lvol8 is corrupted needs checking" error. In this case or if you are having disk problems and your OS is on the c1t2d0 disk you might see errors or issues with the fsck step.
In general you do not need to be in single user mode if you want to do a "null read" test (dd if=/dev/rdsk/c1t2d0 of=/dev/null bs=1024k). You could have done this in multi user mode and with the disk being used for other i/o by the OS.
Eric Firkey
Regular Advisor

Re: single user mode can't run command dd to test drive

The reason I am trying to log in to single user mode is because I am unable to log in to multi user mode. The system hangs when it tries to connect to a domain with NFS: NIS. I keep getting the following: Start NFS client subsystem. Server not responding for domain "domainname", still trying.

I can't get past this point in order to log in. I just want to log in and test the disk drive to make sure it isn't corrupted.

This is an L1000 server. Is there a CDRom that I can boot off of to test the disk drive instead of using dd if=/dev/rdsk/c1t2d0 of=/dev/null bs=1024k once I am able to run this command?
Torsten.
Acclaimed Contributor

Re: single user mode can't run command dd to test drive

Do you need nfs connections? If not, you may disable this service to allow the server to boot completely.
BTW, you may be able to logon via telnet even if the boot stuck at this point.

For your "dd" follow the given advise, but it may be not necessary.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
TTr
Honored Contributor

Re: single user mode can't run command dd to test drive

Along Torsten's thought, why did you suspect that disk c1t2d0 has a problem? The server hangs at the NFS client startup.
Where is your NFS server?
What does the NFS entry in /etc/fstab look like?
You can turn off the NFS client service in /etc/rc.config.d/nfscon by changing the NFS_CLIENT variable from 1 to 0. Then reboot the server and see how far it gets.
You still need to do the 3 steps (vgchange, fsck, mount) to be able to edit the /etc/rc.config.d/nfsconf file in single user mode.