Y-Y 发表于 2014-3-3 19:42:18

感谢分享

abc9966 发表于 2014-3-3 20:05:54

{:6_267:}

反方向的z 发表于 2014-3-3 20:18:03

感谢分享

zyschengdu 发表于 2014-3-3 21:20:08

看看,学习一下

caosuper 发表于 2014-3-4 00:10:59

:lolluna挂载新硬盘操作流程
1、查看你的系统有多少块硬盘,并确定那块硬盘是需要重新格式化和重新分区等等;
alia@alia:~$ sudo fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes                      ----系统安装的硬盘,后面可以看到分区的情况等
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0009812d
Device Boot      Start         End      Blocks   IdSystem
/dev/sda1   *      2048   968714239   484356096   83Linux
/dev/sda2       968716286   976771071   4027393    5Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5       968716288   976771071   4027392   82Linux swap / Solaris
Disk /dev/sdb: 20.0 GB, 20014718976 bytes                               ----可以看到有一块新的硬盘还没有分区及挂载到系统上
81 heads, 63 sectors/track, 7660 cylinders, total 39091248 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d1bdb
2、使用fdisk工具进行对新硬盘进行分区和格式化
alia@alia:~$ sudo fdisk /dev/sdb
Command (m for help): m                              ----输入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                              ---输入n新建一个分区
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p                                       ---分区模式选择主分区
Partition number (1-4, default 2): 1               ----选择分区号
Partition 1 is already defined.Delete it before re-adding it.
Command (m for help): m                              ----输入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): w                           ---写进分区表进退出
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
alia@alia:~$
alia@alia:~$ sudo fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0009812d
Device Boot      Start         End      Blocks   IdSystem
/dev/sda1   *      2048   968714239   484356096   83Linux
/dev/sda2       968716286   976771071   4027393    5Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5       968716288   976771071   4027392   82Linux swap / Solaris

Disk /dev/sdb: 20.0 GB, 20014718976 bytes
81 heads, 63 sectors/track, 7660 cylinders, total 39091248 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d1bdb
Device Boot      Start         End      Blocks   IdSystem
/dev/sdb1            2048    39091247    19544600   83Linux                     ---通过fdisk检查可以看到刚刚新建的分区/dev/sdb1
alia@alia:~$
alia@alia:~$ sudo mkfs.ext4 /dev/sdb1                   ----格式化刚才新建的分区(分区的格式选择了ext4),新建分区需要格式化后才能挂载到系统
mke2fs 1.42 (29-Nov-2011)
Discarding device blocks: 完成                           
文件系统标签=
OS type: Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1221600 inodes, 4886150 blocks
244307 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=4294967296
150 block groups
32768 blocks per group, 32768 fragments per group
8144 inodes per group
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
    4096000
Allocating group tables: 完成                           
正在写入inode表: 完成                           
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成   
alia@alia:~$
alia@alia:~$ sudo mkdir /ssd_disk/                                                      ----创建一个挂接目录(用于新硬盘分区挂接至系统分区目录)
alia@alia:~$ sudo mount /dev/sdb1 /ssd_disk                                     ----将ssd硬盘分挂接至系统/ssd_disk目录
alia@alia:~$
alia@alia:~$ df -lh                                                                                 ----检查分区挂接情况
文件系统      容量已用可用 已用% 挂载点
/dev/sda1       455G4.0G428G    1% /
udev            1.9G4.0K1.9G    1% /dev
tmpfs         760M844K759M    1% /run
none            5.0M   05.0M    0% /run/lock
none            1.9G232K1.9G    1% /run/shm
/dev/sdb1      19G172M   18G    1% /ssd_disk                              ----看到新硬盘分区已挂接到系统/ssd_disk目录下
alia@alia:~$
3、实现开机系统自动挂载新硬盘新区
alia@alia:~$ vi /etc/fstab                                                                  ----在文件最后一行新加如下命令即可
/dev/sdb1    /ssd_disk                                    ext4    defaults      1       1

cookily 发表于 2014-3-4 01:15:42

分享感谢

litao59 发表于 2014-3-4 01:49:26

想学习,想参考。

--say、太美好 发表于 2014-3-4 08:23:17

收拾收拾

winterhotter 发表于 2014-3-4 08:29:02

这个最牛逼了

winterhotter 发表于 2014-3-4 08:32:15

谢谢 非常感谢 谢谢分享 这个实在是太强大了!!

winterhotter 发表于 2014-3-4 08:32:23

谢谢

winterhotter 发表于 2014-3-4 08:32:31

这个太牛了

winterhotter 发表于 2014-3-4 08:33:03

{:6_264:}{:6_264:}

winterhotter 发表于 2014-3-4 08:33:08

{:6_290:}{:6_290:}{:6_290:}{:6_290:}{:6_290:}{:6_290:}

winterhotter 发表于 2014-3-4 08:33:18

{:6_277:}{:6_267:}
页: 99 100 101 102 103 104 105 106 107 108 [109] 110 111 112 113 114 115 116 117 118
查看完整版本: 小凡实验室铃铛老师CCNA综合实验视频讲解【CCNA知识终极检测,会此实验,CCNA就没问题