Raw I/o


 
Thread Tools Search this Thread
Operating Systems AIX Raw I/o
# 1  
Old 10-24-2007
Raw Disk I/o

Is there any system call available in AIX to read the size of raw disk?

If I use the command "lspv -L",it only gives size of PVs on which file system is there. I need to extract the size raw disk i.e. file system is not there on the disk.

Thanks,
Megha

Last edited by MeghaV; 10-24-2007 at 06:41 AM..
# 2  
Old 10-24-2007
bootinfo -s <hdiskXXX> gives you the size of the disk in MB.

Last edited by Sprellarinn; 10-24-2007 at 06:17 AM.. Reason: Correction
# 3  
Old 10-24-2007
I tried this also. But everytime with "bootinfo -s hdiskXX" it gave me 1024
Where on hdiskXXX no file system is there.
# 4  
Old 10-24-2007
Have a look in smit, it can show the form of command it uses.

# this will list the physical disks
getlvodm -C

# this will show the status of the disk
lspv hdisk0
# 5  
Old 10-24-2007
The problem is there is not a single solution to this, so i give you a list of options you have in order of preferability (is this a word? english is not my native language):

SCSI-disk and native SSA-disks (not SSA-RAID-volumes, etc.) have an attribute called "size_in_mb", which you could read. Example: to get the size of hdisk0 you can type (and get this sample information for a 18GB disk)

Code:
# lsattr -El hdisk0 -a size_in_mb
size_in_mb 18200 Size in Megabytes False

If the disk in question is in a volume group you can find out with lspv like this (output is exemplary):
Code:
# lspv hdisk4
PHYSICAL VOLUME:    hdisk4                   VOLUME GROUP:     joker_int_vg
PV IDENTIFIER:      000bf05d981228ff VG IDENTIFIER     000bf05d95422f4d
PV STATE:           active                                     
STALE PARTITIONS:   0                        ALLOCATABLE:      yes
PP SIZE:            64 megabyte(s)           LOGICAL VOLUMES:  4
TOTAL PPs:          1093 (69952 megabytes)   VG DESCRIPTORS:   2
FREE PPs:           130 (8320 megabytes)     HOT SPARE:        no
USED PPs:           963 (61632 megabytes)    MAX REQUEST:      256 kilobytes
FREE DISTRIBUTION:  00..00..00..00..130                        
USED DISTRIBUTION:  219..219..218..218..89

you could also use bootinfo, BUT: bootinfo is usually only executable by root, whereas lsattr is executable by everybody AND the bootinfo command won't work on some disks.

I hope this helps.

bakunin
# 6  
Old 10-26-2007
Also usfull commands


lsvg |lsvg -il

lsvg |lsvg -ip
# 7  
Old 10-26-2007
Quote:
Originally Posted by ravager
Also usfull commands


lsvg |lsvg -il

lsvg |lsvg -ip
better use the "-o"-option of lsvg to get only the active VGs (the ones in the status VARYON), otherwise you will get a lot of error messages on the standby part of a HACMP cluster:

lsvg -o | lsvg -il

lsvg -o | lsvg -ip

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Specify the raw format

Hey friends, i am trying to set up a raspbian wheezy vm on ma Unbuntu using qemu. when i try to run the setup command the error is: i tried to find something here in the forum but did not find anything. i was searching like 15 min pls dont roast me if there is a post explaining it. :)... (3 Replies)
Discussion started by: LinuxPlayer1809
3 Replies

2. Red Hat

Raw Devices

Can you please modify my script. This script is not working for i in /dev/sdf do /bin/raw /dev/raw/`/bin/basename ${i}` ${i} /bin/sleep 2 /bin/chown orasm:ordba /dev/raw/`/bin/basename ${i}` /bin/chmod 660... (9 Replies)
Discussion started by: karthik9358
9 Replies

3. Filesystems, Disks and Memory

Raw volumes

The query is as follows : A typical server configs when using Oracle or any other type of DB is to install the OS + DB binaries on the internal disks of the relevant server e.g. Disk 1 : OS + SW + DB binaries Disk 2 : Mirror of disk 1 (used for resiliency) Then one uses an external array... (1 Reply)
Discussion started by: kekanap
1 Replies

4. UNIX for Dummies Questions & Answers

Using the Raw command

Hi, What is a Raw command and how does it work? We have to print out a large report from our database numerically and wanted to know how it can be done. :confused: (1 Reply)
Discussion started by: nov_user
1 Replies

5. UNIX for Dummies Questions & Answers

raw disk

What do u mean by raw and cooked disk? What are the advantages of having raw disk? Thanks n regards, (1 Reply)
Discussion started by: kingsto88
1 Replies

6. Solaris

About raw partition

Hi I have solaris 8 installed on Intel machine. the disk I have is IDE. I would like to know how can I create a raw partition on an IDE disk. Regards, Raja (2 Replies)
Discussion started by: RajaRC
2 Replies

7. UNIX for Advanced & Expert Users

Raw vs. Filesystem?

Maybe this is the wrong forum to start this debate and I apologize if it is, but I have been wondering for some time which is better to use for a database, raw or filesystem? By better I mean don't just mean better performance but also ease of maintenance, etc. I know that several years ago it... (5 Replies)
Discussion started by: keelba
5 Replies

8. Filesystems, Disks and Memory

raw partitions

i want to know, how do i to create a rwa partttions in unixware 7 wit raid 5 best regards felix arteaga (1 Reply)
Discussion started by: farteaga
1 Replies
Login or Register to Ask a Question