- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: can you tell me the difference of character de...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 03:16 AM
07-28-2004 03:16 AM
but use: vgcreate vg01 /dev/dsk/c2t5d0
can you tell me the rule of use c device file
or b device file?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 03:42 AM
07-28-2004 03:42 AM
Re: can you tell me the difference of character device file and block device file?
pvcreate prepares the disk to be used as LVM disk. vgcreate understand only blocks. So block device must be used.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 03:45 AM
07-28-2004 03:45 AM
Re: can you tell me the difference of character device file and block device file?
When dealing with IO, the device can read and write without buffer, one caracter at a time - aka caracter device - or using a buffer feed with various caracter, a block of data - aka block device.
Cheers
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 03:59 AM
07-28-2004 03:59 AM
Re: can you tell me the difference of character device file and block device file?
block device files are uing data's by byte by byte stream
You can detect a file is weather character or block using it's permissions as,
b--------- -- block device
c--------- -- character device
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 04:14 AM
07-28-2004 04:14 AM
SolutionFor instance diskinfo, pvcreate.
The vgcreate, vgextend command is not at the physical level, so you would use the block device (dsk).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 04:18 AM
07-28-2004 04:18 AM
Re: can you tell me the difference of character device file and block device file?
why also use character file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 04:25 AM
07-28-2004 04:25 AM
Re: can you tell me the difference of character device file and block device file?
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 05:58 AM
07-28-2004 05:58 AM
Re: can you tell me the difference of character device file and block device file?
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 06:06 PM
07-28-2004 06:06 PM
Re: can you tell me the difference of character device file and block device file?
Block devices uses a buffering mechanism. So they can choose by which order to respond for requests.
This is important in the case of storage devices, where it's faster to read or write sectors which are close to each other, rather than those which are further apart.
Character devices are not using buffering mechanism to interact with the kernel.
Another one more difference is that block devices can only accept input and return output in blocks (whose size can vary according to the device), whereas character devices are allowed to use as many or as few bytes as they like.
We can determine the type of device by using , ls -l of that device.
example
# ll /dev | grep brw
brw-r----- 1 bin sys 255 0xffffff Jun 15 05:43 root
# ll /dev | grep crw
crw------- 1 root sys 1 0x000080 Apr 16 07:08 GSPdiag1
crw-rw-rw- 1 root root 72 0x000013 Jul 29 08:29 arp
#
-Saravanan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 07:12 PM
07-28-2004 07:12 PM
Re: can you tell me the difference of character device file and block device file?
As you know, there are tow main types of device files: block and character, represented by the character b and c, respectively. All I/O devices can be classified as block or character. Then:
Block device files transfer data using the system buffers to speed up I/O transfer.
Storage devices such as tape drives, hard and floppy disks, and magneto-optic drives can use block device files.
Character device files transfer data blocks of varying sizes one character at a time without using the system's I/O buffers. The user program does its own buffering. Typically the following devices use character device files: terminals, printers, plottters, digitizers, magnetic tape drives, cartridge tape drives, and disk mass storage devices. Chracter I/O tranfer is also called raw I/O transfer, and sometimes characters devices are called raw devices.
Disk drives generally need both block and character device files. The file system access ordinary files and directories with block device files, using the buffer cache for speed. A database can use a character device file to access an area of the disk that the file system does not use. File system integrity is checked using fsck through the character device file, since fsck requires low-level control of teh device.
For complementary info pls check man pages of the fsck and newfs commands.
Rgds.