What is the difference between a direct mount drive and a mount partition in Linux?

Source: Internet
Author: User



1. Questions

What is the difference between a direct mount drive and a mount partition in Linux?
such as/dev/sdb's hard drive, directly mkfs.ext4/dev/sdb after mount use,
and the first Fdisk partition, which is used in the MKFS on Mount,
What is the difference between the two?


2. Answer 1

Are you sure you don't want to partition? Instead of a hard drive just into one area?

Direct use of/dev/sdb hard drive, direct MKFS.EXT4

Can I use it?


3. Answer 2

The operation is as follows:


[Email protected]_storage ~]# fdisk-l

disk/dev/sda:21.5 GB, 21474836480 bytes
255 heads, Sectors/track, 2610 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x0008b221

Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 512000 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 2611 20458496 8e Linux LVM

disk/dev/mapper/vg_rhel6x64-lv_root:18.9 GB, 18865979392 bytes
255 heads, Sectors/track, 2293 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000


disk/dev/mapper/vg_rhel6x64-lv_swap:2080 MB, 2080374784 bytes
255 heads, Sectors/track, 252 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000


disk/dev/sdb:42.9 GB, 42949672960 bytes
255 heads, Sectors/track, 5221 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000


disk/dev/sdc:21.5 GB, 21474836480 bytes
255 heads, Sectors/track, 2610 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

[Email protected]_storage ~]# MKFS.EXT4/DEV/SDC
MKE2FS 1.41.12 (17-may-2010)
/DEV/SDC is entire device, not just one partition!
Do you want to continue anyway? (y,n) Y
File System label =
Operating system: Linux
Block size =4096 (log=2)
Chunked size =4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1310720 inodes, 5242880 blocks
262144 Blocks (5.00%) reserved for the Super user
First block of data =0
Maximum filesystem blocks=4294967296
Block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000

Writing Inode table: complete
Creating Journal (32768 blocks): complete
Writing Superblocks and FileSystem accounting information: Complete

This filesystem would be automatically checked every mounts or
Whichever comes first. Use Tune2fs-c or-i to override.
[Email protected]_storage ~]# mount/dev/sdc/mnt
[Email protected]_storage ~]# cd/mnt
[[Email protected]_storage mnt]# ls
Lost+found
[Email protected]_storage mnt]# FDISK/DEV/SDC
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF Disklabel
Building a new DOS disklabel with disk identifier 0XAED63D20.
Changes'll remain in memory only, until the decide to write them.
After that, of course, the previous content won ' t is recoverable.

Warning:invalid flag 0x0000 of partition Table 4 would be a corrected by W (rite)

Warning:dos-compatible mode is deprecated. It ' s strongly recommended to
Switch off the mode (command ' C ') and change display units to
Sectors (Command ' u ').

Command (M for help): P

disk/dev/sdc:21.5 GB, 21474836480 bytes
255 heads, Sectors/track, 2610 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk IDENTIFIER:0XAED63D20

Device Boot Start End Blocks Id System

Command (M for help): D
No partition is defined yet!

Command (M for help): Q


can see/DEV/SDC no partition, directly mkfs, Mount to the/mnt, and can be used, while viewing with FDISK/DEV/SDC, there is no partition.


4. Answer 3

Look at your operation is like this, but I have never so used, more unclear why, waiting for the master.

This is not even the partition table also save Ah, do not know if there will be any adverse consequences

5. Answer 4

We use hard disk, there is an area called MBR (Traditional), it is generally on the hard disk 0 bar 0 Side 1 sector, almost 512 bytes. In fact, the first 446 bytes is the real MBR, or called the Master boot record. The next 64 bytes are the partition table (MBR partition table), and the last two bytes are 55AA (this is the MBR end flag).

Because there are only 64-byte partitioned tables, there can be only 4 primary partitions (16 bytes per record) in the partition table of the MBR structure, and the maximum size per partition (2T) is also limited. So, more than 2T of hard disk, to use GPT partition table, about GPT partition table, I have not studied, If there is any information about it, I will study it.

For general use, the hard disk should be the first partition (at least one partition), if you use the entire hard disk (no partition, I am not sure if the MBR will be killed together, that is, the hard disk from the 1th sector began to use.) The landlord can put your hard disk in the first 512 bytes DD into a file, and then Hexdump-c Ufile, you can find the last two bytes is not 55AA or AA55.

6. Answer 5

Your hard drive is treated as a looping device, with a filesystem but no partitions, like DVD,CD. Partition TABLE Type:loop can be seen with parted

7. Answer 6

If not partitioned directly, the MBR area is all 0, and the new write will not occupy this sector, of course, using the Fdisk-l view is not a hard disk identifier. Because there was no 55AA.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

What is the difference between a direct mount drive and a mount partition in Linux?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.