Weblog entry #13 for Grimnar
Why did I go for WD or USB 2.0 and not other brands and network storage is not the issue here.
But what kind of file system is preferred to have on such disks? I would really like a filesystem that *all* OS can write on, and not only linux. The disk will be used for a secondary backup for all my photos. And when I have the system up and running I'm hoping for a rsync line wich updates the files every day or something like that, in order to keep it 100% mirrored without me bothering with it. So, How do I mount it, and what FS to use?
Edit Are there any precautions I need to understand before doing this? Cause my main goal is to have a very safe and clean backup disk. Will a powersurge mount the disk properly on reboot? Can I destroy the FS on a surge? I'm kinda paranoid when it comes to backing up my pictures. (Of course, I have them all on dvd/other disks as well) But there is one thing I never run out of, and that is bad luck. So better safe than sorry.
Comments on this Entry
Assuming is mounted on a Debian box, then you probably want a journaled file system such as ext3, Reiser, XFS or JFS. They each have their merits, but in most cases people use ext3. The guest operating system will then have to access via a network share of some sorts (Samba etc). See http://www.debian-administration.org/articles/388
To mount an external USB device I use UDEV, there are some nice tips here to get you going: http://www.debian-administration.org/articles/126 and http://www.debian-administration.org/articles/127
You can have the device mounted automatically on reboot, or on demand as in the automounter article. As it's not always going to be there - you may temporarily move it for example - you may want to try the automount option.
If you are worried about the device failing then you should buy a surge protector at the minimum, or a full uninteruptible power supply. Power spikes do happen, but how frequently depends where you live, only you can assess the risk.
Remember that the life span of CD-R and DVD-R media isn't that good. You can expect CD-R and DVD-R disks to start failing within 10 years or so, negatives and slides will probably outlive them as an archival medium. Magneto-optical is a better solution, but it is more expensive than CD/DVD.
You can always use an external network storage, there are lots of commercial companies offering secure network attached storage.
If you are worried about data on disks, then you should probably run your disk in a RAID set-up, and for ease of use run LVM on-top of that. There are articles here to explain how to do that to. http://www.debian-administration.org/articles/410
--
"It's Not Magic, It's Work"
Adam
[ Parent | Reply to this comment ]
/var/log/messages
Nov 15 20:28:11 localhost kernel: EXT3 FS on hdf, internal journal Nov 15 20:28:11 localhost kernel: EXT3-fs: mounted filesystem with ordered data mode. Nov 15 20:28:11 localhost kernel: u32 classifier Nov 15 20:28:11 localhost kernel: OLD policer on Nov 15 20:28:11 localhost kernel: Ingress scheduler: Classifier actions prefered over netfilter Nov 15 20:28:11 localhost kernel: eth0: link up, 100Mbps, full-duplex, lpa 0x41E1 Nov 15 20:28:13 localhost kernel: eth1: link up, 100Mbps, full-duplex, lpa 0xC5E1 Nov 15 20:28:14 localhost kernel: ip_tables: (C) 2000-2006 Netfilter Core Team Nov 15 20:28:14 localhost kernel: Netfilter messages via NETLINK v0.30. Nov 15 20:28:14 localhost kernel: ip_conntrack version 2.4 (7679 buckets, 61432 max) - 224 bytes per conntrackNot very good eh?
dmesg | grep -i WD (Western Digital)
hdb: WDC WD800BB-22CAA1, ATA DISK drive hde: WDC WD1600JB-00GVA0, ATA DISK drive Vendor: WD Model: 2500JB External Rev: 0107Tried dmesg | grep -i usb, but that gave me to much info about stuff I dont understand.
How important is native access from guest operating systems? See http://www.debian-administration.org/articles/388I normally use Samba to access my other internal disk from my osx/win system. So I guess I will use ext3. The only problem with this is when I'm taking the disk with me and unload it to another pc. But that can be worked around, I know.
Remember that the life span of CD-R and DVD-R media isn't that goodYeah, I know. But I *know* my disk are going to fail within that time anyway. So its just another way of making sure.
You can always use an external network storageI know, I know. But thanks alot for the input. Discussion is always good. But back to topic, I really dont understand anything in the links you provided. Sorry.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
udev can be an interesting challenge! but it is worth persisting to get it to work. I don't think it's mentioned in the articles I linked too, but there are some extra tools shipped with udev which can make creating the rules a little easier.
The basic idea is that you boot your box. Start a shell sesion, then plug-in the new device and see what is reported. Unplug it. Try and figure out something unique to describe it, write a rule, then try again.
It's probably worth running tail -f /var/log/messages when you plug something in, then you can see what's going on in real time. When I plug in a USB memory key I get the following (slightly edited) in my /var/log/messages/
~ kernel: usb 5-6: new high speed USB device using ehci_hcd and address 3
~ kernel: scsi3 : SCSI emulation for USB Mass Storage devices
~ kernel: Vendor: Easy Model: Disk Rev: 3000
~ kernel: Type: Direct-Access ANSI SCSI revision: 00
~ kernel: SCSI device sdb: 1014784 512-byte hdwr sectors (520 MB)
~ kernel: sdb: Write Protect is off
~ kernel: SCSI device sdb: 1014784 512-byte hdwr sectors (520 MB)
~ kernel: sdb: Write Protect is off
~ kernel: sdb: sdb1
~ kernel: sd 3:0:0:0: Attached scsi removable disk sdb
I can see some key details, "Easy", "Disk" and it's being treated as "SCSI", which should be enough to separate it from all the other plug-in devices I have (not many). Towards the end you can see that the kernel has create the next available SCSI device node for it sdb. I've configured udev to let the kernel do what it wants - frankly I don't care where the device goes - but I've told udev to create a constant symlink to it, which is what I put in my /etc/fstab.
My /etc/udev/local.rules looks like this:
BUS=="scsi", SYSFS{model}=="Camera KD-25", SYMLINK="konica_camera"
BUS=="scsi", SYSFS{vendor}=="WDC AC34", SYSFS{model}=="000L", SYMLINK="icy_box"
BUS=="scsi", SYSFS{vendor}=="Easy", SYSFS{model}=="Disk", SYMLINK="easy_disk"
You can see that what I'm doing is pulling a few features from a device, and just telling udev to create a symlink, the normal kernel device node will be created automatically and I don't pay any attention to that.
In my fstab I have a corresponding line to the symlink (not the kernel created device node) and a mount point. I'm not using automounter, but you may want to in your case.
/dev/easy_disk /media/easy vfat user,noauto 0 0
In your case the following rule may get you going.
BUS=="scsi", SYSFS{vendor}=="WD", SYSFS{model}=="2500JB External", SYMLINK="external"
And in your /etc/fstab, assuming it's been formatted ext3 already.
/dev/external /media/external ext3 user,noauto 0 0
Hope this helps! I plan to do a talk on udev at my LUG sometime...
--
"It's Not Magic, It's Work"
Adam
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
1.tail -f /var/log/messages (upon usb connection, no news here) 2.Get the device name (/dev/sda) format it and mount it. (ext3) 3.edit fstab with /dev/sda5 /mnt/dir ext3 user,auto,fmask=0111,dmask=0000 0 1
Great, it's working. Figured out a basic rsync one liner as well without asking here:)
Now, what does the great people of DA.org think about this solution?
Is it risky?
[ Parent | Reply to this comment ]
[ Send Message | View Utumno's Scratchpad | View Weblogs ]
[ Parent | Reply to this comment ]
I normally use Samba to access my other internal disk from my osx/win system. So I guess I will use ext3. The only problem with this is when I'm taking the disk with me and unload it to another pc. But that can be worked around, I know.You can try the ext2/ext3 drivers which exist for Windows. A fast search on google gave me :
- http://www.fs-driver.org/
- http://sourceforge.net/projects/ext2fsd
- http://uranus.it.swin.edu.au/~jn/linux/ext2ifs.htm
- http://e2fsprogs.sourceforge.net/ext2.html
[ Parent | Reply to this comment ]