LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-01-2011, 11:59 AM   #1
McManCSU
LQ Newbie
 
Registered: Apr 2007
Distribution: Ubuntu
Posts: 23

Rep: Reputation: 0
Partitions on older drives not showing up after reboot


I want to re-setup a raid array on some older drives using mdadm. That involved adding a single partition on 4 of my drives (3 older, 1 brand new - a replacement drive), using mdadm to create the array, etc. However, upon restarting the box, the 3 older drives do not show up as having partitions and hence mdadm cannot immediately start the array because 'there are not enough disks to start'.

For example, if I do an ls command before I restart, I will see:
Code:
 ls -ltr /dev/sd*1
/dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
After the restart the same command only shows the newer drive:
Code:
 ls -ltr /dev/sd*1
/dev/sdc1
If I add the same partition using fdisk on the missing drives (sdb, sdd, sde), they will show up again in the /dev/ directory and mdadm can then start.

Any ideas as to why is this happening?? After the restart, the fdisk -l will show the partitions though!? Very weird...

Thanks!
 
Old 08-01-2011, 07:39 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,828

Rep: Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559
Are you saying that fdisk shows the partitions, even after reboot, but ls & mdadm can't see them after reboot?
Did you set the partition types to 'fd'?
http://www.win.tue.nl/~aeb/partition...n_types-1.html
 
Old 08-01-2011, 07:59 PM   #3
McManCSU
LQ Newbie
 
Registered: Apr 2007
Distribution: Ubuntu
Posts: 23

Original Poster
Rep: Reputation: 0
Yes, after reboot, ls and mdadm do not see them. Here is sample output from fdisk:
Code:
Disk /dev/sdd: 500.1 GB, 500107862016 bytes
81 heads, 63 sectors/track, 191411 cylinders
Units = cylinders of 5103 * 512 = 2612736 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc288a787

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      191412   488385560   83  Linux
I assume the type is 83 and not fd (in fact they are all id 83). Should I try then with fd? The howto on the page you linked is a broken link, but I can pursue it through google.
 
Old 08-01-2011, 09:22 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,828

Rep: Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559
RAID for Linux uses partition type 'fd'. This link is not broken & is very good
http://www.linuxhomenetworking.com/w..._Software_RAID
 
Old 08-01-2011, 11:04 PM   #5
McManCSU
LQ Newbie
 
Registered: Apr 2007
Distribution: Ubuntu
Posts: 23

Original Poster
Rep: Reputation: 0
Still no go. I tried to fdisk it and was able to set it to 'fd'. However, upon rebooting, they disappeared again!

Code:
Disk /dev/sdd: 500.1 GB, 500107862016 bytes
81 heads, 63 sectors/track, 191411 cylinders
Units = cylinders of 5103 * 512 = 2612736 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc288a787

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      191412   488385560   fd  Linux raid autodetect

mcdizz@MediaMadness:~$ ls /dev/sd*1
/dev/sda1  /dev/sdc1
(For clarification, /dev/sda1 is my OS partition - not what I am using for the array)

For reference, I previously had an array that ended up going off into the deep end and was able to use 3/4 of these drives. The difference is that I never created a partition and rather used the whole drive (/dev/sd[bcde]). Is this really a bad thing to do??

Oh and I am on
Code:
mcdizz@MediaMadness:~$ cat /proc/version
Linux version 2.6.38-10-generic (buildd@vernadsky) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) ) 
#46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011
Aside from that, any other ideas?

Last edited by McManCSU; 08-01-2011 at 11:06 PM.
 
Old 08-02-2011, 12:07 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,828

Rep: Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559
Have you tried starting from scratch using that link in post #4; its pretty comprehensive and clear.
BTW, it does say to create one whole partition on each disk (which is what I remembered as best practice). They all need to be type fd.

Last edited by chrism01; 08-02-2011 at 12:11 AM.
 
Old 08-02-2011, 12:10 AM   #7
McManCSU
LQ Newbie
 
Registered: Apr 2007
Distribution: Ubuntu
Posts: 23

Original Poster
Rep: Reputation: 0
I also tried following these directions:
http://www.linuxquestions.org/questi...er-dev-756329/

But the drives kept failing to show their partitions. I noticed too that the /dev/md0 turns into /dev/md127 after the reboot - very strange, but seemed to be because of this:
http://ubuntuforums.org/showthread.p...sion+of+ubuntu

I have decided to remove the partitions since I am using the full raw disks anyway and just create the array that way.

Update: So far this has proven reliable through restarts with no partitions (maybe it was really related to my immediately above link, but I am not in the mood to definitively find out ) Mdadm definitely changed in a way for 11.04 that makes the guide in #4 out of date despite its thoroughness - I recommend using #33 in the above posting. All, thanks for the tips!

Last edited by McManCSU; 08-02-2011 at 12:31 AM.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM not showing contents USB drives after reboot gGuzz Linux - Newbie 2 10-12-2009 04:46 PM
/dev/md0 not showing after reboot tflarsen Fedora 2 05-30-2008 04:07 AM
driver not showing after reboot crackerB Linux - Software 1 01-17-2008 11:51 AM
how do I add partitions to drives that have Logical Volume (LVM) partitions? The MJ Linux - Software 5 08-17-2006 07:15 PM
/proc/partitions showing wrong partitions netstv Linux - General 1 07-10-2006 02:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02: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