LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-28-2011, 05:34 PM   #1
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248
Blog Entries: 3

Rep: Reputation: 17
Lightbulb RHEL 6 "after partitioning the kernel didn't update the new partition it need reboot"


Hi All,

Can it is possible we can update the new partition in the kernel table without rebooting the RHEL6
These is the os drive "sda" which have the problem

what is this mean "Partition 1 does not end on cylinder boundary".


"[root@pant ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 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: 0x00017e18

Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 1938 15360000 83 Linux
/dev/sda3 1938 2193 2048000 82 Linux swap / Solaris
/dev/sda4 2193 3916 13841446 5 Extended
/dev/sda5 2193 3193 8033917 83 Linux
[root@pant ~]#


[root@pant ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 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: 0x00017e18

Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Quote:
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 1938 15360000 83 Linux
/dev/sda3 1938 2193 2048000 82 Linux swap / Solaris
/dev/sda4 2193 3916 13841446 5 Extended
/dev/sda5 2193 3193 8033917 83 Linux
[root@pant ~]#





root@pant ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 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: 0x00017e18

Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 1938 15360000 83 Linux
/dev/sda3 1938 2193 2048000 82 Linux swap / Solaris
[root@pant ~]# fdisk /dev/sda

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').



Command (m for help): p

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 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: 0x00017e18

Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 1938 15360000 83 Linux
/dev/sda3 1938 2193 2048000 82 Linux swap / Solaris
/dev/sda4 2193 3193 8033948+ 5 Extended


Command (m for help): n
First cylinder (2193-3916, default 2193):
Using default value 2193
Last cylinder, +cylinders or +size{K,M,G} (2193-3916, default 3916): +1000

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@pant ~]#

Quote:
[root@pant ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
Quote:
[root@pant ~]# kpartx /dev/sda5
failed to stat() /dev/sda5
[root@pant ~]# kpartx /dev/sda
sda1 : 0 409600 /dev/sda 2048
sda2 : 0 30720000 /dev/sda 411648
sda3 : 0 4096000 /dev/sda 31131648
sda4 : 0 2 /dev/sda 35227648
sda5 : 0 16067834 /dev/sda 35227711
[root@pant ~]# 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?

Last edited by pantdk; 11-29-2011 at 12:35 AM.
 
Old 11-28-2011, 11:43 PM   #2
samtoddler
Member
 
Registered: Jul 2011
Location: Delhi
Distribution: Cent OS/RHEL
Posts: 37

Rep: Reputation: Disabled
Hi,


In my case it is not like this.

partprobe command shows error but it works


Code:
[root@redhat ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy).  As a result, it may not reflect all of your changes until after reboot.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.

formatted the partition using mkfs

Code:
[root@redhat ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy).  As a result, it may not reflect all of your changes until after reboot.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.

.....

and then mount

Code:
[root@redhat ~]# mkdir /opt/mytest
[root@redhat ~]# mount /dev/sdb3 /opt/mytest
[root@redhat ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
.......
/dev/sda1             291M   29M  248M  11% /mnt
/dev/sdb3             107M  5.6M   96M   6% /opt/mytest

samtoddler
 
Old 11-28-2011, 11:55 PM   #3
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248

Original Poster
Blog Entries: 3

Rep: Reputation: 17
Hi All,

Now i found the solution & that is selinux have to disable then their is no error "setenforce 0"

or do changes in "selinux booleans" then it will work perfectly
 
Old 11-29-2011, 12:02 AM   #4
samtoddler
Member
 
Registered: Jul 2011
Location: Delhi
Distribution: Cent OS/RHEL
Posts: 37

Rep: Reputation: Disabled
[SOLVED] RHEL 6 "after partitioning the kernel didn't update the new partition it need reboot"

Quote:
Originally Posted by pantdk View Post
Hi All,

Now i found the solution & that is selinux have to disable then their is no error "setenforce 0"

or do changes in "selinux booleans" then it will work perfectly
Hi,

In my case warning still persists

Code:
[root@redhat ~]# setenforce 0
[root@redhat ~]# partprobe 
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy).  As a result, it may not reflect all of your changes until after reboot.
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy).  As a result, it may not reflect all of your changes until after reboot.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
 
Old 11-29-2011, 12:08 AM   #5
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248

Original Poster
Blog Entries: 3

Rep: Reputation: 17
"Sorry for mistake" ignore the previous one setenforce 0 that is my rhel 5.7 machine but as of now in "google" that is happen becz of the "selinux booleans"
 
Old 11-29-2011, 12:12 AM   #6
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248

Original Poster
Blog Entries: 3

Rep: Reputation: 17
sorry for the mistake "samtoddler" that's happen on rhel 5.7 i have too much machine so i am getting mistake but as of now i found that it is happen because of the selinux booleans so i am on my way to resolve it
 
Old 11-29-2011, 12:22 AM   #7
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248

Original Poster
Blog Entries: 3

Rep: Reputation: 17
Hi, samtoddler

that is right your are able to make partition on new drive can you try with os drive like sda are you able to make any partition on that drive
just check out & reply

Last edited by pantdk; 11-29-2011 at 12:36 AM.
 
Old 11-29-2011, 12:53 AM   #8
samtoddler
Member
 
Registered: Jul 2011
Location: Delhi
Distribution: Cent OS/RHEL
Posts: 37

Rep: Reputation: Disabled
Hi pantdk


It shows the same error as in your case when trying to create or delete partition from
sda I got the same error

