Operating System - HP-UX
1753774 Members
7090 Online
108799 Solutions
New Discussion юеВ

Re: fsck with raw and block device file

 
newunix
Frequent Advisor

fsck with raw and block device file

in fsck some times

fsck -F vxfs /dev/vg01/lvol1

and some time raw file is mentioned

fsck -F vxfs /dev/vg01/rlvol1.

so in what scenario we should use raw and block devices with fsck.
7 REPLIES 7
Mel Burslan
Honored Contributor

Re: fsck with raw and block device file

I believe, the only time I have seen fsck run against a raw volume was on an HFS filesystem in the ancient times like 10+ years ago.

fsck checks the integrity of the filesystem on the volume. Raw volumes do not usually have filesystems on them.

Do I make sense ?
________________________________
UNIX because I majored in cryptology...
Pete Randall
Outstanding Contributor

Re: fsck with raw and block device file

I did come across this one note in "man fsck_vxfs":

"Checking the raw device is almost always faster."

That implies to me that, at least in the case of vxfs file systems, you could use either but the raw device will be quicker.


Pete

Pete
Alzhy
Honored Contributor

Re: fsck with raw and block device file

@Mel:

"fsck checks the integrity of the filesystem on the volume. Raw volumes do not usually have filesystems on them. "

Filesystems SIT on top of RAW devices. As such you can have filesystems on top of:

/dev/LVMvg/rdata
/dev/vx/rdsk/VXVMdg/data
/dev/rdsk/c100t0d100
/dev/rdisk/disk9p2

FSCK should always be used on the filesystem's RAW volume/device/disk/partition.


Hakuna Matata.
Ismail Azad
Esteemed Contributor

Re: fsck with raw and block device file

Hi,

I agree with Alzhy and so does the detailed man page of fsck_vxfs. This is a portion of the manual page on 11.31 Feb 2007 release

"special specifies one or more special character devices (for example,
/dev/rdsk/c1t0d0 or /dev/disk/disk2)"

"Operands
fsck recognizes the following operand:

special Name of one or more special character devices that contain a filesystem."

Regards
Ismail Azad






Read, read and read... Then read again until you read "between the lines".....
Viktor Balogh
Honored Contributor

Re: fsck with raw and block device file

Hi,

I always thought that fsck should be used with character device files, just like the same with the newfs command. I deliberately used that wording for 'raw' device files - the latter can be misunderstood, it probably must have happened with Mel.

Regards,
Viktor
****
Unix operates with beer.
Viktor Balogh
Honored Contributor

Re: fsck with raw and block device file

I know of some Unix variants where it doesn't matter which device file you use, the command will choose the appropriate device file. Like the latest Solaris... Maybe that's also the case with 11.31, but am not sure.
****
Unix operates with beer.
Ismail Azad
Esteemed Contributor

Re: fsck with raw and block device file

Hi...


Well there comes the "terminology" again... "Raw device files" are referred to as "character device files" also and "block device files" as "cooked device files". That is textbook definition.

However, as a partition always has a specific purpose... One of those purposes turn out to be "raw data". Raw data does_not_have a filesystem on it. Being schooled_in_HPUX, these are the coventional terms.


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