[root@localhost /]# fdisk -l -共6个硬盘 sda sdb sdc sdd sde sdf
Disk /dev/sda: 2000.3 GB, 2000398934016 bytes ------系统盘
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 243201 1953407610 8e Linux LVM
Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes ------sdb 已经执行命令 -分区(1个主分区)并格式化--并挂载到了 /mnt/sdb1 目录下
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 243201 1953512001 83 Linux
Disk /dev/sdc: 2000.3 GB, 2000398934016 bytes ------sdc 安装完系统后是这样了 看似 sda sdc 跟LVM 有关
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 13 104391 83 Linux
/dev/sdc2 14 243133 1952861400 8e Linux LVM
Disk /dev/sdd: 2000.3 GB, 2000398934016 bytes -----sdd 已经执行命令 -分区(1个主分区)并格式化--并挂载到了 /mnt/sdd1 目录下
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 243201 1953512001 83 Linux
Disk /dev/sde: 2000.3 GB, 2000398934016 bytes -----------sde 还没有执行任何操作
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sde doesn't contain a valid partition table
Disk /dev/sdf: 2000.3 GB, 2000398934016 bytes ------sdf 还没有执行任何操作
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdf doesn't contain a valid partition table
[root@localhost /]#
新增一个新硬盘(sde),进行分区、格式化等
使用fdisk
分区-输入:fdisk /dev/hde
-再输入n 即/创建新分区-
--输入p 即为创建主分区
-输入1 创建1个 分区
-再按 Enter 即可!用预设值,即从1磁道开始
再输入<--输入磁盘大小
完成分区设定,输入w可保存并退出,必须输入w才生效;
[root@localhost /]# fdisk /dev/sde 执行分区命令
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 243201.
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-243201, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-243201, default 243201): 243201
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost /]#
[root@localhost mnt]# mkfs.ext3 /dev/sde1 -执行格式化命令
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
244203520 inodes, 488378000 blocks
24418900 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
14905 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost mnt]# ls
sdb1 sdd1 sde1 sdf1
[root@localhost mnt]# mkdir sd?1 -----------------------------新建挂载点目录
[root@localhost mnt]# mount /dev/sde1 /mnt/sde1 -------------挂载到/mnt/sde1 目录下
[root@localhost ~]# vi /etc/fstab --------------编辑fstab 开机自动挂载启动;
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/sdb1 /mnt/sdb1 ext3 defaults 1 2
/dev/sdd1 /mnt/sdd1 ext3 defaults 1 2
/dev/sde1 /mnt/sde1 ext3 defaults 1 2
----------
在/mnt/sde1目录下新建文件 --并reboot系统测试---------查看重启后是否能ls 看到/mntsde1 目录里的文件
[root@localhost mnt]# ls
sdb1 sdd1 sde1 sdf1
[root@localhost mnt]# cd sde1
[root@localhost sde1]# ls
lost+found
[root@localhost sde1]# touch test1.txt
[root@localhost sde1]# ls
lost+found test1.txt
[root@localhost sde1]# reboot
Broadcast message from root (pts/5) (Mon Sep 24 22:30:18 2012):
The system is going down for reboot NOW!
[root@localhost sde1]#
-----------------总结命令--------
root@localhost /]# fdisk -l ---查看当前系统硬盘信息
root@localhost /]#df -hl
[root@localhost /]# fdisk /dev/sde 执行分区命令
[root@localhost mnt]# mkfs.ext3 /dev/sde1 -执行格式化命令
[root@localhost mnt]# mkdir sd?1 -----------------------------新建挂载点目录
[root@localhost mnt]# mount /dev/sde1 /mnt/sde1 -------------挂载到/mnt/sde1 目录下
[root@localhost ~]# vi /etc/fstab --------------编辑fstab 开机自动挂载启动;
===== ====
备注:
1.dell-R710机器-6个2T硬--开机安装系统到第一个硬盘--使用一段时间中
执行了fsck命令--之后发现系统上/ 根目录下都没了--只好重新安装系统;
2. 重新安装系统时--6个硬盘都插在机器上-安装时一步步默认操作--安装完系统后-执行fdisk -l 命令发现系统 能显示 /dev/sda b c d e f 共6个盘符;
---且发现sdc 有---LVM 字样;---也没有注意
3.再执行sdb --到-sde 相关= fdisk.ext3 分区 格式化 挂载操作后 再------当时系统使
用没有问题;
4.等重启系统后发现启动界面显示 /dev/sdc sdf ext3 不存在等字样-且登陆界面含有