All of lore.kernel.org
 help / color / mirror / Atom feed
From: Reindl Harald <h.reindl@thelounge.net>
To: buhtz@posteo.de, David T-G <davidtg-robot@justpickone.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: partitions & filesystems (was "Re: ???root account locked??? after removing one RAID1 hard disc")
Date: Tue, 1 Dec 2020 10:13:01 +0100	[thread overview]
Message-ID: <d5de4b8b-5fff-0937-7e90-30ca100cab15@thelounge.net> (raw)
In-Reply-To: <8fa1ae68716e406423039419f10ec219@posteo.de>



Am 01.12.20 um 09:41 schrieb buhtz@posteo.de:
> 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



  reply	other threads:[~2020-12-01  9:16 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30  8:44 “root account locked” after removing one RAID1 hard disc c.buhtz
2020-11-30  9:27 ` antlists
2020-11-30 10:29   ` c.buhtz
2020-11-30 11:40     ` Wols Lists
2020-11-30 10:31   ` Reindl Harald
2020-11-30 11:10     ` Rudy Zijlstra
2020-11-30 11:18       ` Reindl Harald
2020-11-30 20:06         ` ???root account locked??? " David T-G
2020-11-30 21:57           ` Reindl Harald
2020-11-30 22:06             ` RAID repair script (was "Re: ???root account locked??? after removing one RAID1 hard disc" David T-G
2020-11-30 12:00     ` “root account locked” after removing one RAID1 hard disc Wols Lists
2020-11-30 12:13       ` Reindl Harald
2020-11-30 13:11         ` antlists
2020-11-30 13:16           ` Reindl Harald
2020-11-30 13:47             ` antlists
2020-11-30 13:53               ` Reindl Harald
2020-11-30 14:46                 ` Rudy Zijlstra
2020-11-30 20:05 ` partitions & filesystems (was "Re: ???root account locked??? after removing one RAID1 hard disc") David T-G
2020-11-30 20:51   ` antlists
2020-11-30 21:03     ` Rudy Zijlstra
2020-11-30 21:49     ` Reindl Harald
2020-11-30 22:31       ` antlists
2020-11-30 23:21         ` Reindl Harald
2020-11-30 23:59           ` antlists
2020-11-30 22:04     ` partitions & filesystems David T-G
2020-12-01  8:45     ` partitions & filesystems (was "Re: ???root account locked??? after removing one RAID1 hard disc") c.buhtz
2020-12-01  9:18       ` Rudy Zijlstra
2020-12-01 10:00       ` Wols Lists
2020-12-01  8:41   ` buhtz
2020-12-01  9:13     ` Reindl Harald [this message]
2020-12-01  8:42   ` c.buhtz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d5de4b8b-5fff-0937-7e90-30ca100cab15@thelounge.net \
    --to=h.reindl@thelounge.net \
    --cc=buhtz@posteo.de \
    --cc=davidtg-robot@justpickone.org \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.