LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-18-2022, 10:45 AM   #1
Grobe
Member
 
Registered: Aug 2019
Location: Close to north
Distribution: Fedora
Posts: 117

Rep: Reputation: Disabled
Mounting btrfs (plain storage) - When to use option subvol=@ ?


Hi.

Have a Linux Mint installation, and also have a 1TB HDD for file storage only, one single partition formatted with btrfs.

If I use the mount option subvol=@ in fstab, I get the error
Code:
$ sudo mount -a
[sudo] password for grobe:          
mount: /terralager: mount(2) system call failed: No such file or directory.
If I remove the mount option subvol=@ in fstab, I can mount the partition without any issue.

Why is it so? What does subvol=@ mean, does it have a particular purpose?
How can I check or get a list of subvolumes on a btrfs volume ?


lsblk
Code:
sudo lsblk --fs
NAME   FSTYPE LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                          
├─sda1 ext4              37f68ebe-1ea5-4cdd-ac94-a44d321f8d22  720,1M    21% /boot
├─sda2 btrfs  Håom       4d3c5932-453b-4eb2-9a71-3c017b230cd7   43,3G    11% /home
├─sda3 btrfs  lager1     879e6a15-206b-46c2-881f-197d79808eda   59,4G    72% /lager1
└─sda4 ext4              45c07f2f-eca6-4948-aaed-2471610b22d4   26,2G     3% /var
sdb                                                                          
└─sdb1 btrfs  terralager d77d3850-667c-43d8-a806-779286baa711                
sdc                                                                          
├─sdc1 swap              4cb64699-ed99-4431-9e28-37c50244d887                [SWAP]
└─sdc2 btrfs             746dc818-52db-4720-ba39-c26494ee3007   64,8G     8% /
sr0

working fstab file
Code:
sudo cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb2 during installation
UUID=746dc818-52db-4720-ba39-c26494ee3007 /               btrfs   defaults,subvol=@ 0       1
# /boot was on /dev/sda1 during installation
UUID=37f68ebe-1ea5-4cdd-ac94-a44d321f8d22 /boot           ext4    defaults        0       2
# /home was on /dev/sda2 during installation
UUID=4d3c5932-453b-4eb2-9a71-3c017b230cd7 /home           btrfs   defaults,subvol=@home 0       2
# /lager1 was on /dev/sda3 during installation
UUID=879e6a15-206b-46c2-881f-197d79808eda /lager1         btrfs   defaults        0       2
# /var was on /dev/sda4 during installation
UUID=45c07f2f-eca6-4948-aaed-2471610b22d4 /var            ext4    defaults        0       2
# swap was on /dev/sdb1 during installation
UUID=4cb64699-ed99-4431-9e28-37c50244d887 none            swap    sw              0       0
#
# Terralager internal hdd extra storage space
UUID=d77d3850-667c-43d8-a806-779286baa711 /terralager     btrfs   defaults        0     1
 
Old 01-19-2022, 09:38 AM   #2
pmv
Member
 
Registered: Apr 2018
Location: Germany
Distribution: OpenSuSE 15.4 Ubuntu 20.04 Archlinux 2022.08.05 Slackware 15.0
Posts: 87
Blog Entries: 5

Rep: Reputation: 31
Change in fstab
Code:
UUID=d77d3850-667c-43d8-a806-779286baa711 /terralager     btrfs   defaults        0     1
to (because of btrfs)
Code:
UUID=d77d3850-667c-43d8-a806-779286baa711 /terralager     btrfs   defaults,subvol=@terralager        0     1

Last edited by pmv; 01-20-2022 at 04:01 PM.
 
1 members found this post helpful.
Old 01-19-2022, 09:57 AM   #3
Grobe
Member
 
Registered: Aug 2019
Location: Close to north
Distribution: Fedora
Posts: 117

Original Poster
Rep: Reputation: Disabled
Ok, so there is a link. Should it be same as mount point or same as partition label in general?
 
Old 01-28-2022, 07:29 PM   #4
Fearless Fred
Member
 
Registered: Jan 2022
Location: UK
Distribution: Mabox - Manjaro/Arch
Posts: 54

Rep: Reputation: 37
with btrfs the @ is the equivalent of /

https://askubuntu.com/questions/9871...ubvolume-names
 
1 members found this post helpful.
  


Reply

Tags
fstab



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
btrfs root subvolume is inside the home subvolume and need to delete home subvol lemonade Slackware 3 10-29-2015 07:56 AM
NS2: Need of plain plain aodv.cc and aodv.h files chenil Linux - Software 1 07-10-2013 06:17 AM
ext4 vs btrfs, and with btrfs do I still need to use LVM? blue_k Linux - Software 4 08-17-2012 11:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration