Re: LVM partitions on ax external USB HD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





-------- Original Message --------
Subject: Re: LVM partitions on ax external USB HD
Date: Sat, 16 Apr 2005 12:40:57 +0200
From: Antonio Montagnani <anto.montagnani@xxxxxxxxxxx>
To: ja <ja@xxxxxxxxxxxxx>
References: <4258E526.2040307@xxxxxxxxxxx> <200504111653.18230.wagnerric@xxxxxxxxxxxxxxxxxxxxxx> <425B7743.4010903@xxxxxxxxxxx> <1113300463.23772.1.camel@xxxxxxxxxxxxxxx> <425FCCB2.5020907@xxxxxxxxxxx> <1113583468.8863.70.camel@xxxxxxxxxxxxxxx>




ja wrote / ha scritto on /il 15/04/2005 18:44:

On Fri, 2005-04-15 at 16:16 +0200, Antonio Montagnani wrote:


John Austin wrote / ha scritto on /il 12/04/2005 12:07:



On Tue, 2005-04-12 at 09:22 +0200, Antonio Montagnani wrote:




Rick Wagner ha scritto / wrote  il / on 12/04/2005 00:53:





On Sunday 10 April 2005 2:34 am, Antonio Montagnani wrote:






I tried to install Fedora on an external USB HD.
Of course booting from it didn't work.
On the disk there are an ext3 partition /boot and a LVM partition
If I connect the HD to a PC as USB device it is correctly mounted but I
see only the ext3 partition.
How can I see also the LVM???








Since no one else has answered, I'll take a stab. I have used LVM on several permanent hard drives, but never on removables. However I think what your looking to do is a udev script. Check out the information on udev. Also look for hotplug.

What you'll want your script to do is upon detecting the plugging of your USB drive, it will want to scan (vgscan/lvscan) the drive for LVM volumes, then activate the volume (vgchange/lvchange --available=yes).

I'm not sure what you want to do for unplugging. I expect that you'll need a script to flush then deactivate the volumes prior to pulling the plug on the drive.

As I said, I don't know much about hotplug and udev, but this may give you some additional search hints.

--rick








Rick,

Tnx for you reply.

There are two separate issues:

1) how to manage a LVM partitioned removable device (USB hard disk, key etc.): does it make any sense to have them partitioned as LVM??
2) how to install Fedora on a removable device (USB hard disk, for example) and boot off it (with Grub installed on it, in order to have a removable Fedora installation for every occasion)


I have not enough skill to solve them. Any idea??

--
Antonio M.




Hi
I may be able to help with the second question
I have a pdf document which I can email direct if you want
Let me know
John






================================================================================








John, your server bounces me back as spammer!!!! I have an e-mail about this subject.

Please read the following :

>> Hi John,
>>
>> I have followed all instructions (that are very clear, Tnx a lot), but after Grub installation, I re-booted the laptop, but It didn't start from USB removable device!!! and is supports it (As from BIOS and from manual: never tried to start by USB devices before this installation)
>> I unplugged also the USB drive lead and re-plugged while booting.No way of USB booting.
>> Any suggestion??
>> This afternoon I will plug the USB disk to another PC to see what happens.Please note that my USB disk is an EIDE disk inside an EIDE to USB metallic box.
>>
>> Cheers
>>
>> >
> Hi Antonio
>
> First question did you get a grub> prompt ??
>
> I am assuming NOT !
>
> This next bit is going to be added to the pdf doc sometime!!!!
> >
I followed your paper (the only difference was different order of sda for /boot(sda1), /(sda2), swap (sda3), but I changed related references): and I arrived very smoothly to exit instruction at end of point 3.3.5, but I couldn't reboot. I also re-plugged the USB disk during boot but no way (see 3.3.6)


> Its not ideal but should get you up and booted on the USB without
> touching any other disk. It will also help to test if all is well on
> the USB disk
> This does assume you have access to a Linux box to write a floppy and/or
> a CD
> ##################################33
> I have an Icybox USB2/SATA to PATA box with an old IDE disk in it which
> works fine, so that is probably not a problem
> ######################################
> If you have a floppy drive on your machine you can use it to boot grub.
> >
No floppy available


