Page 1 of 1

Swapping Identical External USB Discs

Posted: 24 Feb 2014 10:40
by cpcnw
Hi All,

I have N4F setup and working fine. I have 2 x 2TB Ext USB drives as 'backup' drives and use custom incremental rsync scripts to pull data across overnight.

The problem is this ;

Once a week the staff power down the NAS, swap the ExtUSB drives and power up. Whilst everything else about the external drives is identical, the serial number isnt and the mount tool / info shows a problem. I then have to manually remove the info relating to the 'other' disc and redo for the current one.

Is there any way round this situ?

Thanks!

Re: Swapping Identical External USB Discs

Posted: 25 Feb 2014 05:17
by chrisf4lc0n
If it is external, do they change the whole disk with the enclosure? What I found with my external disks it only recognizes the enclosure type and not what is inside... Try replacing the disks inside enclosures.

Re: Swapping Identical External USB Discs

Posted: 25 Feb 2014 08:51
by cpcnw
Thanks for the reply Chris.

The discs are in external enclosures. Both discs are same make / model. Both ext USB enclosures are same make / model.

The GUI / Disc Detection is good enough to ID the manufacturers serial number from the chipset on each hard disc.

From what I am reading on these fine threads is that N4F was never designed to have discs constantly swapped in the manner you would tapes in / out of a tape drive.

When I get on site I am going to try just swapping discs, ignoring the message and adding the next disc followed by a reboot and disc swap. If the config can live / survive a reboot with a 'faulty entry' then I am hoping that will work?

Any other comments appreciated :)

Re: Swapping Identical External USB Discs

Posted: 25 Feb 2014 22:59
by cpcnw
Nope. Disk management give me a red card!

Only option is to manually clear and import replaced disc!

Unless you know better?

Re: Swapping Identical External USB Discs

Posted: 26 Feb 2014 09:16
by crest
cpcnw wrote:Nope. Disk management give me a red card!

Only option is to manually clear and import replaced disc!

Unless you know better?
Since I use USB discs regularely for backup purposes I created an automount script which currently detects and supports ufs, ext2fs, ntfs and msdosfs automatically (only one partition per drive). With that it is not necessary to configure USB drives in DISKS | MANAGEMENT, also the mountpoints are created automatically. In the WebGUI you can see these USB drives with some modifications I made -> see topic viewtopic.php?f=56&t=3797.

If you want you can test the script, before it would be good if you provide me some informations about your system (N4F version, platform and devices which are used for your USB drives/enclosures from DISKS | MANAGEMENT ) to see, if my script can handle the used hardware.

Regards
crest

Re: Swapping Identical External USB Discs

Posted: 26 Feb 2014 10:01
by cpcnw
Hi Crest,

Thanks for the reply. I would be interested to see the automount script and am less concerned about whats reflected in the 'info' pages as long as the mount script and my backup works :)

I would also prefer not to mod 'embeded' unless absolutely neccy to do this.

In fact I have two N4F with the same issue - the first is using USB External 2TB Drives and the second is using a Startech Internal 2.5" drive bay with laptop drives in caddies ~ but the issue is the same with both i.e. we have traditionally swapped discs and put them in the fireproof safe overnight. Now I have moved to N4F from Linux I need to be able to do the same thing.

On the NAS ref in my first question;

9.1.0.1 - Sandstorm rev 247 (will upgrade when I get chance:)
da0 1907730MB 2 TB Disc for Storage ST2000DM001-9YN164

I'm using 9.2.0.1 - Shigawire (revision 943) on the 2nd box and this drive bay with 500GB seagate 2.5" discs

http://www.startech.com/HDD/Mobile-Rack ... T2510U2REM

Thanks!

Re: Swapping Identical External USB Discs

Posted: 27 Feb 2014 08:51
by crest
cpcnw wrote: Thanks for the reply. I would be interested to see the automount script and am less concerned about whats reflected in the 'info' pages as long as the mount script and my backup works :)

I would also prefer not to mod 'embeded' unless absolutely neccy to do this.
No problem, you can use the script standalone. In my case I wanted to see the mounted USB drives in the index to see the available space, spinning state etc and also to unmount/remount these drives via the WebGUI ...
Here you can download the script -> https://dl.dropboxusercontent.com/u/365 ... unt_usb.sh
I use currently 9.1.0.1 - Sandstorm (revision 847) and up to this revision it worked very well, don't know how it works under 9.2.0.1 - Shigawire ...

usage: automount.sh [umount | rmount | amount]
A call without parameters mounts all pluged USB drives, with the parameter
- umount = unmounts all USB drives
- rmount = re-mounts all USB drives
- amount = unmounts all drives except USB drives
These parameters I use from my modified WebGUI but of course you can use it on the cli too ...

One note: the script requires a file in the USB drives root directory to create a specific mountpoint name - I use the naming convention USBxxxx.mounted where xxxx is my numbering scheme. But this is up to you as long as the file extension is *.mounted. So the best would be to create a file on each USB drive (e.g. touch xxxx.mounted). Put the automount script in a postinit command (I use a cron job to check each minute if a USB drive is pluged in and if yes, it will be mounted automatically) without parameters so that it can mount the USB drives at startup time, that's it. After that you can remove all definitions in DISK | MANAGEMENT and MOUNTPOINTS regarding the USB drives.