User Tools

Site Tools


admin:samba

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
admin:samba [2025/04/17 16:06] – [Windows] rjversluisadmin:samba [2025/05/11 11:39] (current) – [OpenSCAD] rjversluis
Line 1: Line 1:
-======Samba====== +======NASpi====== 
-{{:admin:naspi.png?480}}\\ +{{:admin:naspi:naspi-20250511.jpg?320}} {{:admin:naspi.png?480}}\\
  
  \\  \\
Line 14: Line 13:
  
  \\  \\
-=====Server=====+=====Samba===== 
 +[[:admin:samba:conf|smb.conf]]
 ====Example share==== ====Example share====
 <code> <code>
Line 58: Line 58:
  
  \\  \\
-=====Samba users=====+====Users====
 The easiest way is to add a user to the RPi with the user mananger and then to Samba: The easiest way is to add a user to the RPi with the user mananger and then to Samba:
 <code> <code>
Line 65: Line 65:
  
  
 + \\
 +=====RAID 1=====
 +Mirror two identical SSD's.\\
 +For the basic setup I used this link:\\
 +https://kraisnet.de/index.php/de/themen/11-nuetzliches/34-raid-1-auf-raspberry-pi-einrichten \\
 +
 +====fstab====
 +<code>
 +/dev/md0        /media/cloudraid        ext4    defaults,auto,users,rw  0       0
 +</code>
 +
 +====mdadm====
 +Show the raid 1 details:
 +<code>
 +sudo mdadm --query --detail /dev/md0
 +/dev/md0:
 +           Version : 1.2
 +     Creation Time : Sat Apr 19 11:02:25 2025
 +        Raid Level : raid1
 +        Array Size : 1953382336 (1862.89 GiB 2000.26 GB)
 +     Used Dev Size : 1953382336 (1862.89 GiB 2000.26 GB)
 +      Raid Devices : 2
 +     Total Devices : 2
 +       Persistence : Superblock is persistent
 +
 +     Intent Bitmap : Internal
 +
 +       Update Time : Sun Apr 20 08:38:14 2025
 +             State : active 
 +    Active Devices : 2
 +   Working Devices : 2
 +    Failed Devices : 0
 +     Spare Devices : 0
 +
 +Consistency Policy : bitmap
 +
 +              Name : naspi: (local to host naspi)
 +              UUID : 4bf34efa:443aedd8:c423d0b7:08295b0e
 +            Events : 8152
 +
 +    Number   Major   Minor   RaidDevice State
 +                    1        0      active sync   /dev/sda1
 +                   17        1      active sync   /dev/sdb1</code>
 +
 + \\
 +=====SSMTP=====
 +For sending notifications from for example Raid.\\
 +https://blog.edmdesigner.com/send-email-from-linux-command-line/ \\
 +
 +
 + \\
 +=====Fan=====
 +==== Install pigpiod====
 +<code bash>sudo apt install pigpio</code>
 +===Start daemon===
 +<code bash>sudo systemctl start pigpiod</code>
 +===Autostart deamon===
 +<code bash>sudo systemctl enable pigpiod</code>
 +
 +====Shell script====
 +Using GPIO4, header pin 7, for the 100Hz PWM.\\
 +<code bash>
 +#!/bin/bash
 +while true
 +do
 +  TEMP=$(cat /sys/class/thermal/thermal_zone0/temp)
 +  RV=$(pigs pfs 4 100)
 +  PWM=0
 +  if (( $TEMP > 45000))
 +  then
 +    PWM=50
 +  fi
 +  if (( $TEMP > 50000))
 +  then
 +    PWM=100
 +  fi
 +  if (( $TEMP > 55000))
 +  then
 +    PWM=150
 +  fi
 +  if (( $TEMP > 60000))
 +  then
 +    PWM=200
 +  fi
 +  echo temp=$TEMP pwm=$PWM
 +  pigs p 4 $PWM
 +  sleep 10
 +done
 +</code>
 +
 +====Startup at reboot====
 +crontab -e
 +<code bash>@reboot /home/pi/fan.sh&</code>
 +
 +====Connecting the Fan====
 +<code>
 +FET BS170 connection:
 +----------------------------------------
 +6 (GND) Source
 +7 (GPIO4) Gate
 +2 (+5V) Fan red wire
 +
 +Fan black wire to FET Drain
 +A resistor of 47k between GND and FET Gate will shutoff the fan in case the GPIO is in an undefined state.\\
 +</code>
 +{{:admin:naspi:naspi-fan.jpg?0x300}}{{?admin:naspi:rpi-fan.png?0x300}}\\
 +
 +
 + \\
 +=====3D====
 +====OpenSCAD====
 +SSDBox and rpi4-box:
 +  * https://gitlab.com/rocrail/rocrail3d/-/tree/master/RPi?ref_type=heads
  \\  \\
 =====Links===== =====Links=====
-  * https://www.raspberrypi.com/tutorials/nas-box-raspberry-pi-tutorial/ +  * Samba: https://www.raspberrypi.com/tutorials/nas-box-raspberry-pi-tutorial/ 
-  * https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X +  * TimeMachine: https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X 
-  * https://www.samba.org/samba/GUI/ +  * GUIs: https://www.samba.org/samba/GUI/ 
-  * https://webmin.com+  * WEBmin: https://webmin.com 
 +  * RAID 1: https://kraisnet.de/index.php/de/themen/11-nuetzliches/34-raid-1-auf-raspberry-pi-einrichten 
 +  * SSMTP: https://blog.edmdesigner.com/send-email-from-linux-command-line/ 
 +  * RAID 1 recovery: https://serverfault.com/questions/1039114/on-ubuntu-how-do-you-recover-data-from-a-single-disk-of-a-raid-array-from-anoth
  
admin/samba.1744898798.txt.gz · Last modified: 2025/04/17 16:06 by rjversluis