在linux中如何知道自己的IDE设备的代号呢?

发布网友 发布时间:2022-04-21 10:26

我来回答

1个回答

热心网友 时间:2023-10-20 21:26

root@rhas4 ~]# mount
/dev/sda5 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

[root@rhas4 ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 52988504 6324684 43972132 13% /
none 256744 0 256744 0% /dev/shm

[root@rhas4 ~]# dmesg |grep sda
SCSI device sda: 156250000 512-byte hdwr sectors (80000 MB)
SCSI device sda: drive cache: write back
sda: sda1 sda2 sda3 < sda5 >;
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
EXT3 FS on sda5, internal journal
Adding 8225272k swap on /dev/sda2. Priority:-1 extents:1
[root@rhas4 ~]#

[root@rhas4 proc]# cat /proc/partitions
major minor #blocks name

8 0 78125000 sda
8 1 16056936 sda1
8 2 8225280 sda2
8 3 1 sda3
8 5 53833783 sda5

[root@rhas4 proc]# cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/sda2 swap swap defaults 0 0
/dev/hda /media/cdrom auto pamconsole,exec,noauto,m

anaged 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,m

anaged 0 0

注: 对于每一个硬盘(IDE 或 SCSI)设备,Linux 分配了一个 1 到 16 的序列号码,这就代表了这块硬盘上面的分区号码。例如,第一个 IDE 硬盘的第一个分区,在 Linux 下面映射的就是 hda1,第二个分区就称作是 hda2。对于 SCSI 硬盘则是 sda1、sdb1 等

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com