欢迎访问我的个人博客网站:http://www.yanmin99.com/
1、查看硬盘信息
-
fdisk -l
Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 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: 0x000da36d
Device Boot Start End Blocks Id System
/dev/xvda1 * 2048 41940991 20969472 83 Linux
Disk /dev/xvdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715200 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: 0x00000000
Disk /dev/xvdb doesn't contain a valid partition table
2、进入磁盘,对磁盘进行分区
-
fdisk /dev/xvdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xabf49954.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-209715199, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199):
Using default value 209715199
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
“
-
fdisk -l
Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 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: 0x000da36d
Device Boot Start End Blocks Id System
/dev/xvda1 * 2048 41940991 20969472 83 Linux
Disk /dev/xvdb: 107.4 GB, 107374182400 bytes
43 heads, 44 sectors/track, 110843 cylinders, total 209715200 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: 0xabf49954
Device Boot Start End Blocks Id System
/dev/xvdb1 2048 209715199 104856576 83 Linux
3、格式化分区
-
mkfs.ext3 /dev/xvdb1 (将/dev/xvdb1格式化为ext3类型)
mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
6553600 inodes, 26214144 blocks
1310707 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
800 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
4、创建/disk2目录
5、挂载
6、查看硬盘大小以及挂载分区
7、配置开机自动挂载
<script type="text/javascript">
$(function () {
$('pre.prettyprint code').each(function () {
var lines = $(this).text().split('\n').length;
var $numbering = $('<ul/>').addClass('pre-numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i <= lines; i++) {
$numbering.append($('<li/>').text(i));
};
$numbering.fadeIn(1700);
});
});
</script>
分享到:
相关推荐
Linux挂载硬盘的步骤.zip
Linux 硬盘挂载选项: * `defaults`:使用默认挂载选项 * `1`:文件系统检查优先级 * `2`:dump 文件系统的频率 Linux 格式化新硬盘并挂载并设置开机自动挂载是 Linux 系统管理中的一项重要任务,需要对 Linux ...
Linux 硬盘挂载方法 本文档将向您介绍 Linux 硬盘挂载方法,包括手工挂载和自动挂载两种方式。手工挂载方法需要了解 Linux 下对硬盘分区的称呼、 locale 的设置、windows 分区的格式等信息。自动挂载方法则需要将...
4. 创建目录 并将 /dev/sdb1 挂在到该目录下 [root@db1 /]# ls backup dev initrd media opt sbin sys usr bin etc lib misc proc selinux tftpboot ...[root@db1 /]# mount /dev/sdb1 /u01
针对Linux服务器的磁盘挂载mount和共享做简单操作说明,里面为本人一步一步操作截图。
本文通过脚本给大家分享了linux mount挂载和卸载硬盘的方法,非常不错,具有一定的参考借鉴价值,感兴趣的朋友一起看看吧
对于新手学习,mount 命令,一定会有很多... 因此,需要进行设备访问时候,我们需要进行系统挂载(mount). 那么mount到底能够挂载那些设备呢。 我们可以看一下。 一、mount可以用来挂载什么: 不同的操作系统使
Linux 挂载硬盘详解 Linux 挂载硬盘是 Linux 云服务器数据盘未做分区和格式化时所需执行的操作,以便将数据盘划分为一个分区以便使用。下面是详细的挂载步骤和相关的知识点: 步骤 1:查看数据盘 在没有分区和...
知道大家时间都很宝贵,我直接把流程...mount /dev/vdb /u01 # mount 磁盘到/u01,保证/u01为空 blkid # 获取磁盘的uuid和属性,用uuid来进行开机mount vim /etc/fstab # 开机mount,模板是UUID=********** /u01 ext4 d
linux上挂载卸载u盘、硬盘不像windows上这么方便,不过,只要记住命令的话,也就得心应手了。
1 先把后面插上的3块硬盘拔掉 拔掉后 开机 输入fdisk l 查看当前硬盘是 dev 这个需要先记下来 防止后面格式化硬盘错误 2 插上剩下的3块硬盘 然后输入fdisk l 查看一下刚插上盘的路径分别是多少 并记录下来
linux是一个优秀的开放源码的操作系统,可以运行在大到巨型小到掌上型各类...下面我根据自己的实际工作经验介绍一下如何在linux系统下挂接(mount)光盘镜像文件、移动硬盘、U盘以及Windows网络共享和UNIX NFS网络共享。
linux 下挂载硬盘 fuse 自己找的
2. 使用 mount 命令将文件系统挂载到操作系统中。 3. 指定挂载点,即文件系统在操作系统中的挂载位置。 4. 指定文件系统的访问权限和读写权限。 本文将详细介绍 Linux 创建文件系统及挂载文件系统的流程,并提供了...
Linux系统上挂载Windows分区和U盘的方法 本文档详细介绍了Linux系统上挂载Windows分区和U盘的方法,涵盖了支持NTFS分区、挂载Windows分区、挂载U盘等内容。 支持NTFS分区 为了使Linux系统支持NTFS分区,可以通过...
本文详细介绍了Unix文件系统以及mount的工作过程,讨论了mount的使用和有关选项。
划分硬盘新区并挂载到挂载点,设置开启启动
"Linux下一种普通用户识别移动硬盘及挂载方式研究与应用.pdf" 本文研究了Linux系统中普通用户识别移动硬盘及挂载方式的研究与应用。随着大型数据处理中心的频繁使用,普通用户没有操作移动硬盘的相应权限,这降低了...
挂载windows共享目录或FTP: ... 代码如下: sudo mount //192.168.10.22/FTPServer /windows -o username=user,password=abcdefg -t cifs ...挂载linux共享目录: 【修改server端】 修改/etc/export文件,加入