Operating System - Linux
1830619 Members
2590 Online
110015 Solutions
New Discussion

fdisk on Red Hat A.S. 3.0

 
SOLVED
Go to solution
Edwin Ruiz_2
Super Advisor

fdisk on Red Hat A.S. 3.0

Hi!
I have installed Redhat A.S. 3.0. i want to display the table partitions using fdisk but this dont retun nothing. There are other form to display that information on A.S. 3.0. Or how can i resolv this isue.

Thanks for ur help
10 REPLIES 10
Stuart Browne
Honored Contributor

Re: fdisk on Red Hat A.S. 3.0

'fdisk -l /dev/hda' or 'sfdisk -l /dev/hda' where your hard-drive is the device '/dev/hda'.

If your hard-drive is something other than that, use that device name.

To find out what it's device name is, use 'mount', and strip off the trailing number from one of the listed device nodes.
One long-haired git at your service...
Edwin Ruiz_2
Super Advisor

Re: fdisk on Red Hat A.S. 3.0

I get that error when use sfdisk. When i use fdisk that return nothing


[root@salato-apl12 root]# sfdisk -l /dev/cciss/c0d0p
/dev/cciss/c0d0p: No such file or directory

sfdisk: cannot open /dev/cciss/c0d0p for reading
Stuart Browne
Honored Contributor

Re: fdisk on Red Hat A.S. 3.0

What user are you doing it as?

Also, please show us the output of the command 'mount'.
One long-haired git at your service...
Roberto Polli
Trusted Contributor

Re: fdisk on Red Hat A.S. 3.0

that device doesn't exist!!!

a valid device is
/dec/cciss/c0d0

or

/dev/cciss/c0d0p1

check thru
ls /dev/cciss/cXdYpZ


Peace, R.


Edwin Ruiz_2
Super Advisor

Re: fdisk on Red Hat A.S. 3.0

That is mount command show

[root@salato-apl12 root]# mount
/dev/cciss/c0d0p2 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/cciss/c0d0p10 on /home type ext3 (rw)
/dev/cciss/c0d0p5 on /opt type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/cciss/c0d0p9 on /tmp type ext3 (rw)
/dev/cciss/c0d0p3 on /u01/app/ias9ir2 type ext3 (rw)
/dev/cciss/c0d0p7 on /usr type ext3 (rw)
/dev/cciss/c0d0p8 on /usr/local type ext3 (rw)
/dev/cciss/c0d0p6 on /var type ext3 (rw)


####################
[root@salato-apl12 root]# fdisk -l /dev/cciss/c0d0p9

Disk /dev/cciss/c0d0p9: 5243 MB, 5243273216 bytes
255 heads, 32 sectors/track, 1254 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Disk /dev/cciss/c0d0p9 doesn't contain a valid partition table

########################3

I would like to use my free space on my disk


Stuart Browne
Honored Contributor
Solution

Re: fdisk on Red Hat A.S. 3.0

The first half of what Roberto was saying was precisely correct. I didn't pick up on the trailing 'p'.


The actual container (logical disk) is the device node:

/dev/cciss/c0d0

So you want to use:

fdisk -l /dev/cciss/c0d0

The 'p[0-9]' is the partition number of the disk 'd0' on controller 0 ('c0').

It does all make sense ;) A simple 'ls -l /dev/cciss | more' will show all of the previously created device nodes. Browsing through them should make sense now.
One long-haired git at your service...
Roberto Polli
Trusted Contributor

Re: fdisk on Red Hat A.S. 3.0

with RH AS I suggest using
parted
instead of fdisk

Peace, R.
Edwin Ruiz_2
Super Advisor

Re: fdisk on Red Hat A.S. 3.0

Perfect!
i use fdisk -l /dev/cciss/c0d0 this is the output. How can i know what is my free space? thanks!

[root@salato-apl12 root]# fdisk -l /dev/cciss/c0d0

Disk /dev/cciss/c0d0: 72.8 GB, 72833679360 bytes
255 heads, 32 sectors/track, 17433 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 502 2048144 83 Linux
/dev/cciss/c0d0p2 503 2259 7168560 83 Linux
/dev/cciss/c0d0p3 2260 7279 20481600 83 Linux
/dev/cciss/c0d0p4 7280 17433 41428320 f Win95 Ext'd (LBA)
/dev/cciss/c0d0p5 7280 9036 7168544 83 Linux
/dev/cciss/c0d0p6 9037 10793 7168544 83 Linux
/dev/cciss/c0d0p7 10794 12550 7168544 83 Linux
/dev/cciss/c0d0p8 12551 13805 5120384 83 Linux
/dev/cciss/c0d0p9 13806 15060 5120384 83 Linux
/dev/cciss/c0d0p10 15061 16315 5120384 83 Linux
/dev/cciss/c0d0p11 16316 16829 2097104 82 Linux swap
You have new mail in /var/spool/mail/root
Yong_7
Frequent Advisor

Re: fdisk on Red Hat A.S. 3.0

Hi,

-s partition
The size of the partition (in blocks) is printed on the standard output.

to save your caculation, so, it's

fdisk -s /dev/cciss/c0d0p1
fdisk -s /dev/cciss/c0d0p2
..........
fdisk -s /dev/cciss/c0d0p11

Regards !

YJ
Edwin Ruiz_2
Super Advisor

Re: fdisk on Red Hat A.S. 3.0

thanks for all