Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
merging two raids into one without damaging the third [solve
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5369

PostPosted: Fri Jan 18, 2019 5:32 pm    Post subject: merging two raids into one without damaging the third [solve Reply with quote

Greetings,

I have 3 raids on my system, 1 is raid1 /boot, 2 is is raid1 / and 3 is raid5 (rest of the system)
I want to merge raids 1 and 2 into one and keep raid 3 undamaged.
here is the layout:
Code:

GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Model: ST1000DM005 HD10
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): D187F40B-2093-44CD-919B-E6EEC718BFB4
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   FD00  Linux RAID
   2          411648         4605951   2.0 GiB     FD00  Linux RAID
   3         4605952      1953525134   929.3 GiB   FD00  Linux RAID


if I delete partitions 1 and 2, create another partition instead on all 4 drives and reboot, what are the odds I'll loose raid 3?
all are swraid

thanks.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein


Last edited by DaggyStyle on Wed Feb 06, 2019 8:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Fri Jan 18, 2019 6:16 pm    Post subject: Reply with quote

DaggyStyle

Do not confuse partitions with the raid sets which those partitions may be a member of.
You have another layer of metadata you are overlooking. Its the raid metadata.

What does
Code:
mdadm -E /dev/sda[123]
have to say about the raid version?

Deleting partitions will destroy the raid sets on those partitions. Well, that data will become inaccessible.

The remaining raid will continue to work. However, it may get a new /dev/mdX node. Don't do anything hasty until you post that mdadm -E output
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5369

PostPosted: Fri Jan 18, 2019 7:04 pm    Post subject: Reply with quote

Greetings Neddy,

here:
Code:
/dev/sda1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : afe51e44:2b67d803:c44c77eb:7ee19756
  Creation Time : Mon Apr 22 08:10:24 2013
     Raid Level : raid1
  Used Dev Size : 204736 (199.94 MiB 209.65 MB)
     Array Size : 204736 (199.94 MiB 209.65 MB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 1

    Update Time : Fri Dec 14 09:58:23 2018
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 7531e520 - correct
         Events : 40


      Number   Major   Minor   RaidDevice State
this     3       8       49        3      active sync   /dev/sdd1

   0     0       8        1        0      active sync   /dev/sda1
   1     1       8       17        1      active sync   /dev/sdb1
   2     2       8       33        2      active sync   /dev/sdc1
   3     3       8       49        3      active sync   /dev/sdd1
/dev/sda2:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 41c1610b:a211b8fb:80c9b816:f67ebbd4
           Name : sysresccd:2
  Creation Time : Mon Apr 29 16:17:55 2013
     Raid Level : raid1
   Raid Devices : 4

 Avail Dev Size : 4192256 (2047.00 MiB 2146.44 MB)
     Array Size : 2096116 (2046.99 MiB 2146.42 MB)
  Used Dev Size : 4192232 (2046.99 MiB 2146.42 MB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=24 sectors
          State : clean
    Device UUID : 46c9e547:29f48421:4985de70:c237c23b

    Update Time : Fri Jan 18 16:12:08 2019
       Checksum : 360feffe - correct
         Events : 21093


   Device Role : Active device 3
   Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sda3:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 176d51db:ba5a92a0:93f0bc6f:b89bed90
           Name : sysresccd:3
  Creation Time : Mon Apr 22 08:10:58 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 1948917135 (929.32 GiB 997.85 GB)
     Array Size : 2923375104 (2787.95 GiB 2993.54 GB)
  Used Dev Size : 1948916736 (929.32 GiB 997.85 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=399 sectors
          State : clean
    Device UUID : eccba7bf:6b1f936e:371c6f44:8baa5bdb

    Update Time : Fri Jan 18 16:22:22 2019
       Checksum : dfd416b5 - correct
         Events : 25923

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 3
   Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)

_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Fri Jan 18, 2019 7:22 pm    Post subject: Reply with quote

DaggyStyle,

Other than the risk that the raid set on /dev/sd[abcd]3 gets a new /dev/mdX node, it will survive the deletion of the other partitions.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5369

PostPosted: Fri Jan 18, 2019 8:26 pm    Post subject: Reply with quote

NeddySeagoon wrote:
DaggyStyle,

Other than the risk that the raid set on /dev/sd[abcd]3 gets a new /dev/mdX node, it will survive the deletion of the other partitions.

mdx change means just modify the fstab, I don't see any issue with it, correct?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Fri Jan 18, 2019 8:27 pm    Post subject: Reply with quote

DaggyStyle,

Correct. Once you can boot again.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5369

PostPosted: Wed Feb 06, 2019 8:32 pm    Post subject: Reply with quote

as Neddy stated, it worked. just had to double check what I'm doing
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum