我需要将第二个 SSD 驱动器安装到 /home2。我已经创建了文件夹 /home2 - 现在,我如何找出哪个是未使用的驱动器?这是 /dev/sda 还是 sdb ?
我到底要寻找什么才能知道哪个是未安装的驱动器?
[/]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb2[1] sda2[0]
524224 blocks super 1.0 [2/2] [UU]
md0 : active raid1 sdb1[1] sda1[0]
16777088 blocks super 1.0 [2/2] [UU]
md2 : active raid1 sdb3[1] sda3[0]
217125312 blocks super 1.0 [2/2] [UU]
unused devices: <none>
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md2 204G 84G 111G 44% /
tmpfs 16G 0 16G 0% /dev/shm
/dev/md1 496M 53M 419M 12% /boot
/usr/tmpDSK 1.9G 94M 1.7G 6% /tmp
root@kas [~]# fdisk -l | grep '^Disk'
Disk /dev/sdb: 240.1 GB, 240057409536 bytes
Disk identifier: 0x0007b22f
Disk /dev/sda: 240.1 GB, 240057409536 bytes
Disk identifier: 0x000c0cf1
Disk /dev/md2: 222.3 GB, 222336319488 bytes
Disk identifier: 0x00000000
Disk /dev/md0: 17.2 GB, 17179738112 bytes
Disk identifier: 0x00000000
Disk /dev/md1: 536 MB, 536805376 bytes
Disk identifier: 0x00000000
root@kas [~]# fdisk -l
Disk /dev/sdb: 240.1 GB, 240057409536 bytes
255 heads, 63 sectors/track, 29185 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: 0x0007b22f
Device Boot Start End Blocks Id System
/dev/sdb1 1 2089 16777216+ fd Linux raid autodetect
/dev/sdb2 2089 2155 524288+ fd Linux raid autodetect
/dev/sdb3 2155 29186 217125464+ fd Linux raid autodetect
Disk /dev/sda: 240.1 GB, 240057409536 bytes
255 heads, 63 sectors/track, 29185 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: 0x000c0cf1
Device Boot Start End Blocks Id System
/dev/sda1 1 2089 16777216+ fd Linux raid autodetect
/dev/sda2 2089 2155 524288+ fd Linux raid autodetect
/dev/sda3 2155 29186 217125464+ fd Linux raid autodetect
Disk /dev/md2: 222.3 GB, 222336319488 bytes
2 heads, 4 sectors/track, 54281328 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md0: 17.2 GB, 17179738112 bytes
2 heads, 4 sectors/track, 4194272 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md1: 536 MB, 536805376 bytes
2 heads, 4 sectors/track, 131056 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
答案1
两个 SSD 都已完全致力于您的三个 RAID-1 分区。它们都没有任何可用空间。
编辑: 是的,我就是这么说的。输出df
显示已/dev/md[12]
安装(我猜/dev/md0
是交换;/cat /proc/swaps
将确认这一点)。 cat /proc/mdstat
然后告诉您这是一个由和/dev/mdN
组成的 RAID-1 ,其中 N=0,1,2。/dev/sdaN+1
/dev/sdbN+1
输出fdisk
通过向我们显示每个磁盘完全被三个 RAID 自动检测分区填满来证实了这一点。
答案2
该df
命令将告诉您哪些驱动器安装在何处。
答案3
我发现也需要识别 raid 阵列中的各个磁盘,并使用了“sudo smartctl -a /dev/sd?”找出相同磁盘的序列号。
您当前没有卸载 sda 或 sdb,正如您的 cat /proc/mdstat 所指出的,所有设备显示 [2/2] [UU]。
如果您想将这些磁盘之一用于 /home2,您可能想废弃您的 RAID 阵列 - 这是否正确?