Centos VM虚拟机挂载磁盘分区

本文详细介绍了如何在CentOS VM虚拟机中挂载大于2TB的大容量硬盘分区,包括查看系统当前分区和硬盘状态、创建新分区、格式化逻辑分区、临时挂载和永久挂载等步骤,确保大容量硬盘在系统启动时能自动挂载。
摘要由CSDN通过智能技术生成

挂单个分区小于2TB分区

1.查看系统当前分区情况

实例:

E10-3:~ # df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda2              40G  4.7G  33G  13% /

devtmpfs               12G  144K  12G   1% /dev

tmpfs                 3.9G  100K 3.9G   1% /dev/shm

/dev/sda1             479M   72M 383M  16% /boot

/dev/sda5             869G  201M 824G   1% /home

/dev/sr0              2.9G  2.9G    0 100% /media/SLES-11-SP1-DVD-x86_64.0432..001

2.查看系统当前硬盘分区情况

E10-3:~ # fdisk -l

Disk /dev/sda: 999.0 GB, 998999326720 bytes

255 heads, 63 sectors/track, 121454 cylinders

Units = cylinders of 16065 * 512 = 8225280bytes

Disk identifier: 0x00004cb7

  Device Boot      Start         End      Blocks  Id  System

/dev/sda1  *           1          63      506016  83  Linux

/dev/sda2              64        5284   41937682+  83  Linux

/dev/sda3            5285        6328    8385930   82  Linux swap / Solaris

/dev/sda4            6329      121454   924749595   f  W95 Ext'd (LBA)

/dev/sda5            6329      121452  924733498+  83  Linux


Disk /dev/sdb: 999.0 GB, 998999326720 bytes

255 heads, 63 sectors/track, 121454 cylinders

Units = cylinders of 16065 * 512 = 8225280bytes

Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a validpartition table

 

Disk /dev/sdc: 4994.0 GB, 4993981612032 bytes

255 heads, 63 sectors/track, 607150 cylinders

Units = cylinders of 16065 * 512 = 8225280bytes

Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a validpartition table

3.创建新的硬盘分区

E10-3:~ # fdisk /dev/sdb

 Device contains neither a valid DOS partitiontable, nor Sun, SGI or OSF disklabel

 Building a new DOS disklabel with diskidentifier 0xd3f0a6aa.

 Changeswill remain in memory only, until you decide to write them.

 After that, of course, the previous contentwon't be recoverable.

 

 Thenumber of cylinders for this disk is set to 121454.

 There is nothing wrong with that, but this islarger than 1024,

 andcould in certain setups cause problems with:

 1)software that runs at boot time (e.g., old versions of LILO)

 2)booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

 Warning: invalid flag 0x0000 of partitiontable 4 will be corrected by w(rite)

 

 Command (m for help): m

 Command action

   a   toggle a bootable flag

   b   edit bsd disklabel

   c   toggle the dos compatibilityflag

   d   delete a partition

   l   list known partition types

   m   print this menu

    n  add a new partition

   o   create a new empty DOSpartition table

   p   print the partition table

   q   quit without saving changes

   s   create a new empty Sundisklabel

   t   change a partition's system id

   u   change display/entry units

   v   verify the partition table

   w   write table to disk and exit

   x   extra functionality (expertsonly)

 

 Command (m for help): n

 Command action

   e   extended

   p   primary partition (1-4)

 e

 Partition number (1-4): 1

 First cylinder (1-121454, default 1): 1

 Lastcylinder, +c

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值