LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 02-20-2008, 06:49 PM   #1
ThatGuyTim
LQ Newbie
 
Registered: Feb 2008
Posts: 2

Rep: Reputation: 0
Angry Missing Partitions in /sys/block and /dev


Hi all!

I'm trying to put together a RAID server using Fedora Core 8. Originally the system had 6 750GB discs in RAID-5 mode. Unfortunately, one of the drives was bad, so I had to install a replacement and - on a whim - I bought an extra drive for the array.

The "bad" disk was /dev/sdd. I installed both new drives; the new /dev/sdd appeared, as did /dev/sdh, which was the "bonus" disk. At this point, I now had my OS on /dev/sda, while my RAID drives were /dev/sdb-sdh.

Unfortunately, I messed up and forgot to put a partition on sdd and sdh when I mdadm -add'ed them into the array (I just used mdadm --add /dev/md0 /dev/sdd /dev/sdh). So I mdadm --failed and mdadm --remove'd both disks, put a Linux Raid Autodetect partition on them (with the same characteristics as the other discs), and then mdadm -add'ed them back to the array - this time using the partiton names: mdadm -add /dev/md0 /dev/sdd1 /dev/sdh1.

That worked fine until I rebooted the machine. My box now won't mount the partitions /dev/sdd1 and /dev/sdh1 under /dev, so I can't reassemble my array. Oddly, fdisk and dmesg both "see" the partitions.

Dmesg shows:

sd 4:0:0:0: [sdd] 1465149168 512-byte hardware sectors (750156 MB)
sd 4:0:0:0: [sdd] Write Protect is off
sd 4:0:0:0: [sdd] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 4:0:0:0: [sdd] 1465149168 512-byte hardware sectors (750156 MB)
sd 4:0:0:0: [sdd] Write Protect is off
sd 4:0:0:0: [sdd] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdd: sdd1
sd 4:0:0:0: [sdd] Attached SCSI disk

Likewise, fdisk -l shows:

Disk /dev/sdd: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0300390a

Device Boot Start End Blocks Id System
/dev/sdd1 * 1 91201 732572001 fd Linux raid autodetect

/dev/sdh1 also appears in dmesg and fdisk, and the entries for both these disks / partitions appear the same as the other RAID discs.

What's strange, then, is that there are no entries for the partitions on these two discs under /dev:

[root@localhost ~]# ls /dev/sd*
/dev/sda /dev/sdb /dev/sdc1 /dev/sde1 /dev/sdg
/dev/sda1 /dev/sdb1 /dev/sdd /dev/sdf /dev/sdg1
/dev/sda2 /dev/sdc /dev/sde /dev/sdf1 /dev/sdh

While the other, older discs have both the disk and the partitions (e.g, /dev/sdb and /dev/sdb1), sdd and sdh have only the drives themselves visible.

Likewise, the entries for sdb1 and sdh1 are missing from /sys/block.

/sys/block/sdh/dev
/sys/block/sdg/sdg1/dev
/sys/block/sdg/dev
/sys/block/sdf/sdf1/dev
/sys/block/sdf/dev
/sys/block/sde/sde1/dev
/sys/block/sde/dev
/sys/block/sdd/dev
/sys/block/sdc/sdc1/dev
/sys/block/sdc/dev
/sys/block/sdb/sdb1/dev
/sys/block/sdb/dev
/sys/block/sda/sda2/dev
/sys/block/sda/sda1/dev
/sys/block/sda/dev

I'm still a Linux newbie, and I'm WAY over my head on this one. If anyone could tell me how I get the partitions /dev/sdd1 and /dev/sdh1 to show up in /dev, I'd appreciate it.

Sorry about the length, and thanks for the help!
Tim
 
Old 02-20-2008, 07:10 PM   #2
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 2,381
Blog Entries: 3

Rep: Reputation: 169Reputation: 169
in your /etc/fstab you will need to make the entries /dev/sdb1 /mnt/sdb1 ext.3 defaults 1 1
then go and make a folder that is in /mnt/sdb1 any time you put another hard drive in it will take that place. so if you have hot swapping the systm will name the sdb 123 or sdh 123 it will not matter a good thing to do if you do alot of hot swapping is to keep the same ammout of partions on all the drives that way you can switch them out then never have this problem. you only have to remember where you put it . good luck.
 
Old 02-20-2008, 07:13 PM   #3
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 2,381
Blog Entries: 3

Rep: Reputation: 169Reputation: 169
now I know this scsi sata drive thing is supposed to do this through the system block but why leave it to the program to mount your hard drives. ext3 or any other file system. good luck.n also in yum you can do this.

Last edited by Drakeo; 02-20-2008 at 07:15 PM.
 
Old 09-01-2008, 04:45 PM   #4
Hannes2000
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
I've got the exact same problem. have you found any solution yet? I looked through my udev-rules, but didn't find anything special.
 
Old 09-02-2008, 06:40 AM   #5
ThatGuyTim
LQ Newbie
 
Registered: Feb 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Hannes2000 View Post
I've got the exact same problem. have you found any solution yet? I looked through my udev-rules, but didn't find anything special.
Unfortunately, I never really received any help on this one. Instead, I just re-installed Fedora 8. Curiously, the installer was able to figure everything out, and the new install recognized all the disks and made the RAID array fully functional again.

Hopefully that trick will work for you, too!
 
Old 09-02-2008, 02:00 PM   #6
Hannes2000
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
I'm sure it would, at least an Ubuntu Live CD recognizes everything correctly.
 
Old 01-30-2009, 03:05 PM   #7
festr
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 0
I've the same issue with disappearing /dev/sdb1,2 with combination of Raid1 md0. It started with accidentaly adding /dev/sdb to /dev/md0 instead of /dev/sdb1 (mdadm --manage /dev/md0 --add /dev/sdb instead of --add /dev/sdb1).

In dmesg (kern log)
md: md0 stopped.
md: bind<sdb>
md: could not open unknown-block(8,17).
md: md_import_device returned -6
md: bind<sda1>
md: kicking non-fresh sdb from array!
md: unbind<sdb>
md: export_rdev(sdb)

helped only erasing raid superblock on /dev/sdb (mdadm --misc --zero-superblock /dev/sdb) reboot and recreate partitions and assign /dev/sdb1 again to the raid.
 
  


Reply

Tags
device, devices, disk, filesystem, partition, raid


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Waiting for /sys/block/hda/dev to come up davcefai Debian 3 11-29-2007 04:06 PM
/dev/audio, /dev/dsp and /dev/mixer missing in Debian Etch 1337_penguin Debian 2 04-11-2007 11:33 AM
Missing Block Device /dev/hdc1 !?! whishkah Linux - Hardware 2 09-06-2006 09:31 AM
LVM and sys/block cantabile Linux - General 0 08-27-2005 10:47 AM
do i need /dev after installing /sys - kernel 2.6.1 thehundredthone Linux - Software 2 02-11-2004 11:20 AM


All times are GMT -5. The time now is 03:49 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration