johnny121b Posted January 1, 2014 Share Posted January 1, 2014 I'd like to upgrade my cache drive, but I need to KEEP the drive's current files + directory structure (it hosts PLEX). I'm using a TAMS server (so I have open drive bays.) It seems that the directory structure PLEX created ISN'T Windows compatible (255+ characters)...so simply copying across my network to the drive via my Windows machine is a no-go. I'd like to Plug new drive in Mirror contents of cache drive to it Stop the array Replace the old cache drive with the new one Restart the array & go on about my day. I'm hoping there's a straightforward command line sequence I can issue, that will take care of the whole process locally (w/o moving the files across my network.) Searching, I found this online, but have no idea if it'd be a safe command line to issue... ssh [email protected] "(cd / ; tar cf - . )" | (mkdir -p /local_dir ; cd /local_dir ; umask 000 ; tar xvf -) Thanks! Quote Link to comment
c3 Posted January 1, 2014 Share Posted January 1, 2014 I would stop the array before mirroring the cache contents. Using tar just adds to the process, simple cp or rsync should work and not have as much overhead. Quote Link to comment
bubbaQ Posted January 1, 2014 Share Posted January 1, 2014 1. Note the model/serial of the current cache drive. 2. Stop array, install new cache drive. 3. Restart array. 4. At the console, run "lsscsi" and identify the sdX device for the OLD cache drive 5. Make a directory to mount the old cache drive: (mkdir /mnt/old_cache) 6. Mount the old cache drive: (mount /dev/sdX /mnt/old_cache) 7. Rsync the old cache drive to the new: (rsync -avhW --stats --progress --no-compress /mnt/old_cache /mnt/cache) 8. Unmount the old cache drive: (umount /mnt/old_cache) 9. Remove old cache drive. Quote Link to comment
johnny121b Posted January 5, 2014 Author Share Posted January 5, 2014 I ran into trouble at step #5. "mount: you must specify the filesystem type" In response to the command line, which was: mount /dev/hda /mnt/old_cache (Old cache drive is on the IDE bus, hence the hda) I looked online and appending "-t auto" to the line gave the same result. ?? Quote Link to comment
trurl Posted January 5, 2014 Share Posted January 5, 2014 How about -t reiserfs? Quote Link to comment
archedraft Posted January 5, 2014 Share Posted January 5, 2014 I just did this. At step 6 I got that same error. I changed /dev/sdX to /dev/sdX1 and then It mounted. Quote Link to comment
Joe L. Posted January 5, 2014 Share Posted January 5, 2014 The cache file system is on the first partition. The correct command for 6 is: 6. Mount the old cache drive: (mount -t reiserfs /dev/sdX1 /mnt/old_cache) Note the trailing"1" needed on the device name. Quote Link to comment
johnny121b Posted January 5, 2014 Author Share Posted January 5, 2014 Nope... Response: "mount: special device /dev/sdX1 does not exist" Tried with upper and lower case "X"....same response. I stopped the array before trying this. Does it need to be started? Quote Link to comment
archedraft Posted January 5, 2014 Share Posted January 5, 2014 4. At the console, run "lsscsi" and identify the sdX device for the OLD cache drive Your cache drive will not have a "X". You replace the "X" with whatever letter the command "lsscsi" gives for your cache drive. It should be something like (a,b,c... Ect) just make SURE whichever letter you enter is the cache drive and not a data drive. Quote Link to comment
johnny121b Posted January 5, 2014 Author Share Posted January 5, 2014 Ah, but as I commented in my first post- the old/current cache drive is on the IDE bus. It doesn't even show up for the lsscsi command.... Do I use hda instead of sdX ?? Quote Link to comment
archedraft Posted January 5, 2014 Share Posted January 5, 2014 I am not familiar with unRAID and IDE drives, however if you only have one IDE drive then I would assume that hda would be correct. You could check to make sure after you mount hda you can type "MC" into the console and go to "mnt" -> "old_cache" and make sure it has all your cache files. Quote Link to comment
johnny121b Posted January 5, 2014 Author Share Posted January 5, 2014 Issued the command "mount -t reiserfs /dev/hda1 /mnt/old_cache" The copy command seemed to work, but after about 15 minutes, stopped with the following: "rsync: writefd_unbuffered failed to write 5 bytes to socket [generator]: Broken pipe (32)Killed" "rsync error: error in rsync protocol data stream (code 12) at io.c(1530) [generator=3.0.7]" Quote Link to comment
archedraft Posted January 5, 2014 Share Posted January 5, 2014 I didn't use the "-t reiserfs" part when I mounted the drive. I am not sure what that error means but I might try the following. 1. Do step 8 2. Redo step 6 with this command (mount /dev/hda1 /mnt/old_cache) 3. Go to step 7. Again I have no clue what that error means (if anyone else does please let us know) but I would probably try that if it was me. Quote Link to comment
johnny121b Posted January 12, 2014 Author Share Posted January 12, 2014 Exact same error- only this time after 34 minutes of copying. Quote Link to comment
archedraft Posted January 12, 2014 Share Posted January 12, 2014 You could try running midnight commander to copy it over... Do steps 1-6 7. Type "MC" in terminal 8. Have "old_cache" on left side of mc and "cache" on the right. Then use the copy feature and see if that works. Quote Link to comment
johnny121b Posted January 12, 2014 Author Share Posted January 12, 2014 I think I'm onto something. I've tried to follow everyone's instructions to-the-letter, without too much second-guessing...and I think I've made a fundamental error. I followed step 2. I 'installed new cache drive' (And by that, I mean I physically put it into my server....but that's ALL I've done.) It isn't formatted. It hasn't been mounted as a cache drive. Nothing! It's just there....as sdb. I just aSsUmED rsync took care of that, but I'm beginning to think otherwise. I just tried some commands on my own; mkdir /mnt/new_cache......works, but the next step- mount /dev/sdb /mnt/new_cache....DOESN'T This new drive has to be installed AND FORMATTED resiserfs FIRST, doesn't it??? I'd like to deviate from bubbaQ's list. Rather than start my array with a new cache drive and watch as things go haywire with my plugins, can't I just FORMAT this drive from terminal, create the /mnt/new_cache directory, mount /dev/sdb /mnt/new_cache, then change his rsync command line to rsync -avhW --stats --progress --no-compress /mnt/old_cache /mnt/new_cache, then stop my array, change my config to point to the new cache drive ........all without EVER introducing the system to a 'blank' cache drive??? If so, you know what my next question is going to be: what's the command line to properly format sdb .... and can I do that while the array is running? Quote Link to comment
bubbaQ Posted January 12, 2014 Share Posted January 12, 2014 "Install" new cache drive means stop array, insert new drive, change cache drive config config to point to new cache drive, restart array, format cache, and have it ready to accept files with the array started. All you did was "Insert" the new cache drive. Quote Link to comment
archedraft Posted January 12, 2014 Share Posted January 12, 2014 If you reboot your server and boot into safe mode you can start your server without plugins. Then copy over everything. That is what I did. Quote Link to comment
johnny121b Posted January 12, 2014 Author Share Posted January 12, 2014 The drive is tied up in a preclear cycle right now, but thanks for getting back with me, guys. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.