On Mon, 30 May 2011, Itay wrote:

I'd like to set up a USB drive using LVM. Could someone knowledgable confirm that the following recipe should allow me to hot-plug the USB drive without rendering the LVM file-systems inaccessible?

The recipe has a problem in the vgcreate step (below,
marked with '***********').
The physical volume is not listed in /dev/disk/by-uuid/...

Can someone suggest how to fix the recipe, or suggest a different workflow for working with lvm on hot-pluggable USBs?

Recipe follows:

Set up:
#  (Actual number of partitions, etc., is not important here.)

# Assume attached disk is /dev/sdc and it has an extended partition #+ that covers that whole disk.

#  Prepare partitions for LVM (say, 2 partitions)
        $ parted /dev/sdc mkpart logical START1 END1
        $ parted /dev/sdc mkpart logical START2 END2
#  Create Physical Volumes
        $ pvcreate /dev/sdc1
        $ pvcreate /dev/sdc2
#  Identify the Physical Volumes' UUIDs
        $ blkid
#  Create Volume Groups using  PVs **UUIDs**
***********'
        $ vgcreate [options] myVG /dev/disk/by-uuid/UUID-OF-PART-1
***********'
        $ vgexted  [options] myVG /dev/disk/by-uuid/UUID-OF-PART-2
# From this point I can "forget" that I deal with a USB drive, and #+ continue the set up as with built in drives; right?

[snip]

Thanks,
Itay


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/alpine.deb.2.00.1106021024350.5...@frodo1.weizmann.ac.il

Reply via email to