Linux-->基础知识--> fdisk 格式化并挂接盘
来源:互联网 发布:全数据gm11模型 编辑:程序博客网 时间:2024/04/28 01:31
[root@doveorc01 iscsi]# 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 0xe00b9b36.
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: 1073 MB, 1073741824 bytes
34 heads, 61 sectors/track, 1011 cylinders
Units = cylinders of 2074 * 512 = 1061888 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe00b9b36
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-1011, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1011, default 1011):
Using default value 1011
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@doveorc01 iscsi]# fdisk l
先提示一下;用 mkfs.bfs mkfs.ext2 mkfs.jfs mkfs.msdos mkfs.vfatmkfs.cramfs mkfs.ext3 mkfs.minix mkfs.reiserfs mkfs.xfs 等命令来格式化分区,比如我想格式化 sdb1为ext3文件系统,则输入;
[root@doveorc01 /]# mkfs.ext3 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262094 blocks
13104 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@doveorc01 /]# mkdir /mnt/sdb1
[root@doveorc01 /]# mount /dev/sdb1 /mnt/sdb1
自动平挂接
[root@doveorc01 /]#vi /etc/fstab
最后一行追加如下:
/dev/sdb1 /mnt/sdb1 ext3 default 0 0
- Linux-->基础知识--> fdisk 格式化并挂接盘
- linux下使用fdisk格式化并分区sd卡
- linux fdisk 分区、格式化、挂载!
- linux 之fdisk分区及格式化操作
- Linux U盘分区格式化 fdisk命令
- Linux U盘分区格式化 fdisk命令
- linux fdisk 分区、格式化、挂载!fdisk 分区 格式化 自动挂载! ext3格式化, ext4格式化 及挂载
- linux下用 fdisk把新硬盘 分区、格式化、挂载!
- Linux下fdisk格式化TF卡,创建分区
- linux fdisk
- 实战fdisk,mkfs磁盘分区格式化
- linux 常用基本命令之三十二 fdisk (mkfs.ext*格式化分区)
- linux fdisk 使用方法
- linux fdisk命令详解
- Linux下fdisk用法
- linux fdisk命令详解
- linux fdisk 分区
- linux fdisk 分区
- 栈实现的一个小迷宫游戏
- 并查集
- for语句中执行顺序
- C++11 in Qt5
- cpp 两点有用的基础知识
- Linux-->基础知识--> fdisk 格式化并挂接盘
- java-web学习的头疼问题之一(路径问题)
- Nginx学习——进程模型(worker进程)
- Android开机启动Activity或者Service方法---------------一直保持欲行
- jquery获取td所在的行和列
- C/C++中的abort、atexit、exit和_Exit
- 树莓派的I2C配置
- Java EE 开发环境搭建
- C和指针