LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Partitioned Vs Formatted in LINUX (https://www.linuxquestions.org/questions/linux-newbie-8/partitioned-vs-formatted-in-linux-4175562502/)

Joy Stick 12-28-2015 05:49 AM

Partitioned Vs Formatted in LINUX
 
Dear all,


I procure a hard disk (EXTERNAL DISK).

When i connect to my Linux machine, it is called as unformatted disk or raw device. -

I wanna know difference between Partitioned Disk and Formatted disk in linux.

jpollard 12-28-2015 06:25 AM

All disks come formatted.

A formatted a disk originally meant that the disk has header/checksum sectors written on the disk that can be used to locate blocks of data to read/write, and contains a couple of blocks to record references to bad spots on the disk, as well as a reserve set of blocks to substitute for the bad spots. Currently this is done by the manufacturer, and systems don't have to do it themselves - and the formatter board on the disk itself does the substitution. This provides the appearance of a "perfect" disk to the host computer. Unfortunately, it also means that once the reserve set of substitution blocks is used up, the formatter board identifies itself as a failing disk, and you start getting read/write errors.

As a side effect of the host system doing the formatting, you used to be able to reformat a disk, give it a larger reserve set, and continue using the disk for a couple of more years. You can't do it anymore, but then, disks don't cost $14,000 US either.

A partitioned disk has had certain blocks of the disk written with standardized information that identifies parts of the disk. This "partition table" contains information about the starting block number, length, some flag bits, and an identification number. The exact values depend on the standard used.

reference: https://en.wikipedia.org/wiki/Disk_partitioning

Note: this doesn't address any filesystems that might be on the disk (called "formatting" by Microsoft). Creating filesystems on a disk writes a data structure on the partition that allows the operating system to know where data has been stored, what blocks are available, what a directory is, and allows the operating system to ensure that things don't get mixed up during use.

There are many different filesystems used by various operating systems.

reference: https://en.wikipedia.org/wiki/Catego...k_file_systems

Joy Stick 12-28-2015 07:35 AM

Mr Jpollard ,

I am doing my graduation. I work with windows and new to UNIX.
You explained much but i do not understand. Getting bit confused


1) Can we say all new disk are as 'raw device or unformatted disks'?

My guru told me given point.

Unformatted disk is called raw partition or raw devices

michaelk 12-28-2015 07:36 AM

Welcome to LinuxQuestions

In the context of the error message "unformatted disk or raw device" can mean several things. Either the disk is really blank i.e. raw with no partitions and not formatted with a file system, partitioned and formatted with a file system the operating does not understand or the file system has become corrupted.

In a nutshell partitioned and formatted as stated is to divide the disk into sections and create a file system on that section like FAT32, NTFS, ext4 etc.

External disks are partitioned and formatted with a file system from the manufacture. And typically they are formatted as FAT32, NTFS or exFAT. I would guess the drive is formatted as NTFS which RHEL does include support by default. If you do not need to use the drive on a windows system then reformat with a linux file system.

Joy Stick 12-28-2015 08:01 AM

Ok michaelk

I git it all hard disks are FORMATED by nature.

As per unix term, NTFS will not support to unix file systems.
so that we are saying Unformatted disk is called raw partition or raw devices

Thanks michaelk aand pollard.

Mounting the disk means what ?
Do we need to mount all external devices when we use with linux machine ?

yancek 12-28-2015 08:25 AM

Quote:

I git it all hard disks are FORMATED by nature.
"Nature" isn't involved in it. A disk may be formatted or not when you purchase it. In order to be of any use, it must be formatted with some type of filesystem.

Quote:

As per unix term, NTFS will not support to unix file systems.
A more accurate description would be the windows operating system does not support and will not read/write to a Linux filesystem. This is a business decision of microsoft. ntfs is just another filesystem.

Quote:

Unformatted disk is called raw partition or raw devices
Accurate, although an operating system reporting a device is 'raw' isn't always accurate. It may simply mean the operating system in use does not recognize the filesystem and hence reports it as a 'raw' device.

Mounting a disk mean basically to make it accessible and this needs to be done with internal and external devices with whichever operating system is being used.

Joy Stick 12-28-2015 08:44 AM

Thanks yancek , Jpollard and michaelk

I got it clearly.

One more question (Learning Purpose).
I have 2 individual machines, using vmware on top of Windows 7 i am going to install CENT OS or REDHAT LINUX.

Do i need 8 port switch box to connect two machines ? or Only LAN cables are enough ?
Trying to access computer 1 from computer 2.

michaelk 12-28-2015 08:52 AM

CentOS is the same thing as Red Hat and does not require a subscription fee.

Modern ethernet adapters should be able to auto detect a connection so only LAN a cable is required. If that does not work then you need a switch or a cross over ethernet cable.

Joy Stick 12-28-2015 01:36 PM

1 Attachment(s)
Dear michaelk, yancek

From michaelk comment :
Quote:

I would guess the drive is formatted as NTFS which RHEL does include support by default.
If you do not need to use the drive on a windows system then reformat with a linux file system.
My host machine OS is Windows 7 ultimate (file system is NTFS)
My Guest OS is Redhat (on vmware work station).

>> Please see attached jpg

D:\ --> total allocated space :224 GB (it contains some images, and ms-word docs)
I added 25gb for linux from D:\ drive.

Should i need to reformat D:\ drive to use in Linux ?
If i do reformat , do i loose all ms-docs and images from D:\ drive ?

When i create adding disk , this is appread Red Hat Enterprise Linux 4-1.vmdk
What is this ?

suicidaleggroll 12-28-2015 02:03 PM

Quote:

Originally Posted by Joy Stick (Post 5469999)
Should i need to reformat D:\ drive to use in Linux ?

No. Your Linux system is a virtual machine, which means it has no physical drive access. When it writes to its drive, it's actually writing to a virtual drive in VMWare, which turns around and sticks it in a file on your host system. The VM never interacts directly with the filesystem on the host drive, it doesn't care what it is.

Quote:

Originally Posted by Joy Stick (Post 5469999)
If i do reformat , do i loose all ms-docs and images from D:\ drive ?

You would, yes, but reformatting a drive for a VM is pointless.

Joy Stick 12-28-2015 02:18 PM

Micheal answer and suicidaleggroll answer are bit confused for me.

When i need additional space to my linux machine - (Disk maybe separate disk (External disk) or from HOST drive.
Please clarify little with both options.

Thanks in advance.

michaelk 12-28-2015 02:30 PM

My answer was based on a bad assumption that what you meant by procure and external was a physical USB drive and not an additional created virtual disk.

If the external drive from your original post is the same as the 25GB drive then it does need to be partitioned and formatted from within Red Hat. As stated by suicidaleggroll the drive as seen by the linux guest is just a file on the host.

Joy Stick 12-28-2015 02:32 PM

Thanks michaelk.

suicidaleggroll 12-28-2015 02:34 PM

If you're trying to add a second virtual disk through VMWare, then the physical drive on which you choose to store this virtual disk does not matter, and neither does its filesystem type, because the virtual machine will never interact directly with the physical drive. Once created, the virtual machine will see a raw, unpartitioned, unformatted "disk", and you'll need to use the VM to format it with whatever filesystem you choose.

If you're trying to pass a USB drive straight through to the VM so that it can manage it (which means you will NOT be able to see or interact with the drive in Windows, ONLY the Linux VM will have access to it), then the VM will have full access to the drive and you will need to format it to a filesystem the Linux OS can understand.


All times are GMT -5. The time now is 10:20 AM.