Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EROFS on -t subvolume + --read-only #145

Closed
lucaswerkmeister opened this issue Sep 5, 2017 · 0 comments · Fixed by #496
Closed

EROFS on -t subvolume + --read-only #145

lucaswerkmeister opened this issue Sep 5, 2017 · 0 comments · Fixed by #496
Labels

Comments

@lucaswerkmeister
Copy link
Member

$ sudo mkosi -o /var/lib/machines/mkosi-bug -t subvolume --read-only
# ...
‣ Linking image file...                                                                                   
Traceback (most recent call last):                                                                        
  File "/usr/bin/mkosi", line 2764, in <module>                                                           
    main()                                                                                                
  File "/usr/bin/mkosi", line 2760, in main                                                               
    build_stuff(args)                                                                                     
  File "/usr/bin/mkosi", line 2723, in build_stuff                                                        
    tar.name if tar is not None else None)                                                                
  File "/usr/bin/mkosi", line 1668, in link_output                                                        
    os.rename(os.path.join(workspace, "root"), args.output)                                               
OSError: [Errno 30] Read-only file system: '/var/lib/machines/.mkosi-8t9ahlz_/root' -> '/var/lib/machines/mkosi-bug'                                                                                                 
Traceback (most recent call last):                                                                        
  File "/usr/lib/python3.6/weakref.py", line 624, in _exitfunc                                            
    f()                                                                                                   
  File "/usr/lib/python3.6/weakref.py", line 548, in __call__                                             
    return info.func(*info.args, **(info.kwargs or {}))                                                   
  File "/usr/lib/python3.6/tempfile.py", line 797, in _cleanup                                            
    _shutil.rmtree(name)                                                                                  
  File "/usr/lib/python3.6/shutil.py", line 480, in rmtree                                                
    _rmtree_safe_fd(fd, path, onerror)                                                                    
  File "/usr/lib/python3.6/shutil.py", line 418, in _rmtree_safe_fd                                       
    _rmtree_safe_fd(dirfd, fullname, onerror)                                                             
  File "/usr/lib/python3.6/shutil.py", line 422, in _rmtree_safe_fd                                       
    onerror(os.rmdir, fullname, sys.exc_info())                                                           
  File "/usr/lib/python3.6/shutil.py", line 420, in _rmtree_safe_fd                                       
    os.rmdir(name, dir_fd=topfd)                                                                          
OSError: [Errno 30] Read-only file system: 'home'                                                         

sudo mv /var/lib/machines/.mkosi-8t9ahlz_/root /var/lib/machines/mkosi-bug produces the same error message, so it looks like it’s illegal to move a subvolume .mkosi-* which itself has submodules (home is apparently the first one, hence the last line of the stack trace). But I’m not entirely sure what’s going on here, so don’t trust my analysis too much :)

DaanDeMeyer added a commit to DaanDeMeyer/mkosi that referenced this issue Aug 8, 2020
DaanDeMeyer added a commit to DaanDeMeyer/mkosi that referenced this issue Aug 8, 2020
DaanDeMeyer added a commit that referenced this issue Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant