linux 扩容
如何在linux系统中增加一块硬盘,并且格式化它呢:
[root@localhost dev]# fdisk /dev/sdb
The number of cylinders for this disk is set to 5221.
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): p
Disk /dev/sdb: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): d
No partition is defined yet!
Command (m for help): n
Command action
e extended
p primary partition (1-4)
e
Partition number (1-4): 1
First cylinder (1-5221, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-5221, default 5221):
Using default value 5221
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (1-5221, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-5221, default 5221): 2500
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (2501-5221, default 2501):
Using default value 2501
Last cylinder or +size or +sizeM or +sizeK (2501-5221, default 5221):
Using default value 5221
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: 设备或资源忙.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@localhost dev]# fdisk /dev/sdb
The number of cylinders for this disk is set to 5221.
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): p
Disk /dev/sdb: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 5221 41937651 5 Extended
/dev/sdb5 1 2500 20081187 83 Linux
/dev/sdb6 2501 5221 21856401 83 Linux
Command (m for help):
[root@localhost ~]# mkfs.ext3 /dev/sdb5
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2513280 inodes, 5020296 blocks
251014 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
154 block groups
32768 blocks per group, 32768 fragments per group
16320 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
分区完成!
(4)修改分区表
vim /etc/fstab
在最后加上一行:
/dev/sdb5 /sdb_one ext3 defaults 0 0
使用标签:
LABEL=/sdb5_label_hw /sdb_one ext3 defaults 0 0
(5)为分区设置标签
e2label /dev/sdb5 /sdb5_label_hw
注意:设置完成之后,最好reboot,否则使用mount进行挂载的时候,无法显示其中的内容,必须先进入文件夹,然后再退出,才能看到。
查看挂载情况,运行df -l
转载于:https://blog.51cto.com/huangkunlun520/792077
相关文章:

Python3 xml模块的增删改查
xml数据示例 ?1234567891011121314151617181920212223242526<data><country name"Liechtenstein"><rank updated"yes">2</rank><year updated_by"Alex">2009</year><gdppc>141100</gdppc><…

mysql 函数返回表格_mysql 数据分析如何实现日报、周报、月报和年报?
推荐阅读:MySQL复习:20道常见面试题(含答案)21条MySQL性能调优经验秋招Java面试大纲:Java并发spring数据库RedisJVMNetty等以天为统计周期,是常见需求。周报、月报更是常见需求。长周期项目,甚至有年报需求。我已经掌握…

如何开启to 日志
命名 gc_date %Y-%m-%d %H:%M:%S.log,11月15号21:51:58开始生成gc日志 注:在哪个目录启动tomcat,就会在哪个目录生成gc日志文件 转载于:https://www.cnblogs.com/qqzy168/archive/2012/11/16/2772636.html

联想电脑 Realtek RTL8821CE 无线网卡 驱动安装 16.04/18.04
原文连接: https://askubuntu.com/questions/1071299/how-to-install-wi-fi-driver-for-realtek-rtl8821ce-on-ubuntu-18-04 内容: As far as I can tell, at the time of writing this, there is not yet a Wifi Driver for the Realtek RTL8821CE in the officia…

PXE网络无人职守安装
PXE网络无人职守安装DHCP、TFTP、NFS、APACHE为同一台服务器:192.168.0.1yum -y install dhcp xinetd tftp-server syslinux nfs-utils httpd system-config-kickstart一、配置DHCP1.默认的DHCP配置文件内容是空的,可以拷贝usr目录下的样板文件修改cp /u…

贪心算法之硬币问题
有1元,5元,10元,50元,100元,500元的硬币个C1,C2,C3,C4,C5,C6枚,用这些硬币来支付A元,最少需要多少枚硬币? #include<io…

button按钮样式_一篇文章带你了解CSS3按钮知识
在实际开发中,按钮的应用是必不可少。使用 CSS 来制作按钮,可以更有新意,更有趣,也可以自定义自己想要的样式。 一、平面样式CSS按钮 平面样式按钮的使用现在非常流行,并且符合无处不在的平面设计趋势。,这…

Ubuntu 18.04时间同步
Ubuntu 18.04时间同步原文连接: 原文链接 内容: Sync Clock with Time Servers through the Command Line Check Current Time Status The timedatectl command lets you check the current time status of your system clock. Open your Ubuntu terminal through…

UVa 10051 Tower of Cubes(类似LIS)
题意: 一些重量递增而且各个面都有颜色的立方体,要将这些立方体堆成一个塔,要求两个接触面同色,而且下面的立方体更重。求塔的最大高度。 思路: 用求LIS的思想,无非是多了几个状态。dp[i][j]表示前i个箱子&…

【十五分钟Talkshow】fmplan(十五分钟计划)的初步想法
摘要信息 这个演讲将概述提出了我最近开始的一个名为“fmplan”的 基于互联网的教育计划 }计划简介}内容简介}目标受众}学习环境}支持和帮助讲义地址 http://www.xizhang.com/fmplan/resources/fmplan_overview.pdf 视频地址 http://www.tudou.com/programs/view/hhS5U-o-qRc/…

ACC026简要题解
这场AGC是时间正好在NOI之前休养生息的日子里,果断选择了放弃(虽然也从没有用大号打过)。在随便做完了前几题之后就踏上了去长沙的旅程。NOI系列比赛总是休闲无比,咕咕不断,竟然连开幕式都能咕,今天AK了一下笔试之后就来刚后两题&…

IT男专用表白程序
[c]代码库 001#include<iostream.h> 002#include<windows.h> 003#include<stdio.h> 004#define stoptimeshort 40 005#define stoptimelong 100 006void main() 007{ 008// 009char ch[10]; 010int f[9][36]{ 0,1,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,…

zabbix 安装_zabbix系列(五) Grafana4.6.3+Zabbix 的安装部署
使用了一段时间Grafana,感觉还挺好用的。部分效果图如下:zabbix的安装步骤请参考以下地址,就不再描述,本章主要记录Grafana的部署https://blog.csdn.net/wu2700222/article/details/80520085grafana官网地址:http://…

ubuntu 默认鼠标双击问题
ubuntu 默认鼠标双击问题 内容: 选择 universalAccess ->Typing ubuntu 16.04 ubuntu 18.04 关闭鼠标悬停 点击 点击测试

石家庄的联通破网络,请大家鉴定
C:\Users\workman>pathping www.baidu.com 通过最多 30 个跃点跟踪到 www.a.shifen.com [61.135.169.125] 的路由: 0 workman-PC [192.168.0.100] 1 bogon [192.168.0.1] 2 110.240.90.1 3 221.192.14.166 4 221.192.12.85 5 61.182.172.137 6 218.12.255.210 7 202.99.160.…

Chapter 8(查找)
1.二分查找和插值查找//************************Search.h*********************************** #ifndef SEARCH_H #define SEARCH_H#include <stdio.h> #include <stdlib.h>int BiSearch(int array[],int n,int key);int IVSearch(int array[],int n,int key);int…

HDU 3549 Flow Problem(最大流模版EK算法)
题目链接 第一道最大流,赤裸裸的模版题,刚好可以熟悉模版用。今天看了一下最大流,就看了一个EK算法,感觉有点和二分图匹配算法有点相似,对于最大流问题有点了解了,不过为什么这么做,也不是 很懂…

html css 显示数值_【CSS纯技术】20.03.05-CSS渲染的原理
今天学的东西信息量都很大,导致我总是要反复观看。因为自己还没理解透,所以这一篇也不再追求大家能够看懂,只是用于帮助自己梳理头绪。一、CSS如何计算数值?在写CSS的过程中,我们会用px、em、rem、vh、vw、%等各种单位…

# Ubuntu 配置自带vnc桌面共享
Ubuntu 配置自带桌面共享 1、在setting>>shareing>>remote 选择on 如果用ubunutu直接远程连接的话已经可以了, 2、在ubuntu下使用系统自带的remmina连接 vnc类型 直接输入ip地址 3、如果在windows下面连接的话需要把加密选项关闭 内容:…

select刷新后保存原先选择的信息
前提是之前选择的信息进了后台。 在页面上放一个<s:hidden name"xxx" id"inputF"/>,用它来存select上次选择的值。由于信息已经存在了后台,这个hidden域不管怎么刷新,都会有值。 // s_list是要恢复取值的select va…

python命令行参数解析OptionParser类用法实例
python命令行参数解析OptionParser类用法实例 本文实例讲述了python命令行参数解析OptionParser类的用法,分享给大家供大家参考。 具体代码如下: from optparse import OptionParser parser OptionParser(usage"usage:%prog [optinos] fil…

Linux下程序崩溃dump时的 core文件的使用方法
Linux下程序崩溃dump时的 core文件的使用方法 1、在启动程序前执行 ulimit -c unlimitedunlimited 表示生成文件的大小限制,也可以修改为自定义的大小,例如: ulimit -c 1024对 core 文件的大小进行限制,单位为 blocks …

div 自动换行_js自动打字--autotypejs
autotypejsuse for typing automatically.介绍使用原生JavaScript(es6)实现的自动打字效果。效果图示例代码(vue):<用法获取:--yarn-- yarn add autotypejs--git-- git clone https://github.com/1esse/autotypejs.git--npm-- …

int[]到string[]的转换方法 Array.ConvertAll
2019独角兽企业重金招聘Python工程师标准>>> using System; using System.Collections.Generic; //int[]到string[]的转换 public class Example { static void Main() { int[] int_array { 1, 2, 3 }; string[] str_array Array.ConvertAll(int_array, new Conve…

Linux结构目录
linux结构目录 Linux中有一句话叫做:一切皆文件。 下面来了解一下这些文件。 首先看一下Linux根目录下结构:bin:存放二进制可执行文件,一般常用命令都存放在这里。boot:存放系统启动时的一些引导文件。dev:…

# NVIDIA Jetson系列系统镜像备份烧录指南
NVIDIA Jetson系列系统镜像备份烧录指南 我使用的是Jetson AGX Xavier 注意事项: 1、烧录工具版本在4.2之前 是叫做 JetPack,, 4.2以及4.2以后的版本叫做SDKmanager, 对应的Jetson OS的版本在4.2与4.1也是差异比较大的,4.2之前的版本智能…

面向对象编程(OOP)----BLUE大师JS课堂笔记(二)
一,把面向过程的程序改写成面向对象的程序 1.前提 所有的程序都在onload里面 2.改写 不能函数嵌套,可以全局变量 3.onload-------------------->构造函数 全局变量------------------->属性 函数----------------------->方法 需要用到面向…

张仰彪第二排序法_C语言中的最常用的两种排序算法你知道吗?
冒泡法排序核心思想:若有N个数从小到大排序,需进行N-1轮比较,第一轮每相邻的两个数据进行比较N-1次,最终挑选出最大的数,放到这一轮的最后位置;第二轮比较N-1-i次,挑选出这一轮最大的数…

ZOJ3203
为什么80%的码农都做不了架构师?>>> 用一次导数求极值,但是还是犯了错误,要判断边界条件,就是墙上投影值小于0和大于h的时候。 //-------common header--------------- #include <stdio.h> #include <vector…
【校招面试 之 C/C++】第16题 C++ new和delete的实现原理
1、new new操作针对数据类型的处理,分为两种情况:(1)简单数据类型(包括基本数据类型和不需要构造函数的类型)代码实例:int* p new int;汇编码如下: int* p new int; 00E54C44 pus…