Mount the hard disk to the mount point

Source: Internet
Author: User

Fdisk-l view all hard disk Information

DF-H

For example, Mount/dev/SDB to/mnt/sdb.

-Create a file system for the disk: mkfs. ext3/dev/SDB

-Create a mount point: mkdir/mnt/SDB

-Mount: Mount/dev/sdb/mnt/SDB

-Fdisk-l

If you have any questions:

Disk/dev/SDB doesn' t contain a valid Partition Table

-Fdisk/dev/SDB

Command (M for help): m

Command action

A toggle a bootable flag

B edit BSD disklabel

C toggle the DOS compatibility flag

D delete a partition

L List known partition types

M print this menu

N Add a new partition

Here we want to add a new partition, So enter "N ":

Command (M for help): n

Command action

E extended

P primary partition (1-4)

P

Partition Number (1-4): 1

First cylinder (1-14098, default 1): (Press enter here)

Using default value 1

Last cylinder or + size or + sizem or + sizek (1-14098, default 14098): (Press enter here)

Using default value 14098

Command (M for help): p

Disk/dev/SDB: 115.9 GB, 115964116992 bytes

255 heads, 63 sectors/track, 14098 Cylinders

Units = cylinders of 16065*512 = 8225280 bytes


Device boot start end blocks ID system

/Dev/sdb1 1 14098 113242153 + 83 Linux

You can now write data to the partition table, so enter "W ":

Command (M for help): W

The partition table has been altered!

Calling IOCTL () to re-read partition table.

Syncing disks.

 

Then add the "Mount" action to the startup task.
VI/etc/fstab

Add a row:

/Dev/sdb/mnt/SDB ext3 defaults 0 1

Now, fdisk-L is used, and the result is normal.

Check that DF-H has been mounted normally.

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.