1. linux服务器如何挂载硬盘
一、检测硬盘能否被识别
# fdisk -l
查找新硬盘信息,类似如下文本:
Disk /dev/sdb: 36.7 GB, 36748945408 bytes
二、挂载硬盘
1、在本地硬盘中临时创建一个目录
#mkdir /opt/data/tmp1
2、挂载第二块硬盘中的一个分区/dev/sdb1到tmp1
#mount /dev/sdb1 /opt/data/tmp1
3、查看是否被挂载
# df -h
查看一下是否有类似如下文本
/dev/sdb1 3.9G 1.4G 2.3G 38% /opt/tmp/tmp1
三、卸载硬盘
#umount /dev/sdb1
注意:
1、以上操作必须为root用户
2、硬盘插上去后需要重起服务器
2. linux系统如何增加硬盘并调整分区
linux嘛,可以挂载。
硬盘复是物理设备,制你不买新的,或者不腾出其他空闲空间,没法加对吧。
取一个其他空闲的分区,或者一块新的硬盘。
把这块新的硬盘的某个分区直接挂载到 oracle 的分区就可以啊
但是这样会覆盖原来的分区。
所以最好先把原来的资料备份到新的硬盘分区,再把这个分区挂载到 oracle目录就可以
或者在原oracle下建个文件夹,把新分区挂载到这个文件夹,但是这样可能会不太方便
3. linux下,如何挂载一块硬盘
Linux 将一块硬盘进行挂载到任意目录下的方法如下:
挂载目录是任意的,由你自己内决定。
1、首先容先在虚拟机上添加一块硬盘,打开虚拟机收输入fdisk -l 将,系统中所有的分区都列出来;
4. linux系统服务器怎么加硬盘
我们可以这个在系统加载,难度不大。但是此过程大概要20分钟左右,因为需要同时服务器服务要停止。
在 Linux 下设备文件放在 /dev 目录下。
IDE 硬盘 第一块 /dev/hda 、第二块硬盘 /dev/hdb 、第三块 /dev/hdc.
SCSI 硬盘 第一块 /dev/sda 、第二块硬盘 /dev/sdb 、第三块 /dev/sdc
Hp raid or cpq array ( 这一点要注意 ).
第一个 logic driver /dev/cciss/c0d0
第二个 logic driver /dev/cciss/c0d1
以添加 SCSI 硬盘为例:
[root@linux /]# fdisk /dev/sdb 用 fdisk 工具来创建新的分区
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 17366.
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)
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
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
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 (experts only)
Command (m for help): n 创建新分区
Command action
e extended 扩展的分区
p primary partition (1-4) 主分区
p 创建主分区
Partition number (1-4): 1
First cylinder (1-17366, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-17366, default 17366): +10000M 选择分区大小
Command (m for help): w 保存退出
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@linux /]# mkfs -t ext3 /dev/sdb1 将我创建的第一个分区 sdb1 格式化
mke2fs 1.27 ( 8-Mar-2002 )
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1281696 inodes, 2560252 blocks
128012 blocks (5.00%) reserved for the super user
First data block=0
79 block groups
32768 blocks per group, 32768 fragments per group
16224 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@linux /]# mkdir /new 创建一个根目录
[root@linux /]# mount /dev/sdb1 /new 将 sdb1 分区 mount to /new
[root@linux /]# fdisk -l 查看分区信息
Disk /dev/sda: 64 heads, 32 sectors, 17366 cylinders
Units = cylinders of 2048 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 100 102384 83 Linux
/dev/sda2 101 12100 12288000 83 Linux
/dev/sda3 12101 16100 4096000 83 Linux
/dev/sda4 16101 17366 1296384 f Win95 Ext"d (LBA)
/dev/sda5 16101 16866 784368 82 Linux swap
/dev/sda6 16867 17366 511984 83 Linux
Disk /dev/sdb: 64 heads, 32 sectors, 17366 cylinders
Units = cylinders of 2048 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 10001 10241008 83 Linux
[root@linux /]# df 查看分区信息
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 12095032 2919684 8560948 26% /
/dev/sda1 99134 17861 76154 19% /boot
/dev/sda3 4031680 32968 3793912 1% /home
none 127688 0 127688 0% /dev/shm
/dev/sda6 495828 153957 316272 33% /var
/dev/sdb1 10080092 32828 9535216 1% /new
[root@linux /]#
5. 如何在Linux服务器中添加新的硬盘1
服务器启动时,会有一个提示,让你输入某个键(一般是ctrl+A),进入raid卡配置程序,这一般都是图形界面的,在raid管理界面中能够看到raid信息,也可以修改raid配置。
加1块单独硬盘的话,把服务器关掉,插入硬盘,开机,进入raid界面,后面的设置步骤很简单的,你只要别去动原先那两块硬盘的raid就行了。加2块再作一个raid1阵列也差不多。
但如果你想把新的硬盘加到原有的阵列中,硬盘数量何容量得符合要求。这个比较麻烦,建议你还是把新的硬盘作成新的阵列吧。
推荐你看一本书《linux就该这么学》书中内容非常丰富,LINUX基本问题都可以在书中解决。望采纳!
6. HP服务器linux 操作系统如何添加硬盘
以前的g5
用的是p400的阵列卡
现在的g6是刚出来的p410阵列卡
5.0的盘还没有包含这个驱动
所以必须下载驱动加载安装!才行!
7. 如何给linux添加新硬盘
fdisk -l ## 这里是查看目前系统上有几块硬盘
Disk /dev/sda: 36.4 GB, 36401479680 bytes
255 heads, 63 sectors/track, 4425 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 255 2048256 83 Linux
/dev/sda2 256 1530 10241437+ 83 Linux
/dev/sda3 4296 4425 1044225 82 Linux swap
/dev/sda4 1531 4295 22209862+ f Win95 Ext'd (LBA)
/dev/sda5 1531 2805 10241406 83 Linux
/dev/sda6 2806 4295 11968393+ 83 Linux
Partition table entries are not in disk order
Disk /dev/sdb: 36.7 GB, 36703918080 bytes ## 这里发现/dev/sdb,容量36.7G,且未被分区
255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdc doesn't contain a valid partition table
在服务器上把硬盘接好,启动linux,以root登陆。
比如我新加一块SCSI硬盘,需要将其分成三个区:
#fdisk /dev/sdb
进入fdisk模式:
Command (m for help):p //查看新硬盘的分区
Command (m for help):n //创建新分区
可以用m命令来看fdisk命令的内部命令;n命令创建一个新分区;d命令删除一个存在的分区;p命令显示分区列表;t命令修改分区的类型ID号;l命令显示分区ID号的列表;a命令指定启动分区;w命令是将对分区表的修改存盘让它发生作用。
Command action
e extended //输入e为创建扩展分区
p primary partition (1-4) //输入p为创建主分区,这里我们选择p
Partion number(1-4):1 //第一个扩展分区,按你需求可以最多分4个主分区
First Cylinder(1-1014,default 1): 1 //第一个主分区起始的磁盘块数
Last cylindet or +siza or +sizeM or +sizeK: +1024MB //可以是以MB为单位的数字或者以
磁盘块数,这里我们输入+1024MB表示分区大小为1G。
这样我们就创建完一个分区,如果要创建更多分区可以照上面的步骤继续创建。
创建完后用w保存分区。
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
这样就分区完,我们还要进行格式化
#mkfs -t ext3 -c /dev/sdb1 //如果有多个分区,则分区修改为sdb2这样
格式化完后我们需要进行挂载分区,
#mkdir www //创建/www目录,我们将把新的分区挂到www下
#mount /dev/sdb1 /www //将/dev/sdb1挂载到/www
# df //用df命令进行查看
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 3771316 1388956 2190788 39% /
/dev/sda1 101089 9463 86407 10% /boot
none 62988 0 62988 0% /dev/shm
/dev/sdb1 485906 8239 452580 2% /www //看到了,这就是我们刚
才新挂载的分区
到这里我们工作已接近尾声了,不过我们如果这样就结束的话,我们每次重新启动服务器后都要
进行手工挂载,这样很麻烦,我们需要修改/etc/fstab文件来进行自动挂载。
#vi /etc/fstab
在文件的末尾填加如下内容:
/dev/sdb1 /www ext3 defaults 1 2
如有多个分区可修改sdb1和/www,修改完后保存,重起服务器。
到此我们添加新硬盘的工作结束了。
8. Linux服务器新加入一块硬盘,想把新加入的磁盘空间合并到根分区下,怎么操作
服务器是有做raid的吗,如果有做raid的,是不能添加的,因为raid信息会改变,磁盘里面的信息就会没的。