LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   The need of a partition (https://www.linuxquestions.org/questions/linux-hardware-18/the-need-of-a-partition-844354/)

Orangutanklaus 11-15-2010 08:32 AM

The need of a partition
 
Hiho mates!

I've surprisely recognized that it's possible to write a filesystem on a hard disk without any valid partition. Well, the general advantages of partitions are clearly. But what are possible disadvantages or limitaions if you don't use a partition (e.g. if you want to use the complete space as one volume for data mining or so)?

Regards
pace

catkin 11-15-2010 09:19 AM

The only disadvantage is that it could confuse the sysadmin who, finding no partitions, might assume the disk was not being used!

michaelk 11-15-2010 10:31 AM

No limitations that I aware of but I agree it could cause a lot of confusion.

Soadyheid 11-16-2010 10:16 AM

I'd have thought that the disk actually had one partition, i.e. the whole thing. You can't usually format a drive until you've labled it, that is, written the partition data to it. If you buy a disk it probably has a partition file already on it.

Play Bonny! :hattip:

Orangutanklaus 11-16-2010 10:35 AM

Sometimes, yes. But my new hard disk drives haven't any partitions from scratch. Further I don't believe that you can equate a blank drive with a "full size partition".

michaelk 11-16-2010 11:24 AM

External drives are usually already partitioned/formatted from the factory but internal drives are not. Many embedded systems record raw data directly to a disk or maybe to a partition without a file system. I have several Imation flash drives that are not partitioned. Neither windows or linux has any problems with reading or writing to them.

jefro 11-16-2010 03:26 PM

It has been a long time since drives and tapes have been used in raw mode or other OS's and computer types.

Most linux doc's say you should not do it in linux.

There is little to be gained anymore.

michaelk 11-16-2010 05:07 PM

Quote:

Originally Posted by jefro (Post 4161086)
It has been a long time since drives and tapes have been used in raw mode or other OS's and computer types.

Most linux doc's say you should not do it in linux.

There is little to be gained anymore.

I would agree.

frieza 11-16-2010 05:21 PM

i would add that there are still some drives that are accessed in raw mode
those would be floppies (1.44 megs isn't really big enough to split into partitions\,though i believe you CAN partition a floppy in linux) and optical disks such as cd/dvd/blu-ray disks
any larger storage mediums though use partitions

Soadyheid 11-16-2010 06:41 PM

Hmmm... Disks, including floppies are block devices. The last floppies I bought were DOS preformatted. You need to have a partition, which may be the whole drive, before you can format the drive and create a file system on the partition. Flash drives under 4Gb are usually preformatted as FAT32 devices.
I have to admit that most of my experience has been with Sun systems where the Solaris Format command allows the geometry of the disk to be re-defined but you can not format the drive until it has had the partition lable written to it.
I remember formatting a R/W CD once which meant we had a CD that acted as it it were a 680Mb floppy. If you buy a new disk for internal use, it'll be preformatted, probably NTFS. I don't believe you can write data to a disk with an undefined file system!

Play Bonny! :hattip:

catkin 11-16-2010 09:02 PM

Quote:

Originally Posted by jefro (Post 4161086)
It has been a long time since drives and tapes have been used in raw mode or other OS's and computer types.

Most linux doc's say you should not do it in linux.

There is little to be gained anymore.

Do any of those docs (it would be nice to have links) say why not?

syg00 11-16-2010 09:47 PM

Quote:

Originally Posted by Soadyheid (Post 4161242)
You need to have a partition, which may be the whole drive, before you can format the drive and create a file system on the partition.

Rubbish. Read the first post in this thread.
Quote:

I don't believe you can write data to a disk with an undefined file system!
This may be your experience on Solaris (and maybe even Windows), but is most certainly not true.

jefro 11-16-2010 10:01 PM

From wiki but I have read it many times.

"There are large differences in how disk errors are processed by various kernels. Operating systems such as FreeBSD, NetBSD, OpenBSD, Solaris, as well as different Linux kernels (i.e. hda vs. sda (<2.6.20)) behave differently. Also, Linux lacks "raw" disk devices like *BSD has, which makes it less desirable for low-level data recovery. Non-raw devices read larger blocks than requested, obscuring the actual location where the error occurred. You may wish to use "dmesg |tail -n8" to see the error messages on the console."


I'd bet you can't provide me any good reason to use a raw hard drive in any normal linux situation. As I pointed out before other OS's and other hardware are not part of this situation. If using raw hard drives were to be of any good use I think we would have seen all sorts of Distro's showing us how to use them. My guess is 99% of advanced users have only limited uses for a raw hard drive. Everyone else uses then like normal partitioned and formatted drives.

Sure one could make a claim that swap space on a raw drive is faster, I agree. Sure one might even make a claim about more usable space and that would be true as it is in other OS's. I might even agree with some raid arrays having a use.

I still think the average use is a partition and a properly selected format.

Soadyheid 11-17-2010 07:08 PM

Quote:

On Linux raw devices are deprecated and scheduled for removal, because the O_DIRECT flag can be used instead.[1] Instead of accessing a special raw device file, the application simply can (and should!) access a file with the O_DIRECT flag enabled, and caching will be disabled. Since there is still a userbase for raw devices and applications without support for O_DIRECT still exist, it has been a controversial subject on the Linux kernel mailing list.Raw devices are character devices (major number 162). The first minor number (i.e. 0) is reserved as a control interface and is usually found at /dev/rawctl. A utility called raw (see man raw) can be used to bind a raw device to an existing block device. These "existing block devices" may be disks or CDROMs/DVDs whose underlying interface can be anything supported by Linux (e.g. IDE/ATA or SCSI)
Source: Wikipedia, "Raw Device"

I stand corrected. :redface:

Play Bonny! :hattip:

jefro 11-17-2010 08:34 PM

I found that post helpful.


All times are GMT -5. The time now is 03:52 AM.