LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 12-13-2014, 08:20 AM   #1
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Rep: Reputation: Disabled
Not able to save primary partition


Hi All,

Am able to create the primary partition P1 and P2 but am unable to save it. While saving those am getting below error. Have tried the same also by rebooting the OS, but still the same. What needs to be done to overcome this.My RHEL 6 is installed as virtual OS in VM ware.

]# fdisk /dev/sda2

Command (m for help): p

Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009b5c6

Device Boot Start End Blocks Id System
/dev/sda1 * 1 39 307200 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 39 2101 16567296 83 Linux
/dev/sda3 2101 2611 4096000 82 Linux swap / Solaris

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@localhost Desktop]#
 
Old 12-13-2014, 08:42 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
The correct syntax is:
fdisk /dev/sda.

All available space on the disk is currently being used. If you want to create additional partitions you need to extend the size of the virtual disk (VMDK). When you reboot the guest it should see the additional space.

Create sda4 as an extended partition using the additional space and then you can create multiple logical partitions.
 
Old 12-13-2014, 09:11 AM   #3
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
I've extended 5gb in virtual hdd. But am able to see the new space in any of the partition . I've used these commands to check.

fdisk -l
df -h

Both these commands giving me same results as before.
 
Old 12-13-2014, 09:36 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Did you reboot RHEL?
Post the output of fdisk -l
 
Old 12-13-2014, 10:15 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Moderator Response

Moved: This thread is more suitable in <Red Hat> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 12-13-2014, 11:13 AM   #6
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
Yes, i ve rebooted it twice.

[root@localhost Desktop]# fdisk -l

Disk /dev/sda: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009b5c6

Device Boot Start End Blocks Id System
/dev/sda1 * 1 39 307200 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 39 2101 16567296 83 Linux
/dev/sda3 2101 2611 4096000 82 Linux swap / Solaris
[root@localhost Desktop]#




 
Old 12-13-2014, 11:24 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Original
Quote:
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
resized
Quote:
Disk /dev/sda: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
So it did increase in size by 5GB. This is unallocated space so it will not show up as part of any other partition. So what do you want to do with this extra space? Create more partitions?
 
Old 12-13-2014, 01:44 PM   #8
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
Yes, my objective is to create partition from the newly added space.
 
Old 12-13-2014, 01:52 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
I would create sda4 as an extended partition with the entire space. Then you can create multiple logical partitions if desired.
 
Old 12-14-2014, 01:27 AM   #10
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
Created extended partition now. But not able to create the logical partitions. Plz check my commands and suggest.

[root@localhost Desktop]# fdisk -l

Disk /dev/sda: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009b5c6

Device Boot Start End Blocks Id System
/dev/sda1 * 1 39 307200 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 39 2101 16567296 83 Linux
/dev/sda3 2101 2611 4096000 82 Linux swap / Solaris
/dev/sda4 2700 3200 4024282+ 5 Extended
[root@localhost Desktop]# fdisk /dev/sda4

Unable to open /dev/sda4
[root@localhost Desktop]#
 
Old 12-14-2014, 05:23 AM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Quote:
fdisk /dev/sda4
fdisk always uses the drive device i.e. /dev/sda
 
Old 12-16-2014, 12:21 AM   #12
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
I created a logical partition /dev/sda5 now from the extended partition. But am unable to format it with ext3. Plz view the below executed commands.


[root@localhost Desktop]# fdisk -l

Disk /dev/sda: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009b5c6

Device Boot Start End Blocks Id System
/dev/sda1 * 1 39 307200 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 39 2101 16567296 83 Linux
/dev/sda3 2101 2611 4096000 82 Linux swap / Solaris
/dev/sda4 2700 3200 4024282+ 5 Extended
/dev/sda5 2700 3000 2417751 83 Linux

[root@localhost Desktop]# mkfs.ext3 /dev/sda5
mke2fs 1.41.12 (17-May-2010)
Could not stat /dev/sda5 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
[root@localhost Desktop]#
 
Old 12-16-2014, 05:16 AM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
The syntax is correct. Did you reboot the guest?
 
Old 12-17-2014, 11:30 PM   #14
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
I rebooted. Its works fine now. Ty micheal for all your swift responses. I may come with more questions later on
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HowTo convert Primary Partition to Logical (ie move it inside the Extended Partition) Tom6 Linux - Software 3 11-29-2010 03:40 PM
[SOLVED] Transferring from save file to save partition hda7 Puppy 2 05-04-2010 08:11 AM
openSolaris hosed the partition table. Why? Changing primary to secondary partition? JZL240I-U Solaris / OpenSolaris 9 10-16-2008 10:48 AM
[SOLVED] Safety: Primary Partition and Extended (Logical) Partition MBA Whore Linux - Security 11 01-03-2007 02:05 PM
Partition Problems: Bad primary partition 1: logical partitions overlap rovitotv Slackware 6 01-08-2006 06:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration