欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Linux中格式化和挂载

程序员文章站 2022-06-29 15:27:10
...
一 格式化实战
[root@localhost ~]# ls -l /dev/sdb*
brw-rw---- 1 root disk 8, 16 Jul 22 09:10 /dev/sdb
brw-rw---- 1 root disk 8, 17 Jul 22 09:10 /dev/sdb1
brw-rw---- 1 root disk 8, 18 Jul 22 09:10 /dev/sdb2
brw-rw---- 1 root disk 8, 19 Jul 22 09:10 /dev/sdb3
brw-rw---- 1 root disk 8, 21 Jul 22 09:10 /dev/sdb5
brw-rw---- 1 root disk 8, 22 Jul 22 09:10 /dev/sdb6
[root@localhost ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
192000 inodes, 768000 blocks
38400 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=788529152
24 block groups
32768 blocks per group, 32768 fragments per group
8000 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
 
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
 
[root@localhost ~]# mkfs -t ext4 /dev/sdb2
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
196608 inodes, 786432 blocks
39321 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=805306368
24 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
 
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
 
二 挂载实战
[root@localhost ~]# mkdir -p /mnt/sdb1
[root@localhost ~]# mount /dev/sdb1 /mnt/sdb1
[root@localhost ~]# umount /mnt/sdb1/
如果要使得挂载永久生效
[root@localhost ~]# vim /etc/fstab

Linux中格式化和挂载
            
    
    博客分类: Linux Linux格式化挂载 
 
  • Linux中格式化和挂载
            
    
    博客分类: Linux Linux格式化挂载 
  • 大小: 225.8 KB