Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Friday 1 November 2013

Devices in linux


Charcter / Raw Devices:
- A Raw device is a device that allows only "serial" access

Block Devices:

- A Block device is any device that allows "random" access
- Ex: Hard disk, disk partitions, RAM, Logical Volumes, RAID volumes
- It can be used for file systems, swaps, RAID, LVM
- Have a special file in /dev

Floppy Disks:
- Floppy disks have special files from /dev/fd0, /dev/fd1 .. upto 8 files/devices

Hard Disks:
- Mostly used types are IDE and SCSI

IDE:
- IDE Disks have special files from /dev/hda, /dev/hdb .. upto 8 files/devices
- Maximum 2 disks on 1 bus, 2 buses on 1 adapter, 2 adapters in a system.


SCSI:
- Depending on the scsi type, you can have maximum 7 or 15 disks on 1 bus
- SCSI Disks have special files from /dev/sda, /dev/sdb .sdz, then sdaa thru sddx. upt0 128 files/devices
- Also includes SD, DVD-ROM, tapes, ..
- Linux kernel supports a total of 128 SCSI disks by default

Partitions:
- Maximum of 4 primary partitions
- you can have 1 extended partition as a primary partition
- An extended partition can have multiple logcal partitions
- By deafult, linux supports 59 logical partitions on IDE and 11 logical on SCSI disks
- Partitions can be created using "fdisk /dev/sdx" command
- To view current partitions, use "fdisk -l" command
- Each partition can be of types Linux, Linux Swap, Linux LVM depending upon the usage

RAM Disk:
- Is a block device created in memory

- Is temporary, gets deleted after reboot

- By default Linux supports upto 16 RAM disks and maximum 255 RAM disks

- Use 'dd' command to create a RAM disk
# dd if=/dev/zero of=/dev/ram1 bs=1k count=4096

- To delete a RAM disk,
# freeramdisk /dev/ram1
- initrd (Initial RAM disk) is a compressed ramdisk image which is mounted as initial root filesystem
- Use 'mkinitrd' command to create initial ram disk

No comments:

Post a Comment