Re: Loopback mount in fstab fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16Aug2019 13:18, Patrick O'Callaghan <pocallaghan@xxxxxxxxx> wrote:
I'm trying to rationalise space by moving my /var directory from its
own partition to /, as currently there's a lot of wastage. I've copied
/var to /newvar with rsync, and now want to mount /newvar as /var on
reboot by creating an entry in /etc/fstab. This is it (using /var-tst
for testing):

/newvar                                   /var-tst                ext4    loop            0 0

That isn't what loop is for. loop is for associating a file with a device.

What you want is "bind", not "loop", because you're binding an _existing_ mount to another location.

but I'm getting:

mount: /var-tst: failed to setup loop device for /newvar.

Because /var-tst is a directory, not a file-shaped-like-a-partition.

Example from our home server:

 /app8tb/media/video    /exports/video    none    bind,relatime 0 0

PS Suggestions on how to move /var without all this jiggery-pokery are
also welcome.

If you want /var to be on /, rsync it as you have done, and just make a symlink as /var.

Really, all you need to do is to remove the /var fstab entry, umount the existing /var mount, rsync /newvar BACK INTO the stub /var mountpoint which is there, scrub /newvar.

No fstab trickery required (other than erasing/commenting the /var line).

Then afterwards you need to decide what to do with the partition you have been using for /var.

Cheers,
Cameron Simpson <cs@xxxxxxxxxx>
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux