LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-04-2017, 04:06 AM   #1
ajohn
Member
 
Registered: Jun 2011
Location: UK
Distribution: OpenSuse Leap
Posts: 122

Rep: Reputation: Disabled
Mystery mdadm raid1 mounting


I've been tearing my hair out on this for several days so hope some one can help. It's a desktop machine, my partitioning may be a bit unusual but has it's reasons. I use a raid1 array as /home. This is the disk layout.

Code:
john@dhcppc1:~> lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda       8:0    0 119.2G  0 disk  
├─sda1    8:1    0   195M  0 part  /boot/efi
└─sda2    8:2    0 119.1G  0 part  /
sdb       8:16   0 232.9G  0 disk  
├─sdb1    8:17   0    10G  0 part  [SWAP]
├─sdb2    8:18   0    10G  0 part  /var
├─sdb3    8:19   0    10G  0 part  /tmp
└─sdb4    8:20   0 202.9G  0 part  /home/home2
sdc       8:32   0 232.9G  0 disk  
└─sdc1    8:33   0 232.9G  0 part  
sdd       8:48   1 232.9G  0 disk  
└─sdd1    8:49   1 232.9G  0 part  
  └─md0   9:0    0 232.9G  0 raid1 
sr0      11:0    1  1024M  0 rom
Which sums the problem up. fstab shows the same but by name. I can't find md0 mapped to home anywhere. I've tried searching all files for home - rather a lot and later for uuid's. Those map to md0 in an odd sort of way but no signs of an assignment to home.

One of the drives is down. It needs replacing and also enlarging. For a number of reasons my general idea is to map home to a partition on the spare disc and use rsync to copy the files across. Remove the raid, install new drives, convert to raid, map to home and copy the files across again. To do that I need to remove the current home mapping.

The guides about on doing this via mdadm make various suggestions and many are rather old. The above looks to be a simpler way of doing it. I'm basically a desktop person and only go below if I must. I usually manage when I do but fully understanding all of what mdadm can do is a fair old task.

I'm also now determined to find out just how /home is mapped even if I fix it some another way.

The failure might be down to a power failure or actually the first time I installed opensuse leap 42.2. The install didn't indicate that it would format home but all of the old files from 12.3 went - as they needed to. During install I imported the partitioning and all apart from that aspect looked ok.

John
-
 
Old 03-04-2017, 09:56 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,137

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
From the above it looks like home is not a separate mount, it is under '/' on sda2. You seem to have half a raid1. Post the output of 'cat /proc/mdstat' to see.
 
Old 03-04-2017, 10:02 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,774

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
The quick way to find out what filesystem holds a directory is to use the df command, in your case:
Code:
df /home/
Do include the trailing "/" to force a possible symlink to be followed to its target.
 
1 members found this post helpful.
Old 03-04-2017, 10:35 AM   #4
ajohn
Member
 
Registered: Jun 2011
Location: UK
Distribution: OpenSuse Leap
Posts: 122

Original Poster
Rep: Reputation: Disabled
Thanks both. Arrggggggggggggggg. I imported my existing partitioning when I installed. It's totally disregarded what I had spec'd a /home. I've been fiddling around for over 4 days trying to sort this.

Code:
john@dhcppc1:~> df /home/
Filesystem     1K-blocks     Used Available Use% Mounted on                                    
/dev/sda2      122742812 48287944  68196796  42% /
also

Code:
john@dhcppc1:~> cat /proc/mdstat                                                               
Personalities : [raid1]                                                                        
md0 : active raid1 sdd1[1]                                                                     
      244197184 blocks super 1.0 [2/1] [_U]                                                    
      bitmap: 2/2 pages [8KB], 65536KB chunk                                                   
                                                                                               
unused devices: <none>
I did know one drive was down, need more space and wasn't keen on doing anything until I found out what was going on. Not keen on replacing it and then enlarging either as 2 drives would have to be changed and then enlarged. Examples on the web vary which was worrying. So intended to make a temporary /home then remove the raid and create another with new larger disks and then map that to home. Copying files across of course. It's done the first stage of that for me - looking on the bright side.

A scan with mdadm shows one disk active and the other as clean. Checksums ok on both but the one disk shows read errors at about the time I installed / had a power failure but I think that was well before the install.

That just leaves how do I remove the current raid completely? It does seem to be mounted but not mapped anywhere.

John
-
 
Old 03-04-2017, 12:06 PM   #5
ajohn
Member
 
Registered: Jun 2011
Location: UK
Distribution: OpenSuse Leap
Posts: 122

Original Poster
Rep: Reputation: Disabled
Just a note.

I used yast2 to delete the raid. One problem. For some reason KDE reboot just hung up and wouldn't. Something about the greater not being happy and couldn't report the bug because it was unhappy. A reboot from the console did work and following that kde's was ok too.

Wonder what KDE was doing that needed an unused raid to be there.

John
-
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
SuSE 11, mdadm and raid1 bbot Linux - Server 2 09-05-2012 03:11 AM
mdadm raid1 both bootable chiendarret Linux - Server 1 03-09-2009 07:53 AM
Migrate to a raid1 with mdadm Ossar Linux - Software 2 08-19-2008 11:55 AM
Software RAID1 with mdadm bujecas Debian 0 10-26-2006 09:56 AM
raid1 using mdadm? help plz akadidm Linux - Hardware 3 06-09-2005 04:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration