M E Fieu writes:
Hi.. May I know how to check a size of the HDD (s) in a linux box. If I issued the following command, does it mean the total HDD size is 30G ?? Could it be some of the HDD space is not used ?? If yes, how to check the real disk space?? Besides, how do we check what is the RAID type and how many HDD is beside the box via linux command or other mean ? [root@linux root]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 4.0G 289M 3.5G 8% / /dev/sda9 6.6G 1.9G 4.5G 30% /apps /dev/sda1 250M 45M 193M 19% /boot /dev/sda6 5.0G 1.7G 3.1G 36% /home none 1.3G 0 1.3G 0% /dev/shm /dev/sda8 2.0G 83M 1.8G 5% /tmp /dev/sda7 4.0G 3.1G 712M 82% /usr /dev/sda5 6.9G 157M 6.4G 3% /var
The above adds up to about 30 gig. There are no RAID volumes. RAID volumes would show up as /dev/md?? filesystems.
It's possible that you have some unused disk space. Run fdisk and use the "p" command to display your partition table. You have a SCSI hard drive on /dev/sda. Here's an fdisk example with a 36 gig SCSI hard drive, also on /dev/hda:
# fdisk /dev/sda The number of cylinders for this disk is set to 4462. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sda: 36.7 GB, 36703934464 bytes 255 heads, 63 sectors/track, 4462 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 22 176683+ fd Linux raid autodetect /dev/sda2 23 4331 34612042+ fd Linux raid autodetect /dev/sda3 4332 4462 1052257+ fd Linux raid autodetectThe "p" command tells me that my hard drive has 4462 cylinders, and the following partition table shows the starting and the ending cylinder of each partition.
Use the "p" command to show the partition allocation on your hard drive. Look at the cylinder ranges of all your partitions. If you have any unused cylinder ranges you may create new partitions in the unused space. Study fdisk's documentation carefully. A typo can turn your hard drive into a brick.
After you create a partition, use the mkfs command to format it. Again, study the documentation carefully, and double check your mkfs command before hitting enter. If you're off by one character in your device name, your existing partitions will get wiped clean.
If you've survived up to now, adding the new partition to /etc/fstab, and either manually mounting it, or rebooting, will bring it up.
Attachment:
pgptepH6tv7FB.pgp
Description: PGP signature