[Novalug] boot embarrassment : clue, please?

Peter Larsen plarsen at famlarsen.homelinux.com
Sat Feb 14 12:33:36 EST 2009


On Sat, 2009-02-14 at 10:55 -0600, Beartooth wrote:
> On Fri, 13 Feb 2009, Peter Larsen wrote:
> >>  	Incidentally, that particular machine, designed as a 
> >> server, has two hard drives, which were originally locked 
> >> together to make one clone the other. I got my Friendly Local 
> >> Alpha Plus Technoid (FLAP) to unlock that. So would /dev/sdb 
> >> have worked??
> >
> > If it's a poweredge SC - you should have a raid controller in 
> > there. I'm pretty sure you have a mirrored pair, in which case 
> > to linux you have _one_ hard drive, /dev/sda - and you cannot 
> > (at least not easily) address each drive of the mirrored pair 
> > easily. The RAID controller makes sure both drives are in sync 
> > with your updates.
> 
>  	I certainly had all that initially.

You had a raid or /dev/sdb?

> [btth at BBB ~]$ dmesg|grep sdb
> sd 3:0:0:0: [sdb] 312500000 512-byte hardware sectors (160000 MB)
> sd 3:0:0:0: [sdb] Write Protect is off
> sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
> sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, 
> doesn't support DPO
> or FUA
> sd 3:0:0:0: [sdb] 312500000 512-byte hardware sectors (160000 MB)
> sd 3:0:0:0: [sdb] Write Protect is off
> sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
> sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, 
> doesn't support DPO
> or FUA
>   sdb: sdb1
> sd 3:0:0:0: [sdb] Attached SCSI disk
> [btth at BBB ~]$ df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/mapper/VolGroup00-LogVol00
>                        292G  5.7G  286G   2% /
> /dev/sda1             190M   27M  154M  15% /boot
> tmpfs                 505M   88K  504M   1% /dev/shm
> [btth at BBB ~]$

Ok - you're not using a hardware raid then. That's ok. You may still beO
using a software raid.

>  	So are they locked together, still mirroring one another? 

No - you cannot tell from the above. You have a volume manager running,
but how it's configured isn't clear.

First of, to get an idea of your volume management setup, do

# pvs

On my system, running lvm on a software raid, this is what I get:

[root at dogbert ~]# pvs
  PV         VG         Fmt  Attr PSize   PFree 
  /dev/md0   VolGroup00 lvm2 a-   297.06G 19.47G

The key here is /dev/md0 - this is the "physical" device on which the
LVM runs. If you see /dev/sda there, then /dev/sdb isn't in use at all
given the information you've already provided.

To see how your raid is setup/running do this:

# mdadm --misc --detail /dev/md0

On my system - remember it's running raid1 (mirroring) - I get this:

[root at dogbert ~]# mdadm --misc --detail/dev/md0
/dev/md0:
        Version : 00.90.03
  Creation Time : Mon Nov 21 19:32:01 2005
     Raid Level : raid1
     Array Size : 311516288 (297.09 GiB 318.99 GB)
  Used Dev Size : 311516288 (297.09 GiB 318.99 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Sat Feb 14 12:17:31 2009
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : a47e5318:b81c3758:0e9f7544:3e2426db
         Events : 0.20933932

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       8       18        1      active sync   /dev/sdb2

#

That's a lot of information. But read it carefully, and most of it
should actually makes sense. The list at the bottom is the key - it
shows the two devices that makes up the raid1. If you see your /dev/sdb
mentioned here, it's definitely in use.

Note that it says /dev/sda2 and /dev/sdb2 - this is because it's
referring to partitions. This will be the case for you too. A key for
mirroring is that each part of the mirror has to be the exact same size
(in theory you can use something bigger but the extra space is then
wasted on the bigger disk). Since we need a boot partition, and it's
on /dev/sda1 you repeat the same configuration on /dev/sdb. 

The /dev/sdb1 isn't wasted - but it'll take a bit of geekness to make
use of it. A mirror is about keeping your system running if one disk
fails. But what would happen if /dev/sda fails? Your system wouldn't be
able to boot since the boot partition isn't available. If the bios
support booting from a secondary device, you install grub/boot-mbr
on /dev/sdb1 just like you did with /dev/sda1 - and you are then able to
boot if you loose the /dev/sda.

> Or can I, as I think, use the whole 290 GB pretty much any way I 
> want?

It's your computer - you can do what you want ;)  If the disk isn't in
use - meaning that your lvs returns /dev/sda2 as the device it's using,
and you're not using RAID1. This of course has the advantage of
additional space, but of course it means being vulnable to disk
failures. Should you not care about this, you simple add /dev/sdb to
your volume group and expand the LogVol00 volume to use the new space
(or create a new volume and add a new mount-point - it depends on where
you need/want the space.

That was a lot - hope it helped?
 
-- 
Peter Larsen <plarsen at famlarsen.homelinux.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://calypso.tux.org/pipermail/novalug/attachments/20090214/8438427d/attachment.bin 


More information about the Novalug mailing list