tips_and_tricks
This is an old revision of the document!
Tips and Tricks
USB disks go stale
Sometimes USB disks go stale after a time of non use. This was happening a lot on churn1, but also on other computers occasionally. The trick it to tell the disks not to do that. Write a little script and run it as root:
for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 2 > $i; done for foo in /sys/bus/usb/devices/*/power/level; do echo on > $foo; done
Samba
Restart: “sudo /etc/init.d/smbd restart”
Conf file: “/etc/samba/smb.conf”
Example disk config:
[bigdisk1] path = /bigdisk1 valid users = sonata read only = no [bigdisk2] path = /bigdisk2 valid users = sonata read only = no [bigdisk3] path = /bigdisk3 valid users = sonata read only = no [sonata20160730-20180110] path = /sonata20160730-20180110 valid users = sonata read only = yes
List samba disks
smbtree
example:
root@bserve1:/etc/samba# smbtree Enter root's password: WORKGROUP \\BSERVE1 bserve1 server (Samba, Ubuntu) \\BSERVE1\IPC$ IPC Service (bserve1 server (Samba, Ubuntu)) \\BSERVE1\sonata20160730-20180110 \\BSERVE1\bigdisk3 \\BSERVE1\bigdisk2 \\BSERVE1\bigdisk1 \\BSERVE1\print$ Printer Drivers
STORE1
Early August Daniel set up the 90TB RAID5 disk system.
/etc/fstab entry:
//10.10.1.140/store1 /store1 cifs username=sonata,password=polaris,iocharset=utf8,sec=ntlm,vers=1.0 0 0
The /etc/samba/smb.conf entries:
[store1] comment = store1's large raid array path = /datax guest ok = yes writeable = yes write list = sonata, root valid users = sonata read only = no create mode = 0777 force create mode = 0777 directory mask = 0777 force directory mode = 0777
tips_and_tricks.1565837590.txt.gz · Last modified: 2023/10/28 18:36 (external edit)