LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-01-2006, 10:33 AM   #1
myslfkeepslippin
LQ Newbie
 
Registered: Nov 2005
Location: MS, US
Distribution: Slackware
Posts: 4

Rep: Reputation: 0
Created new partition. No device node for it. udev Slack10.2


Hey,


I got rid of a winders partition on my SATA drive /dev/sda. I created two partitions in its place. Previous layout of drive:

/dev/sda1 type linux
/dev/sda2 type ntfs

Current
/dev/sda1 linux
/dev/sda2 linux
/dev/sda3 swap

So now this drive has a third partition. Now the only problem is that I cannot figure out how to create a /dev/sda3 entry so I can create that swap and begin using it WITHOUT rebooting, hehe. I have tried manually creating the device file with mknod with the proper major minor and all that good stuff. But I still get this from the command

#mkswap /dev/sda3
no such device or address: /dev/sda3

What can I do to get udev or hotplug to notice this change in the disc partitioning, short of just rebooting the machine or changing runlevel? I have read some man pages for udev and I couldn't really find what I was looking for.

More info:
Slack 10.2
Kernel 2.6.13.2

I have tried restarting the /etc/rc.d/rc.hotplug and rc.udev scripts.
I don't remember having to reboot in the past after changing non root partitions in linux. And I would hate to have to reboot this machine just b/c of this. I thought I was past the DOS fdisk have to reboot days. If I can't accomplish this without rebooting, for this instance, I would like to know if there is something I could change in udev.conf that would allow it in the future.


Thanks

Joe-
 
Old 02-01-2006, 11:05 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
If you are using udev (and you seem to be) it should be automatically created. If it's not, you can try running:
Code:
sfdisk -R /dev/sda
This forces the kernel to re-read the partition table on the device. See the sfdisk man page for details.
 
Old 02-01-2006, 12:01 PM   #3
myslfkeepslippin
LQ Newbie
 
Registered: Nov 2005
Location: MS, US
Distribution: Slackware
Posts: 4

Original Poster
Rep: Reputation: 0
Apparently it can't be done. I get a Device or resource busy(i tried the --noreread and --force options). /dev/sda1 is mounted as / but no changes were made to this partition. I have done some more reading and some googling found a few interesting things like partx and such. I just don't understand why this isn't available in 2.6. Seems we might be behind winders here. I've known how to do the very same thing since Win2k without rebooting.

If you have anymore suggestions let me know.

Thanks for help!


Joe-
 
Old 02-01-2006, 12:05 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I've repartitioned several drives without rebooting, though admittedly not the drive containing my root partition. I'm not sure where the problem is coming from.
 
Old 02-01-2006, 12:29 PM   #5
myslfkeepslippin
LQ Newbie
 
Registered: Nov 2005
Location: MS, US
Distribution: Slackware
Posts: 4

Original Poster
Rep: Reputation: 0
Well i would post a link to a thread on sambadotorg but I can't until I have 5 post, lol. Anyways, a guy wanted to do the same thing, add swap without rebooting. It seems that you cannot change the partition table in the kernel memory unless that device is not mounted or there is no swap in use.

Rant... I see this a limitation that I had thought all modern OS's no longer ran into. Wish I knew how to contribute some work around. I definitely do not see a need for LVM for this machine and a few others to avoid this in the future.

Here comes the reboot.

Thanks for your help Matir


Joe-


Here is a link to that thread with dots and http removed so i could post it.

listsDOTsambaDOTorg/archive/linux/2005-April/013334DOThtml
 
Old 02-01-2006, 02:16 PM   #6
myslfkeepslippin
LQ Newbie
 
Registered: Nov 2005
Location: MS, US
Distribution: Slackware
Posts: 4

Original Poster
Rep: Reputation: 0
I take all that back! I just found out that parted will update the kernel's partition tables. You can find parted at gnu.org. partprobe is what you want to run after installing the parted pkg/source.

a cat of /proc/partitions now shows /dev/sda3 for me.


Joe- 8-)
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Floppy device node missing. jcormacey Red Hat 2 01-25-2006 05:05 AM
Problem in opening node created by mknod bond_7942 Linux - Software 3 11-02-2005 04:12 AM
I can`t create a device node in /dev gcasados Slackware 8 02-21-2005 05:17 AM
udev does not create scsi device node maenho Linux - Software 0 11-27-2004 05:08 AM
Help! udev created 51 sound devices! tamills Debian 2 05-17-2004 09:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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