« I've heard that before, but where?Appeal to patriotism »

Farewell, Fedora

04/25/07 | by Adam | Categories: Technology

Over the weekend, the motherboard on my LINUX file server croaked. Fortunately, however, not the harddrives. I therefore constructed a cunning plan: instead of rebuilding the Fedora system, I would move to a standalone NAS which would be rather less of a pain to maintain. It would also be considerably less-featured but that would be a problem for another day.

After some extensive research ("Uh, storage devices, Memory Express, yeah, ok") I decided on the D-Link DNS-323. It's a two-unit SATA network server running an imbedded LINUX derivative and has a gigabit ethernet connection, a USB print server, uPnP and iTunes support, and an FTP server with the ability to set basic permissions on the directory structure. It is, in short, simple. Not stupid simple but the good kind.

Problem number one was how to get the data off the ext3 drives given that my only LINUX box had just gone up in a puff of smoke. The normal answer would have been to crack open another PC, stick the drives in there, reboot using a Live CD from any of the current LINUX distributions and then just copy them off. Too easy. Nope, this had to be done the hard way without opening any more computer cases. Besides, my hands are still somewhat tender from the slice-and-dice after the last bit of computer maintenance. So I took the first disk and put it into an external USB2 enclosure, connected it to my Mac and..."Volume unreadable". What? OSX *is* UNIX and should be able to read ext2/3 without problem. Well, apparently it can't read these ones.

Fallback position one was to use the Windows XP box instead. Windows doesn't understand non-FAT or NTFS drives by default but fortunately someone has ported a driver for it. It's free and it works. It doesn't however like any nonstandard characters like those used in French. Nor does it like softlinks. Any file copy therefore would immediately fail on encountering any name with so much as suggestion of them. Very very frustrating. Fortunately another piece of software helped out here: syncExp. SyncExp is a file copier: tell it where to copy from, where to copy to and what to ignore, and it'll go off and do it. If it does encounter an error such as bad text in a filename, it'll log it and continue. When you're done, you check the log, fix the files, and start it up again. It checks dates and sizes of both the destination and source and will skip over anything previously updated making subsequent runs quite fast.

Well, fast in a manner of speaking. It took about two days to copy 300GB across a gigabit LAN.

Anyway, all of that was done and I was on to the second disk. This one was the Fedora boot disk. When installed, Fedora automatically creates a couple of partitions. The first one "/boot" holds the kernel image and the bootstrap loader; the second the swap file, applications, operating system files and so forth. When I stuck this disk into the USB drive and tried to read it, only the first partition was visible. The second, about 110GB, was inaccessible as it was apparently unformatted. At this point I start getting a little concerned. My experience with partition recovery tools is very bad indeed and I didn't want to gamble on losing the data.

Fortunately inspiration struck! The PC I was mounting it on was new! It had a BIOS setting to boot from USB drives! Maybe it's some whacked out drive format that only Fedora uses! Well, one reboot later and I'm glum again. The machine gets a kernel panic and stops dead. Aha, says I, I have a recent(ish) Ubuntu 6 CD I can boot from. That must surely work as they're basically the same code with a few surface differences. Up comes Ubuntu, the USB drive is automatically mounted, "/boot" appears and... nothing else. I start gparted which dutifully reports the same problem: it's an unformatted partition. However, it does say one thing I hadn't noticed before: the letters "lvm" on the flags section of the display. This does indeed ring a faint bell. Logical Volume Management was the new flavour of Fedora; intended to merge multiple drives into one volume, it acted as an overlay. I'd tried it on a previous install, thought it too risky to use and backed off. Apparently though I'd not backed off enough as here it was again. The problem then was trying to figure out how to read an LVM partition on a system that wasn't set up to read it. And here, Google is a valuable resource. This isn't (apparently) a rare problem so there are good people out there who've documented how to do it; the problem merely is finding the correct information. For my purposes, here's the answer (courtesy of www.linux-sxs.org):

A while back, I started experimenting with Ubuntu after playing with Fedora. I decided to jump to Ubuntu and needed to move data from the Fedora-managed logical volume to Ubuntu. Here's what I did.
1. Boot Ubuntu.
2. Install lvm2:
$ sudo apt-get install lvm2
3. Load the necessary module(s):
$ sudo modprobe dm-mod
4. Scan your system for LVM volumes and identify in the output the volume group name that has your Fedora volume (mine proved to be VolGroup00):
$ sudo vgscan
5. Activate the volume:
$ sudo vgchange -ay VolGroup00
6. Find the logical volume that has your Fedora root filesystem (mine proved to be LogVol00):
$ sudo lvs
7. Create a mount point for that volume:
$ sudo mkdir /mnt/fcroot
8. Mount it:
$ sudo mount /dev/VolGroup00/LogVol00 /mnt/fcroot -o ro,user
9. Copied my files.

And now, everything has been migrated. I don't have PictaTrove running and Radio Adam is currently being spooled off the Macintosh, but otherwise things are looking good. Now all I have to do is figure out the FTP permission settings before letting the unit anywhere near an open internet accessible port.


No feedback yet

December 2021
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
"Ready, Aye, Ready" was a slogan used by Canadian politicians to indicate Canada's willingness to assist the British Empire in any conflict. It remains in use as a motto for some of the Canadian military. It has almost nothing to do with the content of this blog.


  XML Feeds

blog tool