On Thu 2020-12-17 (19:12), Roman Mamedov wrote:

> > root@fextest:/nfs/rusnas/fex# touch disk2.btrfs
> > root@fextest:/nfs/rusnas/fex# truncate -s 16TB disk2.btrfs
> > root@fextest:/nfs/rusnas/fex# btrfs device add /nfs/rusnas/fex/disk2.btrfs 
> > /mnt/tmp
> > ERROR: /nfs/rusnas/fex/disk2.btrfs is not a block device
> 
> Since file is not a block device, here you have to do the same manually. See
> documentation for 'losetup'.

Ok, I was able to extend the btrfs filesystem via a loopback devive.

What is the suggested way to do this at boot time?

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!
mount -v spool_1.btrfs /mnt/spool

This works, but is there a more elegant way?
Using /etc/fstab seems not to be possible?


-- 
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:<20201217191207.17243c40@natsu>

Reply via email to