On Sun 2020-12-20 (14:22), Roman Mamedov wrote:
> > For now I have in /etc/rc.local:
> >
> > cd /nfs/rusnas/fex
> > for d in spool_[1-9].btrfs; do
> > echo -n "$d ==> "
> > losetup -fP --show $d
> > done
> > sync
> > sleep 2 # without this sleep the mount will fail!
>
> You could try replacing the sleep with "btrfs device scan", certainly more
> elegant (assuming it helps). Maybe even narrow it down to
> "btrfs device scan /dev/loop*", or even scan each added device.
Indeed better!
> > mount -v spool_1.btrfs /mnt/spool
>
> Better mount one of the loop devices, not the file, lest mount will probably
> make one more, a dupe of one that your script has already added, and who knows
> what side effects this could have.
Ok, now I use:
ldev=$(losetup -l | awk '/spool_1.btrfs/{print $1;exit}')
mount -v $ldev /mnt/spool
This is all necessary because our Netapp storage system has an annoying
16 TB file size limit. This was ok for the last century, but for today it
is an anachronism.
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart E-Mail: [email protected]
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/
REF:<20201220142252.01cf4140@natsu>