Ubuntu学习笔记
2016-03-02 00:10
239 查看
1、远程终端连接
软件:putty
输入IP地址,要保存的名字,点击保存
首次连接,会出现以下提示。单击 是。
根据提示,输入服务器用户名和密码。密码不会显示在屏幕上。输入完成后回车。
执行命令进行分区
根据提示,依次输入 n,p,1,两次回车,wq,分区就开始了。
执行 fdisk -l 命令,查看新的分区。新分区 xvdb1 已经创建好。如下面示例中的/dev/xvdb1。
执行下列命令,对新分区进行格式化
执行下列命令写入新分区信息。
完成后,可以使用 cat /etc/fstab 命令查看。
软件:putty
输入IP地址,要保存的名字,点击保存
首次连接,会出现以下提示。单击 是。
根据提示,输入服务器用户名和密码。密码不会显示在屏幕上。输入完成后回车。
格式化和挂载数据盘
运行 fdisk -l 命令查看数据盘。[root@xxxx ~]# fdisk -l Disk /dev/xvda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00078f9c Device Boot Start End Blocks Id System /dev/xvda1 * 1 5222 41940992 83 Linux Disk /dev/xvdb: 5368 MB, 5368709120 bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
执行命令进行分区
[code]fdisk /dev/xvdb[/code]
根据提示,依次输入 n,p,1,两次回车,wq,分区就开始了。
[root@xxx ~]# fdisk /dev/xvdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklab el Building a new DOS disklabel with disk identifier 0x33eb5059. 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) WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-652, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-652, default 652): Using default value 652 Command (m for help): wq The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
执行 fdisk -l 命令,查看新的分区。新分区 xvdb1 已经创建好。如下面示例中的/dev/xvdb1。
[root@xxx ~]# fdisk -l Disk /dev/xvda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00078f9c Device Boot Start End Blocks Id System /dev/xvda1 * 1 5222 41940992 83 Linux Disk /dev/xvdb: 5368 MB, 5368709120 bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x33eb5059 Device Boot Start End Blocks Id System /dev/xvdb1 1 652 5237158+ 83 Linux
执行下列命令,对新分区进行格式化
mkfs.ext3 /dev/xvdb1
执行下列命令写入新分区信息。
echo '/dev/xvdb1/mnt ext3 defaults 0 0'>> /etc/fstab
完成后,可以使用 cat /etc/fstab 命令查看。
相关文章推荐
- 产品经理必备软件——Axure使用详解(1)
- Android自定义布局弹窗
- WCF、WebAPI、WCFREST、WebService之间的区别
- LinkedList---Delete Node in the Middle of Singly Linked List
- 代理模式
- php中for循环中变量没有清空导致的bug
- Styling the Action Bar --1.1.3
- 自定义View之刻度盘
- CocoaPods建立私有仓库
- KMP POJ 2752 Seek the Name, Seek the Fame
- 一些关于面向对象的思考
- 决心书
- 贪吃蛇
- 一些关于面向对象的思考
- Redis源码研究—哈希表
- HTTPS科普扫盲帖
- leetcode:Wildcard Matching
- 开源爬虫框架各有什么优缺点?
- 正则表达式
- 使用Pods和自定义静态库实现多工程联编