Advertisement
Guest User

BRTFS in /var/lib/mythtv

a guest
Aug 29th, 2015
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.32 KB | None | 0 0
  1. [21:33] <danilin> kernel 3.19.I have a btrfs multi device filesystem: a /dev/sda5 on a msdos formatted SSD hard disk AND a /dev/sdb on a pendrive GPT formatted. My problem is with /etc/fstab, options device=/dev/sda5,device=/dev/sdb is th e only way I can make it work at reboot. UUID,PARTUUiD,dev=/dev/disk/by-id , anything I have tried make it impossible to reboot. I'm using mythbuntu 14,04,03. any help,idea? I was thinking to reinstall everything in SSD hard disk GPT,not msdos.
  2. [21:33] <darkling> You need to run btrfs dev scan before mounting the filesystem.
  3. [21:34] <darkling> If / is on that filesystem, you need an initramfs to do that from.
  4. [21:35] <darkling> If it's not the / filesystem, then installing the btrfs-progs package for your distribution (btrfs-tools on Debian/Ubuntu) should install the relevant hooks in udev to do the scan as each device is enumerated.
  5. [21:38] == XoCluTch [~xoclutch@50.194.189.222] has left #btrfs []
  6. [21:38] <danilin> well, it's working well when I put in /etc/fstab as options device=/dev/sda5,/device=/dev/sdb. but /dev/sdb is a pendrive, so if I move it it can become /dev/sdc, so I was trying to use another way to name it in /etc/fstab
  7. [21:39] <darkling> You've found the exact drawback of using device=
  8. [21:39] <darkling> The only way of solving this is to run btrfs dev scan.
  9. [21:41] == nemysis [~nemysis@freebsd/developer/pcbsd.nemysis] has joined #btrfs
  10. [21:41] == j12t [~j12t@c-107-3-142-14.hsd1.ca.comcast.net] has joined #btrfs
  11. [21:44] == hotpancakes [~hotpancak@cpe-74-71-35-100.nyc.res.rr.com] has joined #btrfs
  12. [21:44] <danilin> I suppose my distro run alone "btrfs dev scan" during boot, but It doesn't resolve the problem if /etc/fstab options are not as I said before. I have read here https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices about "All these options can also be set from the kernel command line, through root=/fstype=/rootflags=. "
  13. [21:45] == nemysis [~nemysis@freebsd/developer/pcbsd.nemysis] has quit [Max SendQ exceeded]
  14. [21:45] <danilin> may you explain better what does it mean "All these options can also be set from the kernel command line, through root=/fstype=/rootflags=. "
  15. [21:45] == pwcjr [~pwcjr@pool-71-191-70-13.washdc.fios.verizon.net] has joined #btrfs
  16. [21:46] <darkling> That's somewhat mangled.
  17. [21:47] <darkling> What it's saying is that if you're trying to mount a filesystem as / and want to pass mount parameters for that, you use rootflags=<parameters> on the kernel command line in your bootloader to pass them, instead of putting them in /etc/fstab.
  18. [21:48] <darkling> However, that still doesn't deal with the issue that your device names can change.
  19. [21:48] <darkling> Is this filesystem your root filesystem or not?
  20. [21:48] <danilin> not,it's not
  21. [21:48] == nemysis [~nemysis@respiratio.net] has joined #btrfs
  22. [21:48] == nemysis [~nemysis@respiratio.net] has quit [Changing host]
  23. [21:48] == nemysis [~nemysis@freebsd/developer/pcbsd.nemysis] has joined #btrfs
  24. [21:48] == hotpancakes [~hotpancak@cpe-74-71-35-100.nyc.res.rr.com] has quit [Ping timeout: 246 seconds]
  25. [21:48] <darkling> OK, so the rootflags= advice is irrelevant.
  26. [21:49] == obsrwr [~obsrwr@188.24.197.157] has quit [Ping timeout: 250 seconds]
  27. [21:49] == nemaeon [nemesis@gateway/shell/blinkenshell.org/x-iyqicbvvbneobmnf] has joined #btrfs
  28. [21:49] <darkling> You just have to ensure that btrfs dev scan is run, with all the devices present, before the FS is mounted.
  29. [21:50] <darkling> Most distributions will do this automatically through udev if their packaged btrfs-progs is installed.
  30. [21:50] == damentz [~damentz@cpe-70-123-148-14.austin.res.rr.com] has quit [Remote host closed the connection]
  31. [21:50] == j12t [~j12t@c-107-3-142-14.hsd1.ca.comcast.net] has quit [Ping timeout: 264 seconds]
  32. [21:52] <darkling> After the scan is run, you don't need to pass device= parameters to mount, and you'll be able to use LABEL= or UUID= in the first column of fstab to identify the filesystem to mount.
  33. [21:55] == Sebban [indigo176@gateway/shell/blinkenshell.org/x-dibspetmnnvdohkg] has joined #btrfs
  34. [21:56] == damentz [~damentz@cpe-70-123-148-14.austin.res.rr.com] has joined #btrfs
  35. [22:00] <danilin> Ok, mythbuntu 14.04.03 with 3.19 kernel , if I remove "device=" in /etc/fstab mythbuntu is unable to boot "an error occured while mounting /var/lib/mythtv" , udev is installed, btrfs-tool is installed. M to go manual, S to skip. If I manually mount it ,"mount /var/lib/mythtv" it works.
  36. [22:02] <darkling> In which case, it sounds like it's not installing appropriate hooks in the udev configuration.
  37. [22:04] <darkling> Either that, or it's not triggering the udev rules before trying to mount.
  38. [22:05] <darkling> I suppose it could be attempting to mount before all the devices have been scanned.
  39. [22:05] <darkling> I think you probably need to be having this conversation with the mythTV people.
  40. [22:05] <danilin> thanks for your help, a last question "where did I find btrfs command??" I can't find it /usr/bin and in /usr/sbin. I was thinking to add "btrsfs dev scan" when booting the xfce session.
  41. [22:05] == flips [~flips@yo.luminated.no] has left #btrfs ["bbl"]
  42. [22:06] <darkling> It'll depend on the distribution, but one of /usr/bin, /usr/sbin, /bin or /sbin would be most likely.
  43. [22:06] <danilin> ok thanks really
  44. [22:06] <darkling> Or just use "shich btrfs"
  45. [22:07] <darkling> Err.. "which btrfs"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement