botang 发表于 2019-5-16 20:37:18

课程第16次

2019-05-16

BIOS+MBR的硬盘是不可能有第16个分区的:
Last login: Thu May 16 08:31:47 2019 from 192.168.0.165
# cat /proc/partitions
major minor#blocksname

   8      0   20971520 sda
   8      1    1048576 sda1
   8      2   19921920 sda2
   8       16    1048576 sdb
11      0    4391936 sr0
253      0   17821696 dm-0
253      1    2097152 dm-1
# ls -l /dev/sdb
brw-rw----. 1 root disk 8, 16 May 16 08:34 /dev/sdb

# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x01a7270d.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): e
Partition number (1-4, default 1): 3
First sector (2048-2097151, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-2097151, default 2097151):
Using default value 2097151
Partition 3 of type Extended and of size 1023 MiB is set

Command (m for help): p

Disk /dev/sdb: 1073 MB, 1073741824 bytes, 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x01a7270d

   Device Boot      Start         End      Blocks   IdSystem
/dev/sdb3            2048   2097151   1047552    5Extended

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
#
# fuser-mv /mnt
                     USER      PID ACCESS COMMAND
/mnt:                root   kernel mount /mnt
                     root      16939 ..c.. bash
# umount/mnt
umount: /mnt: target is busy.
      (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
# fuser -kmv /mnt
                     USER      PID ACCESS COMMAND
/mnt:                root   kernel mount /mnt
                     root      16939 ..c.. bash
# umount/mnt
目录的“硬链接”:
#
# /etc/fstab
# Created by anaconda on Tue Apr2 17:40:59 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/rhel-root   /                     xfs   defaults      0 0
UUID=002844e7-703a-4d59-a501-4911b5508dcc /boot                   xfs   defaults      0 0
/dev/mapper/rhel-swap   swap                  swap    defaults      0 0
UUID="a52e60db-23e4-447c-b7e8-2250eace2e1a"   swap   swap      defaults 00
tmpfs    /dev/shm      tmpfs    defaults,size=1500M   00
LABEL=yourdata         /mnt                   ext4       defaults   00

/root/Videos            /Videos2               bind       bind0 0
~



页: [1]
查看完整版本: 课程第16次