Re: partitions & filesystems (was "Re: ???root account locked??? after removing one RAID1 hard disc")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Am 01.12.20 um 09:41 schrieb buhtz@xxxxxxxxx:
Dear David and others,

thanks a lot for so much discussion and details. I learn a lot.
Following your discussions I see there still is some basic knowledge missing on my side.

Am 30.11.2020 21:05 schrieb David T-G:
You don't see any "filesystem" or, more correctly, partition in your

  fdisk -l

I do not see the partition in the output of "fdisk -l".

But I can (when both discs are present) mount /dev/md127 (manualy via mount and via fstab) to /Daten and create files on it.

So the display isn't interesting, although the logic behind that approach
certainly is to me.

I plugged in the nacked hard discs and they appear as /dev/sdb and /dev/sdc. After that
   mdadm --create /dev/md/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
Then I did
  ls -l /dev/md/md0 and found out this is just a link to /dev/md127.
I formated the raid with
  mkdfs.ext4 /dev/md127
Then I mounted (first manually via mount and after sucess via fstab) /dev/md127 to /Daten

Is this unusual?

that's normal, the RAID itself is a virtual device backed by the underlying disks

you can place a filesystem or even LVM on top of the RAID device and then place the filesystem on the LVM-device to combine the redundancy on the lower layer with the flexibility of LVM (but it would create another layer of complexity)

what i would normally recommend is not adding /dev/sda and /dev/sdb directly but create a partition with identical size (and some free space at the end) on both of them and add that partitions to the raid


[root@srv-rhsoft:~]$ df -hT
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/md1       ext4   29G  7.8G   21G  28% /
/dev/md2       ext4  3.6T  1.2T  2.4T  34% /mnt/data
/dev/md0       ext4  485M   48M  433M  10% /boot


[root@srv-rhsoft:~]$ cat /proc/mdstat
Personalities : [raid10] [raid1]
md1 : active raid10 sdc2[6] sdd2[5] sdb2[7] sda2[4]
      30716928 blocks super 1.1 256K chunks 2 near-copies [4/4] [UUUU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md2 : active raid10 sdd3[5] sdb3[7] sdc3[6] sda3[4]
      3875222528 blocks super 1.1 512K chunks 2 near-copies [4/4] [UUUU]
      bitmap: 6/29 pages [24KB], 65536KB chunk

md0 : active raid1 sdc1[6] sdd1[5] sdb1[7] sda1[4]
      511988 blocks super 1.0 [4/4] [UUUU]


[root@srv-rhsoft:~]$ fdisk -l /dev/sda
Disk /dev/sda: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 860
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000d9ef2

Device     Boot    Start        End    Sectors  Size Id Type
/dev/sda1 * 2048 1026047 1024000 500M fd Linux raid autodetect /dev/sda2 1026048 31746047 30720000 14.7G fd Linux raid autodetect /dev/sda3 31746048 3906971647 3875225600 1.8T fd Linux raid autodetect


[root@srv-rhsoft:~]$ fdisk -l /dev/sdb
Disk /dev/sdb: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 860
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000d9ef2

Device     Boot    Start        End    Sectors  Size Id Type
/dev/sdb1 * 2048 1026047 1024000 500M fd Linux raid autodetect /dev/sdb2 1026048 31746047 30720000 14.7G fd Linux raid autodetect /dev/sdb3 31746048 3906971647 3875225600 1.8T fd Linux raid autodetect


[root@srv-rhsoft:~]$ fdisk -l /dev/sdc
Disk /dev/sdc: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 850
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000d9ef2

Device     Boot    Start        End    Sectors  Size Id Type
/dev/sdc1 * 2048 1026047 1024000 500M fd Linux raid autodetect /dev/sdc2 1026048 31746047 30720000 14.7G fd Linux raid autodetect /dev/sdc3 31746048 3906971647 3875225600 1.8T fd Linux raid autodetect


[root@srv-rhsoft:~]$ fdisk -l /dev/sdd
Disk /dev/sdd: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 850
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000d9ef2

Device     Boot    Start        End    Sectors  Size Id Type
/dev/sdd1 * 2048 1026047 1024000 500M fd Linux raid autodetect /dev/sdd2 1026048 31746047 30720000 14.7G fd Linux raid autodetect /dev/sdd3 31746048 3906971647 3875225600 1.8T fd Linux raid autodetect





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux