Re: [gentoo-user] Migrating RAID: Degraded RAID5 from RAID1?

2009-11-27 Thread andrey larin
let suppose
sda and sdb is raid 1 md1
and new sdc
remove sdb from raid
mdadm /dev/md1 -f /dev/sdb
mdadm /dev/md1 -r /dev/sdb
then create degraded raid 5
don't forget md1 is still running
mdadm --create /dev/md2 --level 5 -n 3 /dev/sdb /dev/sdc missing
then copy all data from md1  to md2
fix /etc/fstab and /boot/grub/grub.conf
destroy md1
and add sda to md2


2009/11/28 Dan Cowsill danthe...@gmail.com

 Hello list,

 Currently I have two terabyte hard disks in a RAID1 configuration
 using software RAID.  What I'd like to do is add a third disk and
 arrive at the end with a RAID5 array.  The problem is I have limited
 disk space and not enough room to back up all of the data on the array
 in its current form.  What I'd like to know is if it is possible to
 use two disks to make a degraded RAID5 array, move the data onto it
 from one of the mirror disks, and then add the mirrored disk into the
 new array?

 Thanks,
 D




-- 
Ларин Андрей

тел 89093090949


Re: [gentoo-user] serio / atkbd / PS/2 Strangeness with Serial port adapter

2009-08-05 Thread andrey larin
long time ago
i was have history with some scanner that didn't work standalone in ps/2
keyboard port
ther is must be a keyboard so it to work
so the scanner was reflashed for working in usual serial com port
2009/8/5 Matt Causey matt.cau...@gmail.com

 Hello!

 Apologies if this really is't the right forum (suggestions on the
 right forum would be welcome).

 Our company presently operates a large number of thin client terminals
 running LTSP, with a shared NFS root filesystem, and all that stuff.
 To remove the external runtime dependencies from the image, I've built
 a gentoo ramdisk that contains all the tools needed for the terminals
 - which can be downloaded via tftp.

 Things are working well - except for one problem.  One the new image,
 some of the input devices don't work we expected.  As you might
 imagine in a production environment, we have a number of different
 barcode scanners that attach to these terminals.  Many of the new ones
 are USB HID compliant devices - which is great.  Most of them are
 actually serial port devices, that connect to the terminal via a
 serial -- PS/2 'wedge'.  The PS/2 wedge devices are the ones that
 don't work correctly.

 If we connect the scanner to the thin client, and boot the image, the
 scanner does not work.  It does not show up at all as an input device:

 blablahostname / # cat /proc/bus/input/devices
 I: Bus=0003 Vendor=046d Product=c001 Version=0110
 N: Name=Logitech USB Mouse
 P: Phys=usb-:00:03.0-1/input0
 S: Sysfs=/devices/pci:00/:00:03.0/usb2/2-1/2-1:1.0/input/input0
 U: Uniq=
 H: Handlers=mouse0 event0
 B: EV=17
 B: KEY=7 0 0 0 0 0 0 0 0
 B: REL=103
 B: MSC=10

 I: Bus=0003 Vendor=03f0 Product=0024 Version=0110
 N: Name=CHICONY HP Basic USB Keyboard
 P: Phys=usb-:00:03.1-2/input0
 S: Sysfs=/devices/pci:00/:00:03.1/usb3/3-2/3-2:1.0/input/input1
 U: Uniq=
 H: Handlers=kbd event1
 B: EV=120013
 B: KEY=1 7 ff9f207a c14057ff febeffdf ffef  fffe
 B: MSC=10
 B: LED=7

 I: Bus=0010 Vendor=001f Product=0001 Version=0100
 N: Name=PC Speaker
 P: Phys=isa0061/input0
 S: Sysfs=/devices/platform/pcspkr/input/input2
 U: Uniq=
 H: Handlers=kbd event2
 B: EV=40001
 B: SND=6

 So, I enabled debugging on the contoller driver(serio.c), and I see
 that the device generates noise when connected:

 [  458.875614] drivers/input/serio/i8042.c: f2 - i8042 (kbd-data) [444989]
 [  458.908119] drivers/input/serio/i8042.c: fe - i8042 (interrupt, 0,
 1, timeout) [445022]
 [  458.908144] drivers/input/serio/i8042.c: ed - i8042 (kbd-data) [445022]
 [  458.940151] drivers/input/serio/i8042.c: fe - i8042 (interrupt, 0,
 1, timeout) [445054]
 [  458.940225] drivers/input/serio/i8042.c: d4 - i8042 (command) [445054]
 [  458.940234] drivers/input/serio/i8042.c: f2 - i8042 (parameter)
 [445054]
 [  458.972190] drivers/input/serio/i8042.c: fe - i8042 (interrupt, 1,
 12, timeout) [445086]
 [  458.972204] drivers/input/serio/i8042.c: d4 - i8042 (command) [445086]
 [  458.972212] drivers/input/serio/i8042.c: ed - i8042 (parameter)
 [445086]
 [  459.004227] drivers/input/serio/i8042.c: fe - i8042 (interrupt, 1,
 12, timeout) [445118]
 [20171.684870] drivers/input/serio/i8042.c: 0b - i8042 (interrupt, 0,
 1) [20162195]

 However - the atkbd driver does not pick the device up at all.

 So, I did find a workaround (which is NOT acceptable for this
 deployment).  Remember the PS/2 'wedge' I mentioned?  Well, it has an
 extra PS/2 port for your keyboard.  If I connect a PS/2 keyboard to
 that thing, suddenly my scanner starts working.

 We see some chatter from the controller driver, then one of these:

 [23811.805578] input: AT Translated Set 2 keyboard as
 /devices/platform/i8042/serio0/input/input6

 Aaaand a new device is registered as an input device:

 yayayayhostname# cat /proc/bus/input/devices
 I: Bus=0003 Vendor=046d Product=c001 Version=0110
 N: Name=Logitech USB Mouse
 P: Phys=usb-:00:03.0-1/input0
 S: Sysfs=/devices/pci:00/:00:03.0/usb2/2-1/2-1:1.0/input/input0
 U: Uniq=
 H: Handlers=mouse0 event0
 B: EV=17
 B: KEY=7 0 0 0 0 0 0 0 0
 B: REL=103
 B: MSC=10

 I: Bus=0003 Vendor=03f0 Product=0024 Version=0110
 N: Name=CHICONY HP Basic USB Keyboard
 P: Phys=usb-:00:03.1-2/input0
 S: Sysfs=/devices/pci:00/:00:03.1/usb3/3-2/3-2:1.0/input/input1
 U: Uniq=
 H: Handlers=kbd event1
 B: EV=120013
 B: KEY=1 7 ff9f207a c14057ff febeffdf ffef  fffe
 B: MSC=10
 B: LED=7

 I: Bus=0010 Vendor=001f Product=0001 Version=0100
 N: Name=PC Speaker
 P: Phys=isa0061/input0
 S: Sysfs=/devices/platform/pcspkr/input/input2
 U: Uniq=
 H: Handlers=kbd event2
 B: EV=40001
 B: SND=6

 I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
 N: Name=AT Translated Set 2 keyboard
 P: Phys=isa0060/serio0/input0
 S: Sysfs=/devices/platform/i8042/serio0/input/input6
 U: Uniq=
 H: Handlers=kbd event3
 B: EV=120013
 B: KEY=4 200 3803078 f800d001 fedf ffef  fffe
 B: MSC=10
 B: LED=7

 So, I don't get it.  We