LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-29-2009, 06:35 AM   #1
ytd
Member
 
Registered: Jan 2009
Posts: 197

Rep: Reputation: 31
How do I create partitions in character mode ?


I need to create 80 partitions of 8GB and 10 partitions of 16GB. I need to create them in character mode. This is for an informix server.

http://www.faqs.org/docs/linux_admin/x797.html
http://tldp.org/HOWTO/Partition/devices.html

I used: mknod -m 0660 /dev/sdc4 c 4 64 and when I did ls -l /dev/sdc4 it shows me crw-rw---- 1 root root 1, 8 May 29 12:26 /dev/sdc4 which is good but I don't know how to format it and I don't know how much space it use. I know I need to use symbolic link to those partitions in order to use them.

And one more thing, I don't know what 4 and 64 means in that command: "mknod -m 0660 /dev/sdc4 c 4 64". I know 4 is the minor number and 64 is the major number but I still don't understand the meaning. The minor/major number of what ? And what does it do ? I know I can do mknod -m 0660 /dev/sdc4 c 1 8 for example. So why 4 64 instead of 1 8 ?

If I try mkfs -t ext3 /dev/sdc4 it tells me: "File too large while trying to determine filesystem size"

If I try fdisk /dev/sdc4 it tells me:

"last_lba(): I don't know how to handle files with mode 21b0

Unable to read /dev/sdc4"
 
Old 05-29-2009, 08:27 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
IN linux devices are accessed using device files or nodes in /dev. The device node has a attributes major no and minor number.Device nodes can be character or block type. In your example 4 is the major no and 64 the minor number instead of your writing. Each different device is given a major number and similar or variants given minor number. For more info read the devices.txt file in the Documentation folder of Linux Kernel Source.

You can use LVM to have logical volumes in which you can install different linux distributions.
 
Old 05-30-2009, 05:12 PM   #3
ytd
Member
 
Registered: Jan 2009
Posts: 197

Original Poster
Rep: Reputation: 31
Can you please help me out in this, step by step, please ? How do I use LVM, what are the commands in order to crate character devices (80 partitions of 8GB and 10 of 16GB) in character mode ? What is the exactly name of that utilitar and where do I find it ?
 
Old 05-31-2009, 07:53 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
As a rule, just use fdisk to create the partitions. Unless you've got some really weird disks, you shouldn't need to mess with mknod; the system will handle that for you.
BTW, which distro/version are you using?
 
Old 06-01-2009, 05:14 PM   #5
soleilarw
Member
 
Registered: Apr 2009
Posts: 107

Rep: Reputation: 19
I support the idea of using fdisk from a root login to create the partitions and define their partition labels. Afterwards use mkfs or some of it's wrappers (like mkfs.ext3, for example) to create the filesystem on the device. All that mangling with mknod is extremely awkward and quite unnecessary for the given task.

Linux Archive

Last edited by soleilarw; 06-18-2009 at 05:21 AM.
 
Old 06-02-2009, 01:30 AM   #6
ytd
Member
 
Registered: Jan 2009
Posts: 197

Original Poster
Rep: Reputation: 31
I use CentOS 5 64b and I do need to mess with mknod to make the partitions in character mode.
I did create the partitions using fdisk but fdisk makes the partitions in "binary" mode, and I need to make them in character mode. I don't understand english very well, so let me get this straight. You want me to use fdisk to create the partitions and after to "convert" them into character mod using mknod with ext3 ? Is that right ? If so, after I create the partitions using fdisk (which is no problem) what exactly commands should I use in order to "convert" the partitions in character mode ?

Thanks in advance.

Last edited by ytd; 06-02-2009 at 01:32 AM.
 
Old 06-02-2009, 01:38 AM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Have you seen this?

http://www.mydatabasesupport.com/for...ect-rhel5.html


May help.
 
Old 06-02-2009, 01:43 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,955

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
I think your terminology is causing confusion - can you expand a little more on what you mean by
Quote:
but fdisk makes the partitions in "binary" mode,
and
Quote:
I need to make them in character mode.
.
I (and others I suspect) thought from your first post that the term "character mode" meant something like "using the command line".
Now I'm not sure at all.

After using fdisk, a reboot should show the nodes - you should not need to mess with mknod.
After that you can use mkfs (make filesystem, not make node), to create a filesystem you can then mount and use.
 
Old 06-02-2009, 01:51 AM   #9
ytd
Member
 
Registered: Jan 2009
Posts: 197

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Tinkster View Post
Yes, that's what I need to do. I need to create RAW devices (character mode).

* RAW DEVICE (or CHARACTER DEVICE) = devices through which data is transmitted
one character at a time, using unbuffered input and output routines; such
devices are managed by using direct access and bypassing the OS layer and
its cache; raw devices are not mounted and don't have any filesystem on them.

PERFECT !

How do I do that ?

LE: I have 2.6.18-53.el5

Last edited by ytd; 06-02-2009 at 02:09 AM.
 
Old 06-02-2009, 02:28 AM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
man raw



Cheers,
Tink
 
Old 06-02-2009, 03:00 AM   #11
ytd
Member
 
Registered: Jan 2009
Posts: 197

Original Poster
Rep: Reputation: 31
Ok, I have read the manual, I still don't understand what commands I should use.
 
Old 06-02-2009, 03:10 AM   #12
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
The command raw.

You don't need to find a way to partition the disk
differently, there's no different way of partitioning;
it's all about accessing the partitions afterwards.

raw will let you map any partition of a block device
to a raw device that you can then present to informix.


Cheers,
Tink
 
Old 06-02-2009, 03:14 AM   #13
ytd
Member
 
Registered: Jan 2009
Posts: 197

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Tinkster View Post
The command raw.

You don't need to find a way to partition the disk
differently, there's no different way of partitioning;
it's all about accessing the partitions afterwards.

raw will let you map any partition of a block device
to a raw device that you can then present to informix.


Cheers,
Tink
Neah, I don't get it mate. I don't understand. Anyway, i've found something here: http://forums11.itrc.hp.com/service/...hreadId=712867 I'm gonna try that.
 
Old 06-02-2009, 03:50 AM   #14
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,955

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
From my quick search, if you are using a current version of Informix, you do not want or need raw support. That disappeared with 2.4 kernels.
Seems informix now uses O_DIRECT - as it should. See the initial link from Tink
 
Old 06-02-2009, 04:26 AM   #15
ytd
Member
 
Registered: Jan 2009
Posts: 197

Original Poster
Rep: Reputation: 31
I have 2.6.18-53.el5 and I have informix version 9.4 which is old, I know that, and we cannot upgrade to the latest version, insuficient founds :P
Should I downgrade the kernel / Install an old Linux distribution with kernel 2.4.x in order to have RAW devices ?

I have understand from you that if I use a Linux with 2.6.x kernel I can't have RAW (character devices), is that correct ?

Any advice would be great.
 
  


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
FC6 - Starts In Character Mode (Fc4 Worked fine) SteveT Fedora - Installation 4 02-12-2007 02:54 AM
how to change test sizze or character size in run level 3 in text mode? betrussell23 Linux - Newbie 1 10-13-2006 05:23 AM
Can you set a screen timeout in character mode taborekle Linux - Security 4 04-28-2006 02:28 PM
How can I change display mode from character mode to graph mode wuzhong Linux - Hardware 1 08-08-2004 10:36 AM
Create software RAID partitions first, then create filesystem partitions on top of th stefanlasiewski Linux - Software 1 04-28-2004 05:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:21 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration