Home systems: Difference between revisions

From SoftwareGuy
Jump to navigation Jump to search
Mark (talk | contribs)
Created page with "== Rebuilding Raid == Rebuilding a raid system? Detail from mdadm of good working file system prior to zeroing the superblock. <pre> sudo mdadm --detail /dev/md4 /dev/md4: Version : 0.90 Creation Time : Sat Mar 19 08:02:27 2011 Raid Level : raid6 Array Size : 160649856 (153.21 GiB 164.51 GB) Used Dev Size : 80324928 (76.60 GiB 82.25 GB) Raid Devices : 4 Total Devices : 4 Preferred Minor : 4 Persistence : Superblock is persistent..."
 
Mark (talk | contribs)
No edit summary
Line 1: Line 1:
== Changing default serial port protections ==
create a file, such as &lt;code&gt;99-local.rules&lt;/code&gt; in the following directory:  &lt;code&gt;/etc/udev/rules.d/&lt;/code&gt; with the following info:
&lt;pre&gt;
#
# Give world read/write access to ttyS* and ttyUSB* serial devices
#
KERNEL==&quot;tty[A-Z]*&quot;, GROUP=&quot;uucp&quot;, MODE=&quot;0666&quot;
&lt;/pre&gt;
== Ubuntu dual monitors ==
Run &lt;code&gt;nvidia-settings&lt;/code&gt;.  Now we may need to modify the Xconf file, if so see the following:
# Open nvidia-settings by searching for nvidia in the Dash, or run the command gksudo nvidia-settings in the Terminal. Note not to press the apply button.
# Under 'Xserver Display Configuration' select TwinView and configure the settings for the monitors to your liking.
# Click 'Save to X Configuration File' and an error message should appear. Click OK.
# In the next dialog box click the button to 'Show Preview'.
# Leave the preview window open and open a Terminal. Run the following commands in the Terminal to back up your xorg.conf file and open the original file in a test editor. If something goes wrong, just revert to your backed up xorg.conf.
# sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
# gksudo gedit /etc/X11/xorg.conf`
# Copy the text from the nvidia-settings preview window into the xorg.conf file. Save the xorg.conf file and close gedit. Click 'Cancel' to close the nvidia-settings preview window. Then click 'Quit' to exit completely out of nvidia-settings without applying or saving any data.
# Restart your computer. If all went well, the two monitors should work together.
== Rebuilding Raid ==
== Rebuilding Raid ==
Rebuilding a raid system?
Rebuilding a raid system?
Line 76: Line 100:
sudo mount /dev/md6 /mnt/temp
sudo mount /dev/md6 /mnt/temp
&lt;/pre&gt;
&lt;/pre&gt;
== Fixing mail permission errors on linux2 ==
Do the following:
&lt;pre&gt;
sudo touch /var/mail/$USER
sudo chown $USER:mail /var/mail/$USER
sudo chmod o-r /var/mail/$USER
sudo chmod g+rw /var/mail/$USER
&lt;/pre&gt;
== Updates to tzo configuration ==
After installing tzo I needed to update the &lt;code&gt;tzod&lt;/code&gt; script in &lt;code&gt;/etc/init.d&lt;/code&gt;.  I updated the following script segment to look like this (basically just added the lines with &lt;code&gt;/lib/lsb...&lt;/code&gt;:
&lt;pre&gt;
if [ -f /etc/rc.d/init.d/functions ]; then
        . /etc/rc.d/init.d/functions
elif [ -f /etc/init.d/functions ] ; then
        . /etc/init.d/functions
elif [ -f /lib/lsb/init-functions ] ; then
    . /lib/lsb/init-functions
else
&lt;/pre&gt;
Next I added a soft link in the &lt;code&gt;/etc/rc.5.d/&lt;/code&gt; directory:
&lt;pre&gt;
sudo ln -s ../init.d/tzod S99tzod
&lt;/pre&gt;
----
[[Main_Page]] Main

Revision as of 17:26, 19 March 2023

Changing default serial port protections

create a file, such as <code>99-local.rules</code> in the following directory: <code>/etc/udev/rules.d/</code> with the following info:

<pre>

  1. Give world read/write access to ttyS* and ttyUSB* serial devices

KERNEL=="tty[A-Z]*", GROUP="uucp", MODE="0666" </pre>

Ubuntu dual monitors

Run <code>nvidia-settings</code>. Now we may need to modify the Xconf file, if so see the following:

  1. Open nvidia-settings by searching for nvidia in the Dash, or run the command gksudo nvidia-settings in the Terminal. Note not to press the apply button.
  2. Under 'Xserver Display Configuration' select TwinView and configure the settings for the monitors to your liking.
  3. Click 'Save to X Configuration File' and an error message should appear. Click OK.
  4. In the next dialog box click the button to 'Show Preview'.
  5. Leave the preview window open and open a Terminal. Run the following commands in the Terminal to back up your xorg.conf file and open the original file in a test editor. If something goes wrong, just revert to your backed up xorg.conf.
  6. sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
  7. gksudo gedit /etc/X11/xorg.conf`
  8. Copy the text from the nvidia-settings preview window into the xorg.conf file. Save the xorg.conf file and close gedit. Click 'Cancel' to close the nvidia-settings preview window. Then click 'Quit' to exit completely out of nvidia-settings without applying or saving any data.
  9. Restart your computer. If all went well, the two monitors should work together.

Rebuilding Raid

Rebuilding a raid system?

Detail from mdadm of good working file system prior to zeroing the superblock.

<pre> sudo mdadm --detail /dev/md4 /dev/md4:

       Version : 0.90
 Creation Time : Sat Mar 19 08:02:27 2011
    Raid Level : raid6
    Array Size : 160649856 (153.21 GiB 164.51 GB)
 Used Dev Size : 80324928 (76.60 GiB 82.25 GB)
  Raid Devices : 4
 Total Devices : 4

Preferred Minor : 4

   Persistence : Superblock is persistent
   Update Time : Sun Jun  3 21:06:27 2012
         State : clean 
Active Devices : 4

Working Devices : 4

Failed Devices : 0
 Spare Devices : 0
        Layout : left-symmetric
    Chunk Size : 64K
          UUID : b60f9401:efa1275e:6caba8f0:d8b2a7d7
        Events : 0.457
   Number   Major   Minor   RaidDevice State
      0       8       66        0      active sync   /dev/sde2
      1       8       82        1      active sync   /dev/sdf2
      2       8       98        2      active sync   /dev/sdg2
      3       8       50        3      active sync   /dev/sdd2

</pre>

Note, the drive order is very important. Also, remove the ARRAY entry from /etc/mdadm/mdadm.conf for the drive.

<pre> sudo mdadm --stop /dev/md6 sudo mdadm --zero-superblock /dev/sd[defg]2 sudo mdadm --create /dev/md6 --metadata=1.0 --chunk=64 --level=6 --raid-devices=4 /dev/sde2 /dev/sdf2 /dev/sdg2 /dev/sdd2 </pre>

Ok, now we need to get the blkid from the md filesystem and add an entry into the mdadm.conf file which matches.

<pre> sudo blkid /dev/md6 # edit mdadm.conf file and add entry "ARRAY /dev/md6 UUID=dad67a5c:0907045c:7eb49ca0:d0f6f000" sudo mdadm --assemble /dev/md6 --update=resync sudo mdadm --detail /dev/md6 sudo blkid /dev/md6 sudo mount -t ext3 /dev/md6 /mnt/temp

watch -n 1 cat /proc/mdstat </pre>

or... ???

<pre> sudo mdadm --stop /dev/md6 sudo mdadm --zero-superblock /dev/sd[defg]2 sudo mdadm --create /dev/md6 --metadata=0.9 --chunk=64 --level=6 --raid-devices=4 /dev/sde2 /dev/sdf2 /dev/sdg2 /dev/sdd2 sudo mdadm --assemble /dev/md6 --update=resync sudo mdadm --detail /dev/md6 sudo blkid /dev/md6 sudo mount -t ext3 /dev/md6 /mnt/temp </pre>

If this is a new raid drive, make the filesystem then mount

<pre> sudo mkfs /dev/md6 sudo mount /dev/md6 /mnt/temp </pre>

Fixing mail permission errors on linux2

Do the following: <pre> sudo touch /var/mail/$USER sudo chown $USER:mail /var/mail/$USER sudo chmod o-r /var/mail/$USER sudo chmod g+rw /var/mail/$USER </pre>

Updates to tzo configuration

After installing tzo I needed to update the <code>tzod</code> script in <code>/etc/init.d</code>. I updated the following script segment to look like this (basically just added the lines with <code>/lib/lsb...</code>: <pre> if [ -f /etc/rc.d/init.d/functions ]; then

       . /etc/rc.d/init.d/functions

elif [ -f /etc/init.d/functions ] ; then

       . /etc/init.d/functions

elif [ -f /lib/lsb/init-functions ] ; then

   . /lib/lsb/init-functions

else </pre>

Next I added a soft link in the <code>/etc/rc.5.d/</code> directory: <pre> sudo ln -s ../init.d/tzod S99tzod </pre>


Main_Page Main