HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: block and char. dev
Operating System - HP-UX
1836432
Members
2482
Online
110100
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
02-05-2003 01:00 AM
02-05-2003 01:00 AM
Why does HP servers need to have a block device file /dev/dsk and character device file /dev/rdsk for hardisk and CDROM?
Can I use only one? It is rather confusing as to which one actually controls the hardisk or CDROM.
tyl
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 01:20 AM
02-05-2003 01:20 AM
Solution
Block and device files are common in all flavors of UNIX. They are not specific to HP-UX.
A device driver that controls a storage device, e.g., a disk, will export a block interface and a character interface to the same device. The block interface is accessible through the block device file (/dev/dsk/*) and the character interface is accessible through the character device file (/dev/rdsk/*).
The block device, as the name implies, allows the storage unit to be viewed as a collection of blocks. This view is required if you want to place a filesystem on the device and mount the filesystem. Only a block device can contain a filesystem that can be mounted [see mount(1M)].
A character device gives access to the raw device, i.e., the unit is viewed as a collection of bytes. This is used, for example, by mediainit(1) to format the disk and by fsck(1M) to check the disk. A utility that creates a filesystem [e.g., newfs(1M)] would need access to the character device.
Once the filesystem is created, the block device is used to mount the filesystem.
Hope this brief explanation helps.
Thanks.
Ajit
HP Gigabit Ethernet
A device driver that controls a storage device, e.g., a disk, will export a block interface and a character interface to the same device. The block interface is accessible through the block device file (/dev/dsk/*) and the character interface is accessible through the character device file (/dev/rdsk/*).
The block device, as the name implies, allows the storage unit to be viewed as a collection of blocks. This view is required if you want to place a filesystem on the device and mount the filesystem. Only a block device can contain a filesystem that can be mounted [see mount(1M)].
A character device gives access to the raw device, i.e., the unit is viewed as a collection of bytes. This is used, for example, by mediainit(1) to format the disk and by fsck(1M) to check the disk. A utility that creates a filesystem [e.g., newfs(1M)] would need access to the character device.
Once the filesystem is created, the block device is used to mount the filesystem.
Hope this brief explanation helps.
Thanks.
Ajit
HP Gigabit Ethernet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 05:08 AM
02-05-2003 05:08 AM
Re: block and char. dev
The above explanation is correct. For disks (including CDROMs), it is common to have filesystems stored on them and to improve performance, a separate driver is needed to utilize the buffer cache in HP-UX. The block device file runs through the buffer cache while the character device file does not.
Generally, you never use the character device file except for initialization (newfs or mkfs), or for specialized applications that need a 'raw' device (Sybase for instance). Even LVM has a character and block device file for each logical volume but other than useage in /etc/fstab, these device files are seldom used.
Bill Hassell, sysadmin
Generally, you never use the character device file except for initialization (newfs or mkfs), or for specialized applications that need a 'raw' device (Sybase for instance). Even LVM has a character and block device file for each logical volume but other than useage in /etc/fstab, these device files are seldom used.
Bill Hassell, sysadmin
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP