LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I create partitions in character mode ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-create-partitions-in-character-mode-729279/)

ytd 05-29-2009 05:35 AM

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"

veerain 05-29-2009 07:27 AM

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.

ytd 05-30-2009 04:12 PM

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 ?

chrism01 05-31-2009 06:53 PM

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?

soleilarw 06-01-2009 04:14 PM

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

ytd 06-02-2009 12:30 AM

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.

Tinkster 06-02-2009 12:38 AM

Have you seen this?

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


May help.

syg00 06-02-2009 12:43 AM

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.

ytd 06-02-2009 12:51 AM

Quote:

Originally Posted by Tinkster (Post 3559910)

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

Tinkster 06-02-2009 01:28 AM

man raw



Cheers,
Tink

ytd 06-02-2009 02:00 AM

Ok, I have read the manual, I still don't understand what commands I should use.

Tinkster 06-02-2009 02:10 AM

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

ytd 06-02-2009 02:14 AM

Quote:

Originally Posted by Tinkster (Post 3559988)
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.

syg00 06-02-2009 02:50 AM

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

ytd 06-02-2009 03:26 AM

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.


All times are GMT -5. The time now is 02:07 AM.