System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

on rp3440/11i v2 "mediainit" takes more than 42 hour for a 2TB LUN!!!???

SOLVED
Go to solution
newa
Frequent Advisor

on rp3440/11i v2 "mediainit" takes more than 42 hour for a 2TB LUN!!!???

Hi All,

After getting a 2TB LUN presented to the server (from HP StorageWorks 6400 Enterprise Virtual Array) I issued mediainit commnad on the LUN TWO DAYS AGO and it's still running... Yesterday I used renice to set its nice# to 0 and it seemed not very helpful.

Months ago I did mediainit to a 36GB hard drive on the same server and it took about 40 mintues to finish.

My questions are:
1. Do I have to run mediainit on a new LUN?
2. Is there any way to make mediainit faster?
3. Are there any alternatives to mediainit?

Thanks a lot in advance!

##########################################
$ ssh 172.20.123.221 ps -efl|ioscan -fnkCdisk
Class I H/W Path Driver S/W State H/W Type Description
===========================================================================
disk 6 0/3/1/0.1.18.0.0.0.1 sdisk CLAIMED DEVICE HP HSV400
/dev/dsk/c9t0d1 /dev/rdsk/c9t0d1

##########################################
$ ps -efl|grep mediainit
1 S root 23034 1 0 138 0 5c4d04c0 13 5663c800 Apr 26 ? 0:44 mediainit /dev/rdsk/c9t0d1


7 REPLIES
Pete Randall
Outstanding Contributor

Re: on rp3440/11i v2 "mediainit" takes more than 42 hour for a 2TB LUN!!!???

From the man page:

"Most HP hard disks are formatted and exhaustively tested at the factory by use of a process more thorough but also more time-consuming than appropriate for mediainit."


Pete

Pete
Matti_Kurkela
Honored Contributor
Solution

Re: on rp3440/11i v2 "mediainit" takes more than 42 hour for a 2TB LUN!!!???

1.) No, you don't have to. And you should not.

mediainit is neither required nor recommended for most modern disks. In fact, mediainit might damage some (semi-)modern disks.

Even the most basic SCSI disks today have a built-in defect management system in the disk firmware/hardware level, so the OS normally sees the disk as having zero defects. The primary purpose of mediainit was to detect and mark as unusable any defective blocks - but if a modern disk with an internal defect management has an OS-visible defective block, it often means the disk is already pretty seriously damaged and should not be used any more.

Modern disks are also low-level formatted at the factory, using more advanced formatting schemes than mediainit can do. For example, the interleave factor is usually variable, based on the distance to the center of the disk platter. It is all handled by the disk's internal electronics.

Some disks may have their performance and/or capacity reduced if their advanced low-level format is overwritten with mediainit's simplistic version: if this happens, only the disk manufacturer's special programs have a chance of fixing it. To protect against this, most modern disks will simply *ignore* any traditional low level formatting commands: the disk will send an appropriate result code to the OS, but might actually do nothing at all.

With external storage systems like Virtual Arrays, *if* any low-level formatting is required, it should be done with the VA administration tools, *not* with mediainit at the host side.

2.) Yes: don't do it. See answer 1.

3.) Yes: don't do it. See answer 1.

MK
MK
Steven E. Protter
Exalted Contributor

Re: on rp3440/11i v2 "mediainit" takes more than 42 hour for a 2TB LUN!!!???

Shalom,

1. No need to run mediainit on a new LUN. I use it to erase a physical disk on occasion.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Torsten.
Acclaimed Contributor

Re: on rp3440/11i v2 "mediainit" takes more than 42 hour for a 2TB LUN!!!???

>> 1. Do I have to run mediainit on a new LUN?



Absolutely NO.

This is a virtual disk. All error management is done by the array controllers.

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!   
chris huys_4
Honored Contributor

Re: on rp3440/11i v2 "mediainit" takes more than 42 hour for a 2TB LUN!!!???

Hi,

I never did understand were this mediainit idea comes from. On HP-UX there is/was never a reason ever, to my knowledge, to execute mediainit on a disk/lun.

Greetz,
Chris
Bill Hassell
Honored Contributor

Re: on rp3440/11i v2 "mediainit" takes more than 42 hour for a 2TB LUN!!!???

mediainit is a archaic leftover from the days of 50 MB (that's megabytes, not GB or TB) real disks that had very primitive controllers. The original code would try to manage bad spots by detecting them and then performing a relocation so the disk would use the replacement sector(s). Later, disk manufacturers made it clear to computer manufacturers that this was a bad idea (relocating sectors and tracks with special test equipment) and created smarter controllers. The controller firmware knew the factory relocated sectors and could perform a media test and relocate much better than some external program.

So mediainint changed from an active test and relocate program to simply a command to initiate the firmware test/relocate inside the disk. But today, very few disks are actually directly attached to large servers like HP-UX. The new Integrity boxes have built-in RAID controllers so HP-UX doesn't really talk to the disks. The data is virtualized so that it appears to be coming from a real disk but behind the SCSI connector is a lot of electronics.

I am surprised that modern disk arrays and controllers even support the medianint commands sent to disks. The word is deprecated for mediainit.


Bill Hassell, sysadmin
newa
Frequent Advisor

Re: on rp3440/11i v2 "mediainit" takes more than 42 hour for a 2TB LUN!!!???

Thanks all.