LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-31-2003, 08:49 PM   #1
marvin
LQ Newbie
 
Registered: Mar 2001
Location: The Great White North
Distribution: slack, suse, gentoo? lfs?
Posts: 7

Rep: Reputation: 0
how to /force/ kernel to reread partitions?


I fdisk'ed hdc to divide a 15G partition into two, so as to have somewhere for SuSE 8.2 pro and Gentoo, and fdisk wrote with a

"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.
Syncing disks."

So. ( "cat /proc/partitions" confirmed this )

Then I tried "apropos ioctl", and got to doing this:

"sync
blockdev --flushbufs /dev/hdc
blockdev -v --rereadpt /dev/hdc"

repeatedly, and the kernel /still/ wouldn't read the new partition table.

My question is HOW does one force the 2.4.x kernel to reread the partition-table?

( with the implicit
"being forced to reboot whenever changing the partition-table means non-mission-critical, as far as I can see..."
... or are we forced to use LVM instead of regular partitioning? In spite of the kernel-hackers' low opinion of the current version of LVM? )

TIA..
 
Old 05-31-2003, 08:51 PM   #2
manthram
Member
 
Registered: Feb 2002
Location: Fairfax, VA
Distribution: RedHat 8, Mandrake9.1, Slack9
Posts: 456

Rep: Reputation: 31
maybe you can do it by booting into single user mode and then unmounting the partition you have altered
 
Old 06-01-2003, 02:42 AM   #3
jt1020
Member
 
Registered: Apr 2003
Location: root@localhost
Distribution: Fedora Core 5, Ubuntu, Debian
Posts: 537

Rep: Reputation: 30
that could work, im not sure though...
 
Old 06-05-2003, 01:26 PM   #4
marvin
LQ Newbie
 
Registered: Mar 2001
Location: The Great White North
Distribution: slack, suse, gentoo? lfs?
Posts: 7

Original Poster
Rep: Reputation: 0
the partition I altered wasn't mounted ( I'm not THAT stupid, usually
: D )

I do have a RAID5 array using the drive, though

( other partitions:
primary-3 and primary-4 of each drive participate in a raid5 array, all primary-3's in one, all primary-4's in another .. this way I don't have to worry about re-writing /etc/raidtab every time I re-write the partition-table to modify the logicals in the extended parition2 of any drive, see )

-sigh- it seems the arrays're going to have to be unmounted to get the kernel to be able to re-load the change in the extended-partition table... grr
 
  


Reply



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
How do I get Bash to reread the bashrc file? will103 Linux - Software 11 04-13-2011 07:27 AM
How can I force 2.6.14 kernel to use 80x25 textmode in console? rylan76 Linux - Newbie 3 11-26-2005 03:24 PM
Getting emacs to STOP asking about "reread from disk?" rylan76 Linux - Software 0 02-14-2005 05:55 AM
sshd won't reread the config file - Slackware 9.0 rose_bud4201 Linux - Software 6 05-03-2004 08:14 PM
kernel 2.5 and partitions Deepu Sudhakar Linux - General 1 05-23-2003 09:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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