1829606 Members
1315 Online
109992 Solutions
New Discussion

Pvcreate command?

 
seenivasan
Frequent Advisor

Pvcreate command?

Dear Team,

while excuting pvcreate -f /dev/rdsk/c0t0d1 it's create pv on forcefully and PVRA happend.but why we are using rdsk?might be it's create the raw disk ok.with out "r" while excuting what it ''ll happen?
ex:"pvcreate -f /dev/dsk/c0t0d1"
and same thing for file system creation time also we are using newfs -F vxfs /dev/vg0/rdata
with out "r" what it"ll happen?

Regards,
Seenivasan
5 REPLIES 5
kemo
Trusted Contributor

Re: Pvcreate command?

pvcreate and newfs are low level commands which need row devices to work.

newfs(1M) /usr/sbin/newfs [-F FStype] [-o specific_options] [-V] special

Where:
Special represents a character (raw) special device.
same with PVCREATE

pvcreate(1M)

DESCRIPTION
The pvcreate command initializes a direct access storage device (a raw disk device) for use as a physical volume in a volume group.

thanks
kamal
seenivasan
Frequent Advisor

Re: Pvcreate command?

Hi dear,

you said pvcreate -f /dev/rdsk/c0t0d1 it's create the pv and directly access the raw lun ok.
but file system creation time why we are using "r"?

Regards,
Seenivasan
Ismail Azad
Esteemed Contributor

Re: Pvcreate command?

Hi,

The newfs command helps in creation of the structures of the filesystems like superblocks, allocation units, intent log etc. and as these structures are created the raw mode of access is used for the device file. Pvcreate also generates reserved areas on the disk which are structures that are not present on a fresh disk not managed by LVM.

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....
kemo
Trusted Contributor

Re: Pvcreate command?

We are using "r" for raw devices or for CHARACHTER devices, as all the low level commands like pvcreate, newfs, fsck ,..... etc are writing information in the first characters of the disk that is why we use the CHARACHTER device to enable these commands to write it's information.
if you use the block devices it will not work as 1 block is multible bytes "characters".
Torsten.
Acclaimed Contributor

Re: Pvcreate command?

>> without "r" what it"ll happen?

Most likely you will get an error.

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!