Operating System - HP-UX
1833758 Members
2643 Online
110063 Solutions
New Discussion

Re: Command dd to write zeroes to the raw logical volume

 
SOLVED
Go to solution
Bing Wong
Frequent Advisor

Command dd to write zeroes to the raw logical volume

I have a need to initialize one or more logical volumes after the Disaster Recovery is complete. What will the dd command look like to write zeroes to the logical volume below? Or are there a better way to do so?

/dev/vgapp/lvpbk 2867200 731509 2004183 27% /prodbkup

Thank you.
4 REPLIES 4
Dave La Mar
Honored Contributor
Solution

Re: Command dd to write zeroes to the raw logical volume

Bing -
This same question is on the System Administation board today.
Your answer is there -

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=964689

Regards,
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Devender Khatana
Honored Contributor

Re: Command dd to write zeroes to the raw logical volume

Hi,

dd command should be

#dd if=/dev/zero of=/dev/vgapp/rlvpbk bs=1024

A better way should be simply removing the contents of the directory where file system is mounted using rm command.

HTH,
Devender
Impossible itself mentions "I m possible"
James R. Ferguson
Acclaimed Contributor

Re: Command dd to write zeroes to the raw logical volume

Hi Bing:

Personally, given the reputation of the providers of Disaster Recovery services, I simply do a quick cleanup. After all, the physical disk are not leaving their site.

I simply unmount all file systems and do:

# vgchange -a n vgNN
# vgexport vgNN
# pvcreate -f /dev/rdsk/cXtYdZ

Writing zeros to a device is very time-consuming, but it would be done like this (using a *raw* device file to bypass LVM and using a large blocksize for speed):

# dd if=/dev/zero of=/dev/rdsk/cXtYdZ bs=1024k

Regards!

...JRF...




Regards!

...JRF...
Bing Wong
Frequent Advisor

Re: Command dd to write zeroes to the raw logical volume

Thank you so much.