Go Back   IceInSpace > General Astronomy > General Chat
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread
  #1  
Old 03-03-2020, 08:34 PM
AstralTraveller's Avatar
AstralTraveller (David)
Registered User

AstralTraveller is offline
 
Join Date: Mar 2008
Location: Wollongong
Posts: 3,819
Question Linux and Raids

I have one of those simple questions to which Mr Google refuses to find an answer .

I've had a hard drive failure and I've decided to replace the old drive with a Level 1 RAID. I've read up on mdadm and it all sounds easy peazy - except for one issue . I use Linux Mint but I also have OpenSuSE installed on a separate partition in case Mint falls over. And it has been useful. So, if I have mdadm installed on both OSes can they both access and read/write to the array? I can find plenty of articles on allowing Windows and Linux to access an array but nothing about two flavours of Linux. Since the superblock is common across Linux I think it should work. Does anyone know for sure?

PS The Raid is for data storage, not for booting.
Reply With Quote
  #2  
Old 03-03-2020, 10:01 PM
gary
Registered User

gary is offline
 
Join Date: Apr 2005
Location: Mt. Kuring-Gai
Posts: 5,999
Hi David,

Off hand, I can't think of any reason why it wouldn't work.

For example, use LVM and create a mirrored volume.

You should be able to mount it from either OS.
Reply With Quote
  #3  
Old 04-03-2020, 01:59 PM
AstralTraveller's Avatar
AstralTraveller (David)
Registered User

AstralTraveller is offline
 
Join Date: Mar 2008
Location: Wollongong
Posts: 3,819
Thanks Gary. I hadn't considered LVM. It looks very powerful and should do the job but at the moment the learning curve looks quite steep. What advantages would it have over 'mdadm'?
Reply With Quote
  #4  
Old 04-03-2020, 04:07 PM
gary
Registered User

gary is offline
 
Join Date: Apr 2005
Location: Mt. Kuring-Gai
Posts: 5,999
Quote:
Originally Posted by AstralTraveller View Post
Thanks Gary. I hadn't considered LVM. It looks very powerful and should do the job but at the moment the learning curve looks quite steep. What advantages would it have over 'mdadm'?
Hi David,

Ignoring RAID for one moment and just concentrating on LVM, that in itself
provides the potential advantage of abstracting your storage and having
"virtual partitions" that you can more easily expand or shrink.

These days, personally, I tend not to create many partitions. But for
example if you have ever created say a /tmp partition and later on wished
you had made it bigger or smaller, then LVM makes that a lot easier to do.

If you were just going to use the mirrored disks as one big partition,
then there is no compelling reason I can think of to use LVM.

However, if you do use LVM then the ability to create a mirrored volume
is in-built into the lvcreate command, so it then means you don't have
to use mdadm.

It's been probably three years since I last did it and as you know
things can change rapidly so I would recommend an additional Google
first before going down the LVM path and using it to do the mirroring.
I'd hate to give you a bum steer.

In looking at my own notes, you can't put the /boot partition under
LVM because the GRUB boot loader won't be able to read it.

In notes to myself, I recorded the following :-

In the event of RAID disk mirror failure -
See https://access.redhat.com/site/docum...or_create.html
See also https://access.redhat.com/site/docum...or_repair.html
See also /etc/lvm/lvm.conf
In the event of a RAID failure it will be reported in the syslog and a manual lvconvert --repair will have to be instigated

The above two references would not be the most up to date but might
provide a starting point for your further consideration.
Reply With Quote
  #5  
Old 04-03-2020, 09:00 PM
AstralTraveller's Avatar
AstralTraveller (David)
Registered User

AstralTraveller is offline
 
Join Date: Mar 2008
Location: Wollongong
Posts: 3,819
Hi Gary,

Thanks for going to all that effort. In the end I stuck with mdadm and now have it working. OpenSuSE also recognises the array, so all good there too.

I mucked around for a while trying to be fancy. Late last night I read how you can create an array from a disk containing data by adding it to an array (of 2) while listing the second drive as 'missing', then add the second disk and then resync. So I copied (slooowly) from the NAS overnight and tried it. Nah. Wasted about 45min getting it wrong before I finally conceded and started from scratch. Data is copying as I type.
Reply With Quote
  #6  
Old 06-03-2020, 02:41 PM
OICURMT's Avatar
OICURMT
Oh, I See You Are Empty!

OICURMT is offline
 
Join Date: Apr 2010
Location: Laramie, WY - United States of America
Posts: 1,555
Quote:
Originally Posted by AstralTraveller View Post
So, if I have mdadm installed on both OSes can they both access and read/write to the array?

mdadm is standarized accross all distros, including the ARM version of Linux.


Example: I had a critical failure of my RAID5 array on an ARMv6 and could not recover it as the boot partition was fried. I loaded a Live CDROM of AV Linux and rebuilt the array with my drives hanging out of my desktop, then performed a backup (12Tb), reloaded the ARM OS on the boot partition, re-installed the drives (2x6Tb, 2x3Tb) into the ARM NAS for a final rebuild. Took me 3 days...


No issues at all.
OIC!
Reply With Quote
  #7  
Old 08-03-2020, 02:53 PM
AstralTraveller's Avatar
AstralTraveller (David)
Registered User

AstralTraveller is offline
 
Join Date: Mar 2008
Location: Wollongong
Posts: 3,819
Quote:
Originally Posted by OICURMT View Post
mdadm is standarized accross all distros, including the ARM version of Linux.


Example: I had a critical failure of my RAID5 array on an ARMv6 and could not recover it as the boot partition was fried. I loaded a Live CDROM of AV Linux and rebuilt the array with my drives hanging out of my desktop, then performed a backup (12Tb), reloaded the ARM OS on the boot partition, re-installed the drives (2x6Tb, 2x3Tb) into the ARM NAS for a final rebuild. Took me 3 days...


No issues at all.
OIC!
Thanks for the verification. It was looking like that was the the case. It makes sense and is very Linux: once someone has built something everyone else just uses that system.

Raid 5 is a bit scary for me but it seems you are a more advanced user. I know how to mount a drive but not how to hang it.
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time is now 05:28 AM.

Powered by vBulletin Version 3.8.7 | Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Advertisement
Bintel
Advertisement