blob: 109c6faac851495b42b84e7e182d7d2aa39e42d5 (
plain) (
tree)
|
|
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset='utf-8'>
<title>Storage</title>
</head>
<body>
<a href="index.html">Tools Index</a>
<h1>Storage</h1>
<h2 id="maint">1. Maintenance</h2>
<p>SMART provides statistics of disk firmware, this system
handle errors has their occur. Badblocks detect bad blocks
by writing and reading from disk in a destructive test.
Example of how to view SMART statistics of a disk;</p>
<pre>
# smartctl -t long /dev/sdb1
# smartctl -a /dev/sdb1 | less
</pre>
<p>Search for bad blocks using
<a href="https://wiki.archlinux.org/index.php/Badblocks">non destructive test;</a></p>
<pre>
# badblocks -nsv /dev/sdb1
</pre>
<h2 id="mv">2. Moving data</h2>
<p>Temp partition with 20M-50M;</dd>
<pre>
(parted) mkpart primary ext4 4000MiB 4050MiB
</pre>
<p>Ports partition with 120G allows to host sources, package
backups and ports;</dd>
<pre>
(parted) mkpart primary ext4 192000MiB 312000MiB
</pre>
<p>Reboot into single-user mode where services aren't started and networking is offline.<p>
<pre>
# init 1
</pre>
<p>Copy the data:</p>
<pre>
# cp -apx /srv/* /mnt/srv
</pre>
<p>Rename directory, for later backup;</p>
<pre>
# mv /srv /srv.old
# mkdir /srv
</pre>
<p>Edit the <a href="../conf/etc/fstab">/etc/fstab</a>file:</p>
<pre>
# Temporary Data /tmp
UUID=50bf6e55-6461-4dd4-b315-65b53cac0995 /tmp ext4 defaults,nodev,nosuid,noexec 0 0
# Server Data /srv
UUID=6fadcb98-e442-4af7-a5f2-1ddb6100a8c4 /srv ext4 defaults 0 2
# Ports Data /usr/ports
UUID=d1df6743-d3cb-4d5a-badb-96cef3181095 /usr/ports ext4 defaults,nodev,nosuid,noexec 0 0
</pre>
<p>Reboot in normal mode.</p>
<a href="index.html">Tools Index</a>
<p>
This is part of the c9-doc Manual.
Copyright (C) 2016
c9 team.
See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
for copying conditions.</p>
</body>
</html>
|