Re: lvm on an external enclosure?
In <4a6380d4.5030...@cox.net>, Ron Johnson wrote: >On 2009-03-20 16:04, Boyd Stephen Smith Jr. wrote: >> On Friday 20 March 2009 09:02:24 Ron Johnson wrote: >>> 2. More importantly, what about when I power up the external >>> enclosure, after Linux is already running? Will lvm automagically >>> recognize the new drives as part of their own vg? Or will I have to >>> bounce lvm? >> >> You *may* have to run 'vgscan && vgchange -ay', but that should be >> enough. > >Well, that didn't work... > >If I umount the fs, then power-down the enclosure, That's your problem. Since you've got a VG on the disk, it is not the FS that is using it (directly), but LVM. You need to deactivate the VG before you power-down the enclosure. vgchange $VG -an. -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/\_/ signature.asc Description: This is a digitally signed message part.
Re: lvm on an external enclosure? [SOLVED]
On 2009-07-19 23:04, Ron Johnson wrote: On 2009-07-19 22:27, Celejar wrote: On Sun, 19 Jul 2009 22:18:02 -0500 Ron Johnson wrote: ... I use lvm on an external USB disk, and I also get those messages ('read failed after 0 of 4096') when the disk goes offline and then returns. What seems to work for me is '/etc/init.d/lvm2 stop' followed by '/etc/init.d/lvm2 start'. I thought of that, but what about internal LVs? Wouldn't you have to first umount them? I currently only use lvm on my external disk, so I don't have to worry about that. But I assumed that even if one did, it would still be better, if not quite as simple, to do that, than to reboot. True, true. Especially since my internal LV doesn't have anything vital like /usr on it. https://www.redhat.com/archives/linux-lvm/2009-July/msg00035.html # umount -v /some/mount/point # vgchange -an some_dynamic_vg pull USB cable wait a few minutes insert USB cable # vgchange -ay some_dynamic_vg # mount -v /some/mount/point -- Scooty Puff, Sr The Doom-Bringer -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: lvm on an external enclosure?
On 2009-07-19 22:27, Celejar wrote: On Sun, 19 Jul 2009 22:18:02 -0500 Ron Johnson wrote: ... I use lvm on an external USB disk, and I also get those messages ('read failed after 0 of 4096') when the disk goes offline and then returns. What seems to work for me is '/etc/init.d/lvm2 stop' followed by '/etc/init.d/lvm2 start'. I thought of that, but what about internal LVs? Wouldn't you have to first umount them? I currently only use lvm on my external disk, so I don't have to worry about that. But I assumed that even if one did, it would still be better, if not quite as simple, to do that, than to reboot. True, true. Especially since my internal LV doesn't have anything vital like /usr on it. -- Scooty Puff, Sr The Doom-Bringer -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: lvm on an external enclosure?
On Sun, 19 Jul 2009 22:18:02 -0500 Ron Johnson wrote: ... > > I use lvm on an external USB disk, and I also get those messages ('read > > failed after 0 of 4096') when the disk goes offline and then returns. > > What seems to work for me is '/etc/init.d/lvm2 stop' followed by > > '/etc/init.d/lvm2 start'. > > I thought of that, but what about internal LVs? Wouldn't you have > to first umount them? I currently only use lvm on my external disk, so I don't have to worry about that. But I assumed that even if one did, it would still be better, if not quite as simple, to do that, than to reboot. Celejar -- mailmin.sourceforge.net - remote access via secure (OpenPGP) email ssuds.sourceforge.net - A Simple Sudoku Solver and Generator -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: lvm on an external enclosure?
On 2009-07-19 21:25, Celejar wrote: On Sun, 19 Jul 2009 15:23:48 -0500 Ron Johnson wrote: ... Well, that didn't work... If I umount the fs, then power-down the enclosure, and power it back up, these are the results: # vgscan WARNING: Ignoring duplicate config node: filter (seeking filter) Reading all physical volumes. This may take a while... /dev/dm-1: read failed after 0 of 4096 at 2000380952576: Input/output error /dev/dm-1: read failed after 0 of 4096 at 2000381009920: Input/output error /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error /dev/dm-1: read failed after 0 of 4096 at 4096: Input/output error /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error Found volume group "backup_vg" using metadata type lvm2 Found volume group "main_huge_vg" using metadata type lvm2 # vgchange -a y backup_vg WARNING: Ignoring duplicate config node: filter (seeking filter) /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error 1 logical volume(s) in volume group "backup_vg" now active # mount -v /mnt/backups mount: wrong fs type, bad option, bad superblock on /dev/mapper/backup_vg-backup_lv, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so [28515.817160] EXT4-fs: unable to read superblock [28515.817343] EXT3-fs: unable to read superblock [28722.859373] EXT4-fs: unable to read superblock [28722.859458] EXT3-fs: unable to read superblock Reboot and it works fine. I use lvm on an external USB disk, and I also get those messages ('read failed after 0 of 4096') when the disk goes offline and then returns. What seems to work for me is '/etc/init.d/lvm2 stop' followed by '/etc/init.d/lvm2 start'. I thought of that, but what about internal LVs? Wouldn't you have to first umount them? -- Scooty Puff, Sr The Doom-Bringer -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: lvm on an external enclosure?
On Sun, 19 Jul 2009 15:23:48 -0500 Ron Johnson wrote: ... > Well, that didn't work... > > If I umount the fs, then power-down the enclosure, and power it back > up, these are the results: > > # vgscan >WARNING: Ignoring duplicate config node: filter (seeking filter) >Reading all physical volumes. This may take a while... >/dev/dm-1: read failed after 0 of 4096 at 2000380952576: > Input/output error >/dev/dm-1: read failed after 0 of 4096 at 2000381009920: > Input/output error >/dev/dm-1: read failed after 0 of 4096 at 0: Input/output error >/dev/dm-1: read failed after 0 of 4096 at 4096: Input/output error >/dev/dm-1: read failed after 0 of 4096 at 0: Input/output error >Found volume group "backup_vg" using metadata type lvm2 >Found volume group "main_huge_vg" using metadata type lvm2 > > # vgchange -a y backup_vg >WARNING: Ignoring duplicate config node: filter (seeking filter) >/dev/dm-1: read failed after 0 of 4096 at 0: Input/output error >1 logical volume(s) in volume group "backup_vg" now active > > # mount -v /mnt/backups > mount: wrong fs type, bad option, bad superblock on > /dev/mapper/backup_vg-backup_lv, > missing codepage or helper program, or other error > In some cases useful info is found in syslog - try > dmesg | tail or so > > > [28515.817160] EXT4-fs: unable to read superblock > [28515.817343] EXT3-fs: unable to read superblock > [28722.859373] EXT4-fs: unable to read superblock > [28722.859458] EXT3-fs: unable to read superblock > > Reboot and it works fine. I use lvm on an external USB disk, and I also get those messages ('read failed after 0 of 4096') when the disk goes offline and then returns. What seems to work for me is '/etc/init.d/lvm2 stop' followed by '/etc/init.d/lvm2 start'. Celejar -- mailmin.sourceforge.net - remote access via secure (OpenPGP) email ssuds.sourceforge.net - A Simple Sudoku Solver and Generator -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: lvm on an external enclosure?
On 2009-03-20 16:04, Boyd Stephen Smith Jr. wrote: On Friday 20 March 2009 09:02:24 Ron Johnson wrote: 1. What kind of problems or issues might I have when trying to boot and lvm doesn't see a vg? I'm guessing Linux will squawk and continue booting. Probably won't even squawk. IIRC, scanning for VGs is done during the boot process as long as you have LVM installed, whether you are using it or not. 2. More importantly, what about when I power up the external enclosure, after Linux is already running? Will lvm automagically recognize the new drives as part of their own vg? Or will I have to bounce lvm? You *may* have to run 'vgscan && vgchange -ay', but that should be enough. Well, that didn't work... If I umount the fs, then power-down the enclosure, and power it back up, these are the results: # vgscan WARNING: Ignoring duplicate config node: filter (seeking filter) Reading all physical volumes. This may take a while... /dev/dm-1: read failed after 0 of 4096 at 2000380952576: Input/output error /dev/dm-1: read failed after 0 of 4096 at 2000381009920: Input/output error /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error /dev/dm-1: read failed after 0 of 4096 at 4096: Input/output error /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error Found volume group "backup_vg" using metadata type lvm2 Found volume group "main_huge_vg" using metadata type lvm2 # vgchange -a y backup_vg WARNING: Ignoring duplicate config node: filter (seeking filter) /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error 1 logical volume(s) in volume group "backup_vg" now active # mount -v /mnt/backups mount: wrong fs type, bad option, bad superblock on /dev/mapper/backup_vg-backup_lv, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so [28515.817160] EXT4-fs: unable to read superblock [28515.817343] EXT3-fs: unable to read superblock [28722.859373] EXT4-fs: unable to read superblock [28722.859458] EXT3-fs: unable to read superblock Reboot and it works fine. Failing that, you might have to modify your lvm.conf, but that's only if lvm is, for some reason, not scanning those block devices for PV metadata. -- Scooty Puff, Sr The Doom-Bringer -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: lvm on an external enclosure?
On Fri, Mar 20, 2009 at 2:04 PM, Boyd Stephen Smith Jr. wrote: > You *may* have to run 'vgscan && vgchange -ay', but that should be enough. I would imagine that one could probably somewhat automated with udev. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: lvm on an external enclosure?
On Friday 20 March 2009 16:25:03 Ron Johnson wrote: >On 2009-03-20 16:04, Boyd Stephen Smith Jr. wrote: >> On Friday 20 March 2009 09:02:24 Ron Johnson wrote: >>> 1. What kind of problems or issues might I have when trying to boot >>> and lvm doesn't see a vg? I'm guessing Linux will squawk and >>> continue booting. >> Probably won't even squawk. >But won't there be references to the non-existent vg in /etc/lvm >that Debian uses during boot? They will simply be ignored. /etc/lvm isn't like an /etc/raidtab or /etc/inittab or /etc/fstab. LVM doesn't really have a daemon component. The commands read /etc/lvm (or rather, files in that directory) when they are run to adjust their behavior, but they ignore anything that's not applicable to what they are currently doing. Since the boot process doesn't perform operations on specific VGs, anything affecting a VG that isn't found will be ignored. (IIRC, the initrd does active a VG by name, but that's only when the root= option on the kernel command-line refers to one directly.) -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/\_/ signature.asc Description: This is a digitally signed message part.
Re: lvm on an external enclosure?
On 2009-03-20 16:04, Boyd Stephen Smith Jr. wrote: On Friday 20 March 2009 09:02:24 Ron Johnson wrote: 1. What kind of problems or issues might I have when trying to boot and lvm doesn't see a vg? I'm guessing Linux will squawk and continue booting. Probably won't even squawk. IIRC, scanning for VGs is done during the boot process as long as you have LVM installed, whether you are using it or not. But won't there be references to the non-existent vg in /etc/lvm that Debian uses during boot? 2. More importantly, what about when I power up the external enclosure, after Linux is already running? Will lvm automagically recognize the new drives as part of their own vg? Or will I have to bounce lvm? You *may* have to run 'vgscan && vgchange -ay', but that should be enough. Failing that, you might have to modify your lvm.conf, but that's only if lvm is, for some reason, not scanning those block devices for PV metadata. Good enough... Thanks. -- Ron Johnson, Jr. Jefferson LA USA "Freedom is not a license for anarchy." -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: lvm on an external enclosure?
On Friday 20 March 2009 09:02:24 Ron Johnson wrote: >1. What kind of problems or issues might I have when trying to boot >and lvm doesn't see a vg? I'm guessing Linux will squawk and >continue booting. Probably won't even squawk. IIRC, scanning for VGs is done during the boot process as long as you have LVM installed, whether you are using it or not. >2. More importantly, what about when I power up the external >enclosure, after Linux is already running? Will lvm automagically >recognize the new drives as part of their own vg? Or will I have to >bounce lvm? You *may* have to run 'vgscan && vgchange -ay', but that should be enough. Failing that, you might have to modify your lvm.conf, but that's only if lvm is, for some reason, not scanning those block devices for PV metadata. -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/\_/ signature.asc Description: This is a digitally signed message part.
lvm on an external enclosure?
Hi, (I tried Googling this, but my Google-fu must be lacking.) I want to put 2 1TB drives in an external enclosure, lvm them together and use them as a backup devices. Two questions: 1. What kind of problems or issues might I have when trying to boot and lvm doesn't see a vg? I'm guessing Linux will squawk and continue booting. 2. More importantly, what about when I power up the external enclosure, after Linux is already running? Will lvm automagically recognize the new drives as part of their own vg? Or will I have to bounce lvm? TIA -- Ron Johnson, Jr. Jefferson LA USA "Freedom is not a license for anarchy." -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org