当前位置:首页 > 经验 >

5000kb是多少mb(16kb是多少mb)

来源:原点资讯(www.yd166.com)时间:2022-11-04 17:55:09作者:YD166手机阅读>>

一、规划硬盘中的分区 fdisk命令
1、作用:在交互式的操作环境中管理磁盘分区
2、格式:fdisk [磁盘设备]
3、常用选项:
m:查看操作指令的帮助信息
p:列表查看分区信息
n:新建分区
d:删除分区
t:变更分区类型
w:保存分区设置并退出
q:放弃分区设置并退出
Ctrl 退格键:删除输入的错误字符
4、示例:
为主机新增一块20G的scsi硬盘
对该硬盘进行分区
划分两个主分区,各5G,剩余空间为扩展分区
在扩展分区中建立两个逻辑分区,第一个逻辑分区1G,类型为swap。第二个逻辑 分区为9G。
(1)关机
(2)新增硬盘
(3)开机,查看新硬盘是否添加
(4)使用fdisk进行分区
[root@www ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x4f3a72ac.
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): 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): p
Disk /dev/sdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x4f3a72ac
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended 【扩展分区】
p primary partition (1-4) 【主分区】
p
Partition NUMBER (1-4): 1
First cylinder (1-2610, default 1): 回车
Using default value 1
Last cylinder, cylinders or size{K,M,G} (1-2610, default 2610): 5G
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (655-2610, default 655): 回车
Using default value 655
Last cylinder, cylinders or size{K,M,G} (655-2610, default 2610): 5G
Command (m for help): n
Command action
e extended
p primary partition (1-4)
e
Partition number (1-4): 4
First cylinder (1309-2610, default 1309): 回车
Using default value 1309
Last cylinder, cylinders or size{K,M,G} (1309-2610, default 2610): 回车
Using default value 2610
Command (m for help): n
Command action
l logical (5 or over) 【逻辑分区】
p primary partition (1-4)
l
First cylinder (1309-2610, default 1309): 回车
Using default value 1309
Last cylinder, cylinders or size{K,M,G} (1309-2610, default 2610): 1G
Command (m for help): t
Partition number (1-5): 5
Hex code (type L to list codes): 82
Changed system type of partition 5 to 82 (Linux swap / Solaris)
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (1441-2610, default 1441): 回车
Using default value 1441
Last cylinder, cylinders or size{K,M,G} (1441-2610, default 2610): 回车
Using default value 2610
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
二、大小超过2T的分区规划 parted命令
1、作用:规划大小超过2T的分区,也可用于小分区的规划
2、格式:parted [选项] [分区设备]
3、交互式状态下的常用命令:
?/help/--help:帮助
quit/q:保存退出
print/p:打印
mklabel:改变硬盘的文件类型
mkpart:分区
rm:删除某分区,后面跟分区号,例如:rm 3
4、示例:
为主机新增一块20G的SCSI硬盘
对该硬盘进行分区
将硬盘类型改为gpt
划分三个分区,前两个分区各5G,剩下的都空间都划分给第三分区
(1)关机
(2)新增硬盘
(3)开机,查看新硬盘是否添加
[root@www ~]# parted -l
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system 标志
1 1049kB 525MB 524MB primary ext4 启动
2 525MB 107GB 107GB primary lvm
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sdb: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system 标志
[root@www ~]# parted /dev/sdb
GNU Parted 2.1
使用 /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help
align-check TYPE N check partition N for TYPE(min|opt) alignment
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on partition NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices,
free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
resize NUMBER START END resize partition NUMBER and its file system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright
information of GNU Parted
(parted) mklabel
新的磁盘标签类型? 【两次tab键】
aix amiga bsd dvh gpt loop mac msdos pc98 sun
新的磁盘标签类型? gpt
警告: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be
lost. Do you want to continue?
是/Yes/否/No? y
(parted) mkpart
分区名称? []? part1
文件系统类型? [ext2]? ext4
起始点? 1
结束点? 5G
(parted) mkpart
分区名称? []? part2
文件系统类型? [ext2]? ext4
起始点? 5G
结束点? 10G
(parted) mkpart
分区名称? []? part3
文件系统类型? [ext2]? ext4
起始点? 10G
结束点? -1
(parted) p
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sdb: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name 标志
1 1049kB 5000MB 4999MB part1
2 5000MB 10.0GB 5001MB part2
3 10.0GB 21.5GB 11.5GB part3
(parted) quit
[root@www ~]# ls -l /dev/sdb*
brw-rw----. 1 root disk 8, 16 1月 30 17:35 /dev/sdb
brw-rw----. 1 root disk 8, 17 1月 30 17:02 /dev/sdb1
brw-rw----. 1 root disk 8, 18 1月 30 17:02 /dev/sdb2
brw-rw----. 1 root disk 8, 19 1月 30 17:02 /dev/sdb3
[root@www ~]# mkfs.ext4 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
文件系统标签=
操作系统:Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
305216 inodes, 1220352 blocks
61017 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=1249902592
38 block groups
32768 blocks per group, 32768 fragments per group
8032 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
正在写入inode表: 完成
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成
This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@www ~]# mkdir /sdb1
[root@www ~]# mount /dev/sdb1 /sdb1/
[root@www ~]# cd /sdb1/
[root@www sdb1]# echo ceshiwenjian > test.txt
[root@www sdb1]# cd
[root@www ~]# umount /sdb1/
[root@www ~]# parted /dev/sdb
GNU Parted 2.1
使用 /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sdb: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name 标志
1 1049kB 5000MB 4999MB ext4 part1
2 5000MB 10.0GB 5001MB part2
3 10.0GB 21.5GB 11.5GB part3

栏目热文

1 kb相当于多少mb(700kb相当于多少mb)

1 kb相当于多少mb(700kb相当于多少mb)

区别Mbps 即 Milionbit pro second(百万位每秒);Kbps 即 Kilobit pro seco...

2022-11-04 18:14:12查看全文 >>

1kb等于几mb(1KB等于多少MB)

1kb等于几mb(1KB等于多少MB)

当你成为硬件大神后,回头看看萌新的无脑提问,常常让人忍俊不禁,有些暴躁网友甚至直接开喷。但每个DIY发烧友都是从小白一步...

2022-11-04 18:01:19查看全文 >>

10000kb是多少兆(10000kb是多少兆网速)

10000kb是多少兆(10000kb是多少兆网速)

一、区分1M宽带带宽单位与1M存储单位的区别1、电脑中数据占储存器的容量单位是Byte(字节,即硬盘、内存、存储卡等的容...

2022-11-04 18:20:45查看全文 >>

kb 大还是mb大(照片kb大还是mb大)

kb 大还是mb大(照片kb大还是mb大)

所谓的 KB MB GB TB 是指内存大小的单位,他们都有B , 所以先说说B 吧, B是一个电脑存储的基本单位(字节...

2022-11-04 18:12:27查看全文 >>

1000kbps网速是多少兆(100兆网速是多少kbps)

1000kbps网速是多少兆(100兆网速是多少kbps)

【他们说,带宽高下载慢,你的算法有问题】现在很多朋友都在使用10Mbps、50Mbps甚至100Mbps的宽带,运营商都...

2022-11-04 18:00:26查看全文 >>

100kb等于多少mb(照片大小怎么改到20k)

100kb等于多少mb(照片大小怎么改到20k)

很多新人不懂1兆是什么鬼?为何经常用手机流量会常常看到它。兆的简写单位就是M,也是说你讲的兆和M是同一个单位。1兆流量是...

2022-11-04 17:44:13查看全文 >>

1000kbps等于多少mb(10000kbps是多少mb)

1000kbps等于多少mb(10000kbps是多少mb)

一、端口速率这个参数应该是交换机当中最多人关心和熟悉的参数了。我们从交换机的参数中经常可以看到这几个参数如"百兆"、"千...

2022-11-04 18:08:41查看全文 >>

10000kb相当于多少mb(700kb相当于多少mb)

10000kb相当于多少mb(700kb相当于多少mb)

如果有人问你一兆是多少,你可能会说1024KB,这是电子存储容量上的“兆”,还有数字上的“兆”,两者是完全不一样的,而且...

2022-11-04 17:43:30查看全文 >>

800kb相当于多少mb(1 mb相当于多少kb)

800kb相当于多少mb(1 mb相当于多少kb)

今年的金三银四由于众所周知的原因比往年来的都要特殊,但有不少重返或者打算在北上广深打拼的朋友们已经开始租房搬家了。有人可...

2022-11-04 18:15:28查看全文 >>

10000kb是多少mb(100000kb是多少mb)

10000kb是多少mb(100000kb是多少mb)

Mbps 即 Milionbit pro second(百万位每秒) Kbps 即 Kilobit pro second...

2022-11-04 17:36:19查看全文 >>

文档排行