|
|
Line 2: |
Line 2: |
| ! general tasks | | ! general tasks |
| |- | | |- |
| |[[Flash Drives]] - [[Scripts]] - [[Add a drive]] | | |[[Flash Drives]] - [[Scripts]] - [[Add a drive]] - [[Back up drive]] - [[Check disk speed]] |
| {| class="mw-collapsible mw-collapsed wikitable" | | {| class="mw-collapsible mw-collapsed wikitable" |
| ! master keyboard shortcuts map | | ! master keyboard shortcuts map |
Line 82: |
Line 82: |
| # net use | | # net use |
| # net session \\samba.server.ip.address /delete | | # net session \\samba.server.ip.address /delete |
| |}
| |
| {| class="mw-collapsible mw-collapsed wikitable"
| |
| ! Check disk speed
| |
| |-
| |
| | To check SATA capability:
| |
| bitpost ~ # hdparm -I /dev/disk/by-label/reservoir-3g-mel |grep -i speed
| |
| * Gen1 signaling speed (1.5Gb/s)
| |
| * Gen2 signaling speed (3.0Gb/s)
| |
| * Gen3 signaling speed (6.0Gb/s)
| |
| To test read speed:
| |
| bitpost ~ # hdparm -tT /dev/disk/by-label/reservoir-3g-mel
| |
|
| |
| /dev/disk/by-label/reservoir-3g-mel:
| |
| Timing cached reads: 33760 MB in 2.00 seconds = 16900.70 MB/sec
| |
| Timing buffered disk reads: 274 MB in 3.00 seconds = 91.28 MB/sec
| |
| You can use dd to check speed, too:
| |
| dd conv=fdatasync if=/dev/zero of=/spiceflow/newraid-4tb-bp/dd_test_output.dat bs=8k count=256k
| |
| =256k
| |
| 262144+0 records in
| |
| 262144+0 records out
| |
| 2147483648 bytes (2.1 GB) copied, 4.57219 s, 470 MB/s
| |
| # don't forget to clean up..
| |
| rm /spiceflow/newraid-4tb-bp/dd_test_output.dat
| |
| |}
| |
| {| class="mw-collapsible mw-collapsed wikitable"
| |
| ! Back up a linux system to a second bootable drive
| |
| |-
| |
| | Steps:
| |
| # We want to copy all files from the root drive to a new drive.
| |
| # We also want to update the boot menu to boot off the new drive.
| |
| # We also want to change /etc/fstab on the second drive to use the new root path.
| |
|
| |
| These are the steps for backup of the dune box to the /spiceflow/2.0tb-newmovies/ drive.
| |
| When we're done, we'll boot from that drive to prove we have a working standby system.
| |
|
| |
| rsync does an excellent job of copying just what we need. Test it with this:
| |
| # a (archive mode -rlptgoD) v (verbose) x (don't cross filesystems) h (human-readable) n (dry run)
| |
| rsync -avxhn --progress / /spiceflow/2.0tb-newmovies/
| |
| Do the job with this:
| |
| rsync -avxh / /spiceflow/2.0tb-newmovies/
| |
|
| |
| sent 28.10G bytes received 8.64M bytes 15.63M bytes/sec
| |
| total size is 39.57G speedup is 1.41
| |
| There was def some old stuff in there worth cleaning up:
| |
| /home/m/development/svn/mythtv...
| |
| /var/tmp
| |
| xbmc log files
| |
| etc
| |
| Next we fix /etc/fstab on the new drive to use the drive as root. Original config:
| |
| /dev/disk/by-label/d-g2-root / ext3 noatime 0 1
| |
| /dev/disk/by-label/d-sp-20newmovies /spiceflow/2.0tb-newmovies ext4 noatime 0 2
| |
| New config (remember tho, we lose the 2gb drive):
| |
| /dev/disk/by-label/d-g2-root /root-hot-drive ext3 noatime 0 1
| |
| /dev/disk/by-label/d-sp-20newmovies / ext4 noatime 0 2
| |
| Note: this never worked out for me due to my system's mix of ext3 and ext4.
| |
| I'll retry once I migrate everything to ext4.
| |
| Next, grub:
| |
| mount /boot
| |
| em /boot/grub/menu.lst
| |
| Orig entry:
| |
| title ----- linux-2.6.34-gentoo-r11_withext4
| |
| root (hd0,0)
| |
| kernel /boot/linux-2.6.34-gentoo-r11_withext4 root=/dev/sda4
| |
| Add a new "standby" entry under it - do a "df" to find the root:
| |
| title ----- ==STANDBY== linux-2.6.34-gentoo-r11_withext4
| |
| root (hd0,0)
| |
| kernel /boot/linux-2.6.34-gentoo-r11_withext4 root=/dev/hda1
| |
| Then reboot to standby and see what we have... (no "latest" video library etc., but otherwise the same?)
| |
| |} | | |} |
| {| class="mw-collapsible mw-collapsed wikitable" | | {| class="mw-collapsible mw-collapsed wikitable" |