Code:
[root@toddlers ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy).  As a result, it may not reflect all of your changes until after reboot.
[root@toddlers ~]# mkfs.ext4 /dev/sda3
mke2fs 1.41.12 (17-May-2010)
Could not stat /dev/sda3 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
regards
samtoddler
 
Old 11-29-2011, 01:02 AM   #9
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Rep: Reputation: 15
Hi,

In rhel6, on which disk OS installed and you want to create new file system you need to rebbot to get it recognised.
If Disk is coming from storage then u do not required reboot.

Thanks-
Shankar
 
Old 11-29-2011, 03:28 AM   #10
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by samtoddler View Post
Hi pantdk


It shows the same error as in your case when trying to create or delete partition from
sda I got the same error

Code:
[root@toddlers ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy).  As a result, it may not reflect all of your changes until after reboot.
[root@toddlers ~]# mkfs.ext4 /dev/sda3
mke2fs 1.41.12 (17-May-2010)
Could not stat /dev/sda3 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
regards
samtoddler

Please don't mind if I am being noob but all your errors are confusing me

these are all your errors and step
Code:
[root@redhat ~]# partprobe 
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy).  As a result, it may not reflect all of your changes until after reboot.
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy).  As a result, it may not reflect all of your changes until after reboot.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
Code:
[root@redhat ~]# mount /dev/sdb3 /opt/mytest
[root@redhat ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
.......
/dev/sda1             291M   29M  248M  11% /mnt
/dev/sdb3             107M  5.6M   96M   6% /opt/mytest

Code:
/dev/sda
/dev/sdb
/dev/sr0
as I see you try to mount /dev/sdb3

but for partprobe I see errors for all the partitions...??


You never mentioned what you did to create the file system ?
please post with all related details and output of

Code:
#fdisk -l
 
Old 11-29-2011, 08:07 AM   #11
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248

Original Poster
Blog Entries: 3

Rep: Reputation: 17
Hi
"don't confuse" see As i mention that when i am trying to make a partition on OS drive which in my case is "sda" didn't creating a partition it shown error & the parprobe & kpartx or other command not helping to update the kernel so that's why the kernel didn't get update & it shown error

PLZ if you want to check the error install the rhel6 & make some partition then you will get the question or my be answer if answer share it or question intimate us

Last edited by pantdk; 11-29-2011 at 08:11 AM.
 
Old 11-29-2011, 08:46 AM   #12
PERjham
LQ Newbie
 
Registered: Nov 2011
Location: Lima - Perú
Distribution: Red Hat
Posts: 4

Rep: Reputation: Disabled
Hello, I knew that in the rhel 6 is neccesary reboot the machine when you are using CLI to partition, but if you use de GUI (system-config-xxx) it's no neccesary. The goal would be find what the GUI does, to take this into CLI.
 
Old 11-30-2011, 12:29 AM   #13
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Rep: Reputation: 15
Hi,

I have created partition on rhel6 on which OS resides. In this case reboot is required.
Again tested on LUN's coming from storage and it this case reboot doesn't required.

Thanks-
Shankar
 
Old 11-30-2011, 07:50 PM   #14
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248

Original Poster
Blog Entries: 3

Rep: Reputation: 17
Hi
That's very unorthodox to reboot the server when we made a partition from OS DISK "need to reboot"
that's right if we add or use some other disk no need to reboot the server

Last edited by pantdk; 11-30-2011 at 09:30 PM.
 
Old 12-02-2011, 05:04 AM   #15
mikey99
Member
 
Registered: Nov 2008
Location: UK
Distribution: RHEL, Fedora
Posts: 68

Rep: Reputation: 12
Quote:
Originally Posted by pantdk View Post
Hi All,

Can it is possible we can update the new partition in the kernel table without rebooting the RHEL6
These is the os drive "sda" which have the problem

what is this mean "Partition 1 does not end on cylinder boundary".
"[root@pant ~]# fdisk -l

Okay two questions here.

Question one, how can you update the kernel to see the new partition table?

Well, the kernel only reads the partition table at boot time, and stores this information to /proc/partitions. You can see this by typing

Code:
# cat /proc/partitions
When you update the partition table, you need to tell the kernel it has been updated. Normally you can use partprobe

Code:
# partprobe /dev/sdb
However, on RHEL6, this no longer works for disks that have partitions already mounted (e.g. your system disk on sda) This is considered too dangerous, so the developers stopped this in RHEL6. (It used to work for RHEL5).

You can work around this (although not advisable) by using partx to forcibly add new partitions to /proc/partitions

Code:
# partx -a /dev/sda


Question two, what is the warning about cylinder boundaries?

In RHEL6, you should be using sector units, not cylinders. Add a few extra flags to your fdisk command, -c to turn off DOS Compatibility mode (you don't need it), and -u to change units to sectors not cylinders.

Code:
# fdisk -cul /dev/sda
Hope this helps,
Mike.
 
  


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
"fsck failed. Please repair manually and reboot" after chaning non-system partition undeaf SUSE / openSUSE 17 02-07-2014 12:18 PM
[SOLVED] How to stop imbecile message "Please reboot your system" after KDE update jlinkels Linux - Desktop 1 02-08-2011 07:34 PM
RHEL 5.4 (Tikanga) on "HP Proliant 380 G6" down, "kernel: Uhhuh. NMI received. ...." pkhera_2001 Linux - Hardware 12 09-01-2010 03:37 AM
Installed kernel-devel and source for i686; didn't create directory "build" itsonlyme Linux - Kernel 3 04-05-2007 09:08 AM
RH Linux 9.0 installation step "Auto partitioning" not able to read partition table awahab Linux - Newbie 5 05-19-2005 07:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:26 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