:: Re: [DNG] udev replacement
Kezdőlap
Delete this message
Reply to this message
Szerző: Fungi4All
Dátum:  
Címzett: KatolaZ
CC: dng@lists.dyne.org
Tárgy: Re: [DNG] udev replacement
https://dev1galaxy.org/viewtopic.php?pid=3224#p3224
by nixer:
I have a couple of "nasty" hacks. They are done on all my devuan installs. So, I will share.
Before I start, one thing you may want to know. I have a home network server operational 24/7. It is only off during power outages, which is seldom. The first of my hacks begin with already having successfully configured nfs to be shared on the server, and both hacks depend on the installation of and configuring autofs on the client computers. Autofs is used on both hacks, to mount nfs network mounts and to mount the local partitions. With autofs, the fstab file is not altered, but fstab may need to be altered to successfully test and troubleshoot the mount procedure.
Hack #1 - Recycle and Reuse Apt Cache, Use NFS network mount (with autofs)
I use this "nasty hack" to use, share, and recycle my downloaded apt cache across all my devuan installations. I rename /var/cache/apt/archives to archives.local and then I create a symlink to the network mount location.
- Manually create the folder /mnt/nfs, and then /mnt/nfs/auto-server-data
- Install autofs, as root
apt-get install autofs
- Add the below to /etc/auto.master, adjusting for your paths
# nfs shares /mnt/nfs/auto-server-data /etc/auto.nfs --timeout=30 --ghost

- Create the file /etc/auto.nfs and add to it, adjusting to your needs
data -fstype=nfs,rw 192.168.1.100:/mnt/data

As root, enter the command
service autofs restart
These two entries combined will mount the remote location from 192.168.1.100:/mnt/data, and mount it locally at /mnt/nfs/auto-server-data/data. The mount will timeout after 30 seconds (minutes?) and the "data" folder itself will disappear. Don't worry, it will be re-created as needed, and upon a re-mount. After it is successfully mounted, then the symlink to /var/cache/apt/archives can be created with, and adjust for your paths:
# ln -s /mnt/nfs/auto-server-data/data/devuan/apt/archives /var/cache/apt/archives

For any permissions problem on the local system, I adjust the network folder to 0777. Be sure to set apt to not delete the cache. I do this from within synaptic. This hack allows me to save bandwidth on the repository servers as I have several devuan installs in my network.