Redhat Linux 添加硬盘

简介:                                                                                                                Redhat Linu...

                                                                                                               Redhat Linux 添加硬盘

原有的分区信息
Last login: Wed Nov 30 10:01:30 2011 from 192.168.5.1
[root@ora10g ~]#
[root@ora10g ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda7             4.7G  3.0G  1.5G  67% /
/dev/sda6             2.0G   36M  1.9G   2% /tmp
/dev/sda3             4.9G  3.6G  1.1G  77% /orasoft
/dev/sda2             5.8G  5.2G  360M  94% /oradata
/dev/sda1             190M   12M  170M   7% /boot
tmpfs                 506M     0  506M   0% /dev/shm


检查系统是否认到了新添加的磁盘
[root@ora10g ~]# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          25      200781   83  Linux
/dev/sda2              26         803     6249285   83  Linux
/dev/sda3             804        1456     5245222+  83  Linux
/dev/sda4            1457        2610     9269505    5  Extended
/dev/sda5            1457        1717     2096451   82  Linux swap / Solaris
/dev/sda6            1718        1978     2096451   83  Linux
/dev/sda7            1979        2610     5076508+  83  Linux

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

为新添加的硬盘创建分区

[root@ora10g ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could 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 partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044):
Using default value 1044

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

 

查看已经添加的分区
[root@ora10g ~]# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          25      200781   83  Linux
/dev/sda2              26         803     6249285   83  Linux
/dev/sda3             804        1456     5245222+  83  Linux
/dev/sda4            1457        2610     9269505    5  Extended
/dev/sda5            1457        1717     2096451   82  Linux swap / Solaris
/dev/sda6            1718        1978     2096451   83  Linux
/dev/sda7            1979        2610     5076508+  83  Linux

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1044     8385898+  83  Linux


创建挂载新添加硬盘的目录
[root@ora10g ~]# mkdir /data2

挂载硬盘
[root@ora10g ~]# mount -t ext3 /dev/sdb /data2

查看是否挂载上
[root@ora10g ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda7             4.7G  3.0G  1.5G  67% /
/dev/sda6             2.0G   36M  1.9G   2% /tmp
/dev/sda3             4.9G  3.6G  1.1G  77% /orasoft
/dev/sda2             5.8G  5.2G  360M  94% /oradata
/dev/sda1             190M   12M  170M   7% /boot
tmpfs                 506M     0  506M   0% /dev/shm
/dev/sdb              7.9G  147M  7.4G   2% /data2
[root@ora10g ~]#

目录
相关文章
|
安全 Linux 数据安全/隐私保护
Red Hat Enterprise Linux 9.6 (x86_64, aarch64) - 红帽企业 Linux (RHEL)
Red Hat Enterprise Linux 9.6 (x86_64, aarch64) - 红帽企业 Linux (RHEL)
1447 36
Red Hat Enterprise Linux 9.6 (x86_64, aarch64) - 红帽企业 Linux (RHEL)
|
监控 Linux 应用服务中间件
Linux多节点多硬盘部署MinIO:分布式MinIO集群部署指南搭建高可用架构实践
通过以上步骤,已成功基于已有的 MinIO 服务,扩展为一个 MinIO 集群。该集群具有高可用性和容错性,适合生产环境使用。如果有任何问题,请检查日志或参考MinIO 官方文档。作者联系方式vx:2743642415。
3992 57
|
存储 Linux 内存技术
linux系统查看硬盘序列号
本文介绍在Linux系统中查看硬盘信息的三种方法:1) 使用`hdparm`工具,通过`sudo hdparm -i /dev/sda`获取硬盘序列号和型号;2) 使用`smartctl`工具,不仅可查序列号和型号,还能了解硬盘健康状态;3) 使用`lshw`命令显示存储设备拓扑信息。此外,提供通用技巧如用`lsblk`确认磁盘标识,及注意事项,例如管理员权限和云主机可能隐藏物理序列号等。
|
人工智能 安全 Linux
Red Hat Enterprise Linux 10 正式版发布 - 红帽企业 Linux (RHEL)
Red Hat Enterprise Linux 10 正式版发布 - 红帽企业 Linux (RHEL)
1613 0
Red Hat Enterprise Linux 10 正式版发布 - 红帽企业 Linux (RHEL)
|
Linux 数据库
Red Hat Enterprise Linux(RHEL)
Red Hat(红帽)是一家美国的软件公司,专注于开发开源软件产品。公司成立于1993年,总部位于美国北卡罗来纳州的罗利市。目前,Red Hat已成为全球最大的开源解决方案提供商和商业Linux主要供应商。 Red Hat由Bob Young和Marc Ewing共同创立。Marc Ewing最初创建了自己的Linux发行版,并将其命名为红帽Linux。1995年,Bob Young收购了Marc Ewing的企业,两者合并成为红帽软件公司。此后,红帽Linux逐渐发展成为一款备受欢迎的Linux发行版。 特点
592 10
Red Hat Enterprise Linux(RHEL)
|
人工智能 Java 关系型数据库
Red Hat Enterprise Linux 9.5 发布下载,新增功能亮点概述
Red Hat Enterprise Linux 9.5 发布下载,新增功能亮点概述
1133 4
Red Hat Enterprise Linux 9.5 发布下载,新增功能亮点概述
|
消息中间件 Linux RocketMQ
在Red Hat Enterprise Linux 9上使用Docker快速安装并部署
通过以上步骤,你可以在Red Hat Enterprise Linux 9上使用Docker快速安装并部署RocketMQ。这种方法不仅简化了安装过程,还提供了一个灵活的环境来管理和扩展消息队列系统。RocketMQ作为一款高性能的分布式消息系统,通过Docker可以实现快速部署和高效管理。
881 3
|
消息中间件 Linux RocketMQ
在Red Hat Enterprise Linux 9上使用Docker快速安装并部署
通过以上步骤,你可以在Red Hat Enterprise Linux 9上使用Docker快速安装并部署RocketMQ。这种方法不仅简化了安装过程,还提供了一个灵活的环境来管理和扩展消息队列系统。RocketMQ作为一款高性能的分布式消息系统,通过Docker可以实现快速部署和高效管理。
554 2
|
Ubuntu Oracle 关系型数据库
Linux操作系统最著名的两大系列Red Hat和Debian
Linux操作系统最著名的两大系列Red Hat和Debian
|
Ubuntu Linux 测试技术
下载ISO镜像的方法 Debian、Red Hat 、CentOS、Ubuntu、Kali Linux🌐
Debian、Red Hat、CentOS、Ubuntu与Kali Linux均为知名Linux发行版。下载Debian须访问官网并按计算机架构选ISO文件。Red Hat下载通常需订阅账户,可从官网登录后获取。CentOS可从官网或镜像站点下载,注意CentOS 8已停更。Ubuntu下载简便,官网直接选取版本及架构即可。Kali Linux专为安全测试设计,官网提供直接下载ISO镜像服务。
6672 0