> I attach a floppy image that you can write to a blank
> floppy as follows
> dd of=/dev/fd0 if=fd0_grub.img
> Then set the BIOS to boot from floppy
> You should then get a raw grub prompt to type in
> something like
> grub>kernel (hdx,y)/vmlinuz.. ro root=/dev/hdpq
> grub>initrd (hdx,y)/initrd... (the original one not the USB )
> grub>boot
>
> Obviously you should also be able to see if the initrd_usb.gz is there
> etc
> ###############################
> If your machine has no floppy then I also attach a raw bootable ISO CD
> image. It has nothing on it except an image of the floppy.
> It should boot OK and give the grub> prompt just as the floppy.
> I used xcdroast to write the image.iso file to CD
>
> Also tested out direct use of cdrecord
> cdrecord -scanbus
> will show cd/dvd devices
>
> cdrecord dev=ATAPI:1,0,0 speed=8 image.iso
> ATAPI: may not be necessary depending how your cd/dvd is treated
> 1,0,0 to match the output of -scanbus above
> No problems
>
> When booting from CD BIOS understanding of the disks
> and that of Linux may not be the same as booting from USB !!!
> Finding how grub sees the devices is easy
> kernel (hdTAB etc
>
> The value needed by root=/dev/sdXX may require trial
> and error !!!!
> >
If I succeed to start interactively by CD, if I write a /boot/grub/grub.conf, should I be able to start up by same CD???
I suppose that if I connect same USB disk to another laptop, chances of insuccess are great....what do you think???






Hi Antonio You would have to regenerate the CD with a fixed grub.conf which is not that clever. The generation of the CD is relatively easy but unless anyone knows different then there is no flexibility.

I would not give up on the booting from USB disk yet !!!!
What does it actually do ????
1. Boot from other disk
2. Not boot at all
3. Give a grub> prompt 4. ...


Let me know
######################################
Try the CD if you can

Try another laptop/desktop machine with and without CD
######################################
I'm still not 100% sure you have grub things written
to the USB MBR

Other questions
a.  Will the USB disk mount when plugged into a running Linux machine
b If so are /boot and /boot/grub directories correct?
######################################
With the USB disk plugged into a working Linux machine

You could try (very carefully) as root
cd
dd if=/dev/sd??? of=usb_first_446.dd bs=446 count=1

where /dev/sd??? is your USB disk
This reads the first 446 bytes from the disk to a file
if=xxx stands for input file, of=yyy stands for output file
bs=block size,  count=No of blocks

There are no "-" signs in front of the command line "options" !
It is then possible to tell if grub things are there !!!!
Be VERY CAREFUL with dd  getting it wrong could write nasty things to
the MBR on your other disk!!!!!
Send me the usb_first_446.dd file or the result of
od -bc usb_first_446.dd

If this file looks like it has grub type things in it
then I think your BIOS is not doing things correctly.

Lots of things to try !!!!
Good luck - again !!!!

john





Hello

mad esome tests.

1) created CD from your iso. Booted with grub commands using initrd=(hd1,0)/initrd_usb.gz
and Fedora started.


Now I attach the usb_first_446.dd file, as We all have doubt that grub is installed on USB disk.
Tnx for your super-help!!!


--
Antonio
=============================================================
Mail by Thunderbird 1.0.2 - Websurfing by Firefox 1.0.2
=============================================================
Posta con Thunderbird 1.0.2 - Navigazione con Firefox 1.0.2 =============================================================
       Linux user number 362582
 	http://www.montagnani.org
=============================================================




-- Antonio ============================================================= Mail by Thunderbird 1.0.2 - Websurfing by Firefox 1.0.2 ============================================================= Posta con Thunderbird 1.0.2 - Navigazione con Firefox 1.0.2 ============================================================= Linux user number 362582 http://www.montagnani.org =============================================================

Attachment: usb_first_446.dd
Description: Binary data


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux