Skip to contentSkip to conversation

Raid on USB flash disk

DISCUSSION Arne Jansen 3 participants 3 messages Feb 10, 2007 – Mar 5, 2007 MD RAID

lore
Share & tools
lore
#0 lore raw

Hi,

I just tried to setup a one-device raid onto an USB flash drive. Creating, setting up ext3 and filling with data was no problem. But when I tried to work with it afterwards the metadevice was unresponsive. I tried both linear and raid0 levels, but that made no difference.
For my uneducated eye it looks like something is deadlocking if md tries to read from the device.

I'm using kernel 2.6.18 (gentoo) on a VIA EPIA CN10000 mainboard with a 2GB USB flash drive (extreme). Please ask if I should provide more information like dmesg or lspci.

The main reason why I'm trying this weird setup is that the USB drive is always enumerated last in my kernel, and I want to boot from it. That means every time I add a disk or remove one I have to edit grub.conf and fstab. Very inconvenient. So my idea was to create a single device md on it and leave it to the autodetection to find the device. So I never have to edit /etc/fstab again for a simple hardware change and I'm independent of any enumeration changes in future kernel releases.

But unfortunately it doesn't work :-(

Any help appreciated.

--Arne

#1 lore raw
Quoted 11 lines · Arne Jansen

The main reason why I'm trying this weird setup is that the USB drive is always enumerated last in my kernel, and I want to boot from it. That means every time I add a disk or remove one I have to edit grub.conf and fstab. Very inconvenient. So my idea was to create a single device md on it and leave it to the autodetection to find the device. So I never have to edit /etc/fstab again for a simple hardware change and I'm independent of any enumeration changes in future kernel releases.

But unfortunately it doesn't work :-(

Sorry not to answer your main question but why not use labels in your USB device partitions and use the labels in your fstab. This will make it so it doesn't matter which dev file it uses.

Steve

#2 lore raw
In reply to Arne Jansen
Quoted 25 lines

Hi,

I just tried to setup a one-device raid onto an USB flash drive. Creating, setting up ext3 and filling with data was no problem. But when I tried to work with it afterwards the metadevice was unresponsive. I tried both linear and raid0 levels, but that made no difference.
For my uneducated eye it looks like something is deadlocking if md tries to read from the device.

I'm using kernel 2.6.18 (gentoo) on a VIA EPIA CN10000 mainboard with a 2GB USB flash drive (extreme). Please ask if I should provide more information like dmesg or lspci.

The main reason why I'm trying this weird setup is that the USB drive is always enumerated last in my kernel, and I want to boot from it. That means every time I add a disk or remove one I have to edit grub.conf and fstab. Very inconvenient. So my idea was to create a single device md on it and leave it to the autodetection to find the device. So I never have to edit /etc/fstab again for a simple hardware change and I'm independent of any enumeration changes in future kernel releases.

But unfortunately it doesn't work :-(

Quoted 8 lines

Any help appreciated.

--Arne
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

I believe you could use udev persistant names (eg /dev/dsk/by-name) to refer to your USB partitions, instead of /dev/sd?, etc.