Comments (3)
@vojtechtrefny would it be possible to write up a few blivet
steps that would simulate what anaconda
is doing? So far I was not able to figure this out myself from looking at the blivet
and anaconda
code. Some simple thing I tried:
import blivet
dt = blivet.devicetree.DeviceTree()
dt.populate()
sda2 = dt.get_device_by_name("sda2")
BTRFS = blivet.formats.get_format('btrfs', exists=True)
btrfsroot = blivet.devices.btrfs.BTRFSDevice(parents=sda2, exists=True, fmt=BTRFS, uuid='17988bd4-4ad9-49c9-9cc7-73110966d8ab')
vol = blivet.devices.btrfs.BTRFSVolumeDevice(parents=btrfsroot, exists=True, fmt=BTRFS, uuid='17988bd4-4ad9-49c9-9cc7-73110966d8ab')
But this doesn't exactly do things that anaconda
is doing. Anaconda is looking at all subvolumes. How does it do that? Because I think that there is where it goes wrong. Anaconda is creating BTRFSSubVolumeDevice
instances in the wrong order. It hits a child subvol before it has seen the parent.
from blivet.
import blivet
blivet.flags.flags.auto_dev_updates = True
b = blivet.Blivet()
b.reset()
Setting the auto_dev_updates
to True
is the key here -- by default blivet doesn't mount btrfs volumes to get the list of subvolumes (we don't want to mount random devices when running outside the installer environment). So with the flag set you should see all the subvolumes in the devicetree (or in your case, reset
will probably crash), you can then use print(b.devicetree)
for a simple device tree visualization.
from blivet.
Thanks for the tip. Unfortunately (if you can call it that) the problem has gone away. I'll close this issue for now and reopen it when it happens again.
from blivet.
Related Issues (20)
- 3.4.3: pep517 based build and instyall places files in incorrect locations HOT 1
- Determine CPU architecture & choose appropriate algorithm for BTRFS partitions
- Please add f2fs multi-drive support
- Debian Testing 6.0.8-1 : Failed to init blivet: None of ext4,xfs,ext3,ext2 is supported by your kernel HOT 6
- Hardware without AES-NI: use xchacha12/Adiantum instead of AES-XTS HOT 12
- if the file system is damaged, resize2fs may get stuck
- DeviceTree.resolve_device() returns a btrfs volume even in case reqested subvolume is not found
- Cannot install F38 on efi macs ( "macefi" vs "efi" issue ) HOT 1
- Improve performance and achieve interim solution for #1108 : Change default from AES256 to AES128 (or SHA256 to SHA512) HOT 2
- Logging to `/tmp/lvm.log` without cleanup HOT 1
- Data and Metadata RAID level not set for existing btrfs volumes
- Very slow start HOT 2
- Blivet crashes when unlocking raid on LUKS devices
- Add tests with encrypted RAID
- unset uuid nvmes, '00000000-0000-0000-0000-000000000000' will raise DuplicateUUIDError HOT 8
- Blivet aborted due to unable to handle Veritas DMP devices.
- bcachefs support HOT 1
- Error encountered while detecting Mac Intel devices HOT 1
- Get filesystem size and free space from udev when possible
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blivet.