disk replacement

Paul Howarth paul at city-fan.org
Thu May 5 13:57:17 UTC 2005


Oliver Vecernik wrote:
> Hi Paul,
> 
> Paul Howarth schrieb:
> 
>>Can you try:
>># vgreduce -v VolGroup00 /dev/hdb1
> 
> 
> That did the trick. This is the first time I'm working with LVM, but
> meanwhile I love it. I moved everything and finally have the following
> configuration:
> 
> # df -h
> Dateisystem          Größe Benut  Verf Ben% Eingehängt auf
> /dev/mapper/VolGroup00-LogVol00
>                        37G  4,4G   31G  13% /
> /dev/hda1              99M   16M   79M  17% /boot
> none                  252M     0  252M   0% /dev/shm
> /dev/hdb1              99M   16M   79M  17% /mnt/boot.new
> 
> # vgdisplay -v
>     Finding all volume groups
>     Finding volume group "VolGroup00"
>   --- Volume group ---
>   VG Name               VolGroup00
>   System ID
>   Format                lvm2
>   Metadata Areas        1
>   Metadata Sequence No  15
>   VG Access             read/write
>   VG Status             resizable
>   MAX LV                0
>   Cur LV                2
>   Open LV               2
>   Max PV                0
>   Cur PV                1
>   Act PV                1
>   VG Size               38,22 GB
>   PE Size               32,00 MB
>   Total PE              1223
>   Alloc PE / Size       1223 / 38,22 GB
>   Free  PE / Size       0 / 0
>   VG UUID               Scg1fw-WM5q-eoj5-rcf8-AAAi-sKmV-nrWAYK
> 
>   --- Logical volume ---
>   LV Name                /dev/VolGroup00/LogVol00
>   VG Name                VolGroup00
>   LV UUID                c3JfzP-cN3w-v49v-nXYN-whIc-b5A2-f7KMzx
>   LV Write Access        read/write
>   LV Status              available
>   # open                 1
>   LV Size                37,22 GB
>   Current LE             1191
>   Segments               2
>   Allocation             inherit
>   Read ahead sectors     0
>   Block device           253:1
> 
>   --- Logical volume ---
>   LV Name                /dev/VolGroup00/LogVol01
>   VG Name                VolGroup00
>   LV UUID                K6Tqyu-jO0S-BpPC-8ob7-t7Qd-SOQ1-aK6EUY
>   LV Write Access        read/write
>   LV Status              available
>   # open                 1
>   LV Size                1,00 GB
>   Current LE             32
>   Segments               1
>   Allocation             inherit
>   Read ahead sectors     0
>   Block device           253:2
> 
>   --- Physical volumes ---
>   PV Name               /dev/hdb2
>   PV UUID               gaBRx9-fZQ4-0u5P-8kv4-2mp8-xiua-K7hNYQ
>   PV Status             allocatable
>   Total PE / Free PE    1223 / 0
> 
> The last thing before I can boot from my drive is to copy the MBR.
> 
> # grub-install /dev/hdb
> /dev/hdb does not have any corresponding BIOS drive.
> 
> What does that mean?

What's in your /boot/grub/device.map ?

Perhaps you could try "grub-install --recheck"?

The other thing you need to bear in mind is that although you are 
installing grub on hdb, when that version of grub is loaded it will be 
on "hda". So a bit of trickery is needed. This is not something I've 
done before, but I think it goes like this:

# grub
grub> device (hd0) /dev/hdb
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

Perhaps a grub expert could confirm that?

> Finally one last question: do you think it's a good idea to use this
> "old" disk within a RAID 1? It would be a nice exercise for me anyway. :-)

Yes, you could do that. It would be another "tricky" operation though, 
since neither of your current drives are part of a raid device. Best 
leave that for another thread I think.

Paul.




More information about the users mailing list