PDA

Bekijk de volledige versie : Unplug ext harddrive without spinning down?



patrickquek
12-03-2007, 04:33
Hi,

I'm a little confused over this topic and would appreciate some clarifications.

When I connect an external harddrive to the 500gP, is it plug-and-play? Which means:
1. Plug in - Do i need to execute any commands/steps to mount the harddrive?
2. Plug out - Do i need to spin down, flush etc before I unplug the harddrive?

My 500gP and cable modem is connected to a timer which switches on/off at different periods during the day. I would like to know if the auto-off when the harddisk is in use would cause any problems?

Likewise, is the behaviour the same for the 700gE with the internal harddisk?

I read the threads about spinning down the harddisk. Is that more for power-saving reasons or is that mandatory for some purposes?

Any clarifications would be most appreciated.

cheers!
Patrick

patrickquek
12-03-2007, 11:02
Hi all,

From what i could gather so far, before unplugging the USB external harddrive, you MUST unmount by using a PC to go to "Status & Log -> External USB disk -> Eject".

1) That means I MUST have a PC to perform this before i can unplug a USB drive??? This sounds terrible. Or did i misunderstand it?

The other scenario i am not clear about:

What if i just want to shutdown the router, leaving the External USB disk plugged in.

2) Can i just power off? I read from one of Oleg's post that you can hold the reset button for 5 seconds to halt the router.

From what I know, there are no hardware buttons available on the 500gP (unlike the 700gE) to unmount the harddrive.

3) Can someone confirm this?

Thank you very much!

Patrick

wirespot
12-03-2007, 12:49
For it to be plug and play you'd need additional functionality, such as udev or supermount etc. I don't think any of those are installed. The closest you come to "plug and play" is that the 500gP will recognize the external HDD as part of the bootup procedure and mount it under /tmp/harddisk. But not on the fly.

So if you want it mounted without extra intervention, just plug it in and power-cycle the router. Provided the firmware bootup procedure is clever enough, it will be mounted.

Unplug is a more delicate matter. Technically you need to flush buffers to disk and then umount the drive. That's what the web interface eject does. However, if you absolutely need to grab the HDD and run with it, it depends on what filesystem you have on it. ext3 is journalized and will whitstand the procedure quite well (the journal will be recovered upon the next mount and everything will most likely be OK). For FAT it's likely you may lose files that were open or leave directories in unpredictable states. The "sync" mount option may help here, but it may also slow down access to the partition drastically. Run "mount" without parameters in the web interface console or via telnet and see what comes out (with the HDD with FAT partition plugged in).

For the 2nd scenario: I'm not sure how the 500gP can be persuaded to perform a clean shutdown, other than from the command line. During a shutdown all discs are unmounted and flushed. If you simply poweroff the device by cutting the power supply it's pretty much the same as yanking the USB cord out. I suspect the 700 has a journalized partition on the internal HDD, or takes some steps to protect the data on the partition somehow.

The spinning down is either for the sake of powersaving, or to eliminate the high-pitch whine of some USB HDD's.

patrickquek
12-03-2007, 17:53
For it to be plug and play you'd need additional functionality, such as udev or supermount etc. I don't think any of those are installed. The closest you come to "plug and play" is that the 500gP will recognize the external HDD as part of the bootup procedure and mount it under /tmp/harddisk. But not on the fly.

So if you want it mounted without extra intervention, just plug it in and power-cycle the router. Provided the firmware bootup procedure is clever enough, it will be mounted.


Thanks. So are the existing firmware (eg. Oleg) has the 'smart' bootup procedures to be able to do this?



For the 2nd scenario: I'm not sure how the 500gP can be persuaded to perform a clean shutdown, other than from the command line. During a shutdown all discs are unmounted and flushed. If you simply poweroff the device by cutting the power supply it's pretty much the same as yanking the USB cord out. I suspect the 700 has a journalized partition on the internal HDD, or takes some steps to protect the data on the partition somehow.

The spinning down is either for the sake of powersaving, or to eliminate the high-pitch whine of some USB HDD's.

Does that mean that for the 700, i can pull out the power cable safely without screwing up something big time?

If that's the case, then its a big plus to get the 700 for me. I can't imagine having to perform a delicate shutdown each time. Seems high fragile. The 700 has a 'power' button at the front which i believes shuts down the harddisk for a safe poweroff?

pash
27-04-2007, 11:39
Run "mount" without parameters in the web interface console or via telnet and see what comes out (with the HDD with FAT partition plugged in).


Does anybody tested this? So, is the usb-Harddrive in the 500gP mounted via SYNC Option? (Then it would be hot-plugout and slower)

With NTFS there should be no Problem cause it's read-only.