Subject: value out of range error on a disk with free 40 GB space

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Subject: value out of range error on a disk with free 40 GB space
# 1  
Old 10-07-2013
RedHat value out of range error on a disk with 40 GB FREE space

Hi,

I installed RHEL 6.0 OS on vmware with CREATE CUSTOM LAYOUT option. And I gave the space to different mount points as mentioned below:
Code:
/ 15360MB
/boot 200MB
/tmp 3072 MB
swap 1024 MB

fdisk -cul command shows the disk size as 64.4 GB. But when I try to create partion of 10 GB with fdisk -cu command, it says "value out of range". When I created the partition with maximum possible space, it created the partion of 999 KB.

My question is where the remaining 40 GB space gone. And how can I create the partition of 10 GB space ?

Please see the sequence of the commands below:
Code:
[root@gauravclient Desktop]# fdisk -cul

Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders, total 125829120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007fb86

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      411647      204800   83  Linux
/dev/sda2          411648    31868927    15728640   83  Linux
/dev/sda3        31868928    36063231     2097152   83  Linux
/dev/sda4        36063232   125829119    44882944    5  Extended
/dev/sda5        36067328    38164479     1048576   82  Linux swap / Solaris
[root@gauravclient Desktop]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              15G  2.3G   12G  16% /
tmpfs                 504M  100K  504M   1% /dev/shm
/dev/sda1             194M   24M  161M  13% /boot
/dev/sda3             2.0G   68M  1.9G   4% /tmp
/dev/sr0              2.8G  2.8G     0 100% /media/RHEL_6.0 i386 Disc 1

[root@gauravclient Desktop]# 

[root@gauravclient Desktop]# fdisk -cu /dev/sda

Command (m for help): n
First sector (36065280-125829119, default 36065280): 
Using default value 36065280
Last sector, +sectors or +size{K,M,G} (36065280-36067327, default 36067327): +10G
Value out of range.
Last sector, +sectors or +size{K,M,G} (36065280-36067327, default 36067327): 
Using default value 36067327

Command (m for help): p

Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders, total 125829120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007fb86

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      411647      204800   83  Linux
/dev/sda2          411648    31868927    15728640   83  Linux
/dev/sda3        31868928    36063231     2097152   83  Linux
/dev/sda4        36063232   125829119    44882944    5  Extended
/dev/sda5        36067328    38164479     1048576   82  Linux swap / Solaris
/dev/sda6        36065280    36067326        1023+  83  Linux

Partition table entries are not in disk order

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@gauravclient Desktop]# partx -a /dev/sda
BLKPG: Device or resource busy
error adding partition 1
BLKPG: Device or resource busy
error adding partition 2
BLKPG: Device or resource busy
error adding partition 3
BLKPG: Device or resource busy
error adding partition 4
BLKPG: Device or resource busy
error adding partition 5
[root@gauravclient Desktop]# mkdir /test
[root@gauravclient Desktop]# mkfs.ext4 /dev/sda6
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
128 inodes, 1020 blocks
51 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=1048576
1 block group
8192 blocks per group, 8192 fragments per group
128 inodes per group

Writing inode tables: done                            

Filesystem too small for a journal
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@gauravclient Desktop]# blkid /dev/sda6
/dev/sda6: UUID="f2acf882-697e-42b9-abb6-30eb15166ec8" TYPE="ext4" 

[root@gauravclient Desktop]# vim /etc/fstab 

[root@gauravclient Desktop]# mount -a

[root@gauravclient Desktop]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              15G  2.3G   12G  16% /
tmpfs                 504M  264K  504M   1% /dev/shm
/dev/sda1             194M   24M  161M  13% /boot
/dev/sda3             2.0G   68M  1.9G   4% /tmp
/dev/sr0              2.8G  2.8G     0 100% /media/RHEL_6.0 i386 Disc 1
/dev/sda6             999K   17K  931K   2% /test

[root@gauravclient Desktop]#


Last edited by Scott; 10-07-2013 at 04:30 PM.. Reason: Use code tags, please...
# 2  
Old 10-09-2013
You left a small gap between your extended partition and the swap partition. That's what you're trying to fill with 10 GB.

Start your partition at sector 38166528. Otherwise, first create a new partition using the default values 36065280 and 36067327 to plug that gap, then create the other partition using the default start value, with +10G as the end value.
This User Gave Thanks to Scott For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Check free disk space in server

Hi, I need about 500G space in one corporate solaris server. However, I am not sure which command to use to check this. There are few volume groups in the server, and I deleted unused, old volume groups to clear some space. However, now I am not sure how to check the free space itself. ... (2 Replies)
Discussion started by: anaigini45
2 Replies

2. Shell Programming and Scripting

I need help!! disk free space script

i want to write a shell script,when disk uses is 90% then automatically send a email to distribution list (group member)...... (1 Reply)
Discussion started by: sonu pandey
1 Replies

3. Solaris

Determine free space in a Disk device

Version: Solaris 10 (August 2011) on VM I am kind of new to Solaris.From VM workstation i allocated 35 GB to this Solaris VM's Disk The disk was named c1t0d0 Few basic slices for root(8gb), swap(517mb) and /export/home(494mb) were created by the solaris Installer during the... (18 Replies)
Discussion started by: polavan
18 Replies

4. Shell Programming and Scripting

Free space at disk

Hi, I would like to create the new file system(mount point) in our unix server. before that i would like to know the total free space available in /home directory. Can you please let me know, how to find free space available for new filesystem? Be careful with your spelling and... (2 Replies)
Discussion started by: koti_rama
2 Replies

5. Solaris

Disk free space planning for Sol 10 LU

I'm getting ready to start a LU from Sol 9 to Solaris 10. I want to ensure that I have enough disk space for future upgrades. What I don't know is what free space Solaris requires. If I have 10GB of free space in /opt, will Solaris 10 use that for a LU? Or, do I need to allocate 10GB of space... (5 Replies)
Discussion started by: zeekstern
5 Replies

6. Solaris

command to get the total disk space (available + free)

is there a command to get the total disk space (available + free) on the solaris server ? thanks (3 Replies)
Discussion started by: sudhiroracle
3 Replies

7. Solaris

Unable to understand disk layout and where are the free space

Hi I am unable to understand the disk layout of one of my disk attached to v240. This is newly installed system from jumpstart. I am unable to see the free space on backup slice 2 and there are 0 to 8 slices listed when I run format and print the disk info, also there is no reference of... (9 Replies)
Discussion started by: kumarmani
9 Replies

8. UNIX for Dummies Questions & Answers

script to log free mem and disk space

I'm just learning shell scripting and am new to Unix/Linux. For the past week I've been logging how much free mem is on my server by using the '$ top' command, and the free disk space in a few directories by doing '$ df -h'. It sucks doing that every hour. Can you help me write a script... (2 Replies)
Discussion started by: enator45
2 Replies

9. AIX

AIX Free disk space

Hello, I would like to free some space to install gcc with is about 50M large, and I have no free space on my system. What can I delete? Filesystem 1024-blocks Used Free %Used Iused Ifree %Iused Mounted on /dev/hd4 262144 145436 116708 56% 7981 ... (10 Replies)
Discussion started by: aixn00b
10 Replies

10. Programming

free disk space calc

I everybody!! How can i use statvfs() to calculate disk usage and free disk space?? Im using this code: /* Any file on the filesystem in question */ char *filename = "/home/nesto/test/test.cpp"; struct statvfs buf; if (!statvfs(filename, &buf)) { ... (1 Reply)
Discussion started by: ninjanesto
1 Replies
Login or Register to Ask a Question