OK, this is from inside a shell. I have a btrfs volume or a btrfs subvolume on some arbitrary mount mount. Is there some way to tell if it is a btrfs volume or a btrfs subvolume that is mounted? Comment: It sure would be nice if the btrfs man page corresponded better to the btrfs code. Example, the man page says there is a "btrfs subvolume show" command. The code disagrees and so does "btrfs --help" Gene -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Dec 27, 2012 at 09:29:37AM -0500, Gene Czarcinski wrote:> OK, this is from inside a shell. I have a btrfs volume or a btrfs > subvolume on some arbitrary mount mount. Is there some way to tell > if it is a btrfs volume or a btrfs subvolume that is mounted?<nitpick> It''s always a subvolume, even if you''ve mounted the top-level subvolume (which has subvolid=5). </nipick> Right now, no, there isn''t any way of telling which subvolume is mounted at a given location. I think that someone has been working on it (David?), but I don''t think the patches have seen the light of day yet.> Comment: It sure would be nice if the btrfs man page corresponded > better to the btrfs code. Example, the man page says there is a > "btrfs subvolume show" command. The code disagrees and so does > "btrfs --help"The man page doesn''t have that in it on my system. Are you running with an ancient btrfs-progs installation? (Any distribution package with a date before the end of March 2012 is definitely ancient -- there''s still some of them out there). Hugo. -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk == PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- We don''t just borrow words; on occasion, English has pursued --- other languages down alleyways to beat them unconscious and rifle their pockets for new vocabulary.
On Dec 27, 2012, at 7:29 AM, Gene Czarcinski <gene@czarc.net> wrote:> OK, this is from inside a shell. I have a btrfs volume or a btrfs subvolume on some arbitrary mount mount. Is there some way to tell if it is a btrfs volume or a btrfs subvolume that is mounted?cat /proc/self/mountinfo | grep btrfs That will show you what subvol is mounted and where, subvol is the 4th column, mountpoint is the fifth. Chris Murphy -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Le 27/12/2012 16:03, Hugo Mills a écrit :> Right now, no, there isn''t any way of telling which subvolume is > mounted at a given location.Er... Check "subvol=" here... root@tethys:/# mount | grep btrfs /dev/mapper/VG1-BTR_POOL on / type btrfs (rw,relatime,subvol=UBUNTU/@,autodefrag,compress=lzo) /dev/mapper/VG1-BTR_POOL on /tmp type btrfs (rw,relatime,subvol=UBUNTU/@tmp,compress=lzo) /dev/sda2 on /boot type btrfs (rw,relatime,subvol=UBUNTU/@boot,autodefrag) /dev/mapper/VG1-BTR_POOL on /home type btrfs (rw,relatime,subvol=UBUNTU/@home,autodefrag,compress=lzo) /dev/mapper/VG1-BTR_POOL on /storage type btrfs (rw,relatime,subvol=STORAGE,autodefrag,compress=lzo) /dev/mapper/VG1-BTR_POOL on /data/BIG type btrfs (rw,noatime,subvol=DATA/BIG,compress=lzo) -- Swâmi Petaramesh <swami@petaramesh.org> http://petaramesh.org PGP 9076E32E Ne cherchez pas : Je ne suis pas sur Facebook. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Dec 27, 2012, at 9:47 AM, Swâmi Petaramesh <swami@petaramesh.org> wrote:> Le 27/12/2012 16:03, Hugo Mills a écrit : >> Right now, no, there isn''t any way of telling which subvolume is >> mounted at a given location. > > Er... Check "subvol=" here... > > root@tethys:/# mount | grep btrfs > /dev/mapper/VG1-BTR_POOL on / type btrfs > (rw,relatime,subvol=UBUNTU/@,autodefrag,compress=lzo) > /dev/mapper/VG1-BTR_POOL on /tmp type btrfs > (rw,relatime,subvol=UBUNTU/@tmp,compress=lzo) > /dev/sda2 on /boot type btrfs (rw,relatime,subvol=UBUNTU/@boot,autodefrag) > /dev/mapper/VG1-BTR_POOL on /home type btrfs > (rw,relatime,subvol=UBUNTU/@home,autodefrag,compress=lzo) > /dev/mapper/VG1-BTR_POOL on /storage type btrfs > (rw,relatime,subvol=STORAGE,autodefrag,compress=lzo) > /dev/mapper/VG1-BTR_POOL on /data/BIG type btrfs > (rw,noatime,subvol=DATA/BIG,compress=lzo)That would only seem to work with btrfs on LVM which I''d think is uncommon and complicated. Chris Murphy-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/27/2012 11:07 AM, Chris Murphy wrote:> On Dec 27, 2012, at 7:29 AM, Gene Czarcinski <gene@czarc.net> wrote: > >> OK, this is from inside a shell. I have a btrfs volume or a btrfs subvolume on some arbitrary mount mount. Is there some way to tell if it is a btrfs volume or a btrfs subvolume that is mounted? > cat /proc/self/mountinfo | grep btrfs > > That will show you what subvol is mounted and where, subvol is the 4th column, mountpoint is the fifth.Thank you. That is just what I needed. Gene -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Dec 27, 2012, at 10:04 AM, Swâmi Petaramesh <swami@petaramesh.org> wrote:> Le 27/12/2012 17:55, Chris Murphy a écrit : >>> /dev/sda2 on /boot type btrfs (rw,relatime,subvol=UBUNTU/ >>> @boot,autodefrag) >>> >>> >> That would only seem to work with btrfs on LVM which I''d think is uncommon and complicated. >> >> > > Check the sda2 entry, this one is no LVM…For whatever reason, our mount command behaviors differ. When I use mount, I do not get a subvol entry at all in parenthesis like you are. I can only see this information in /proc/self/mountinfo. Chris Murphy-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/27/2012 11:55 AM, Chris Murphy wrote:> On Dec 27, 2012, at 9:47 AM, Swâmi Petaramesh <swami@petaramesh.org> wrote: > >> Le 27/12/2012 16:03, Hugo Mills a écrit : >>> Right now, no, there isn''t any way of telling which subvolume is >>> mounted at a given location. >> Er... Check "subvol=" here... >> >> root@tethys:/# mount | grep btrfs >> /dev/mapper/VG1-BTR_POOL on / type btrfs >> (rw,relatime,subvol=UBUNTU/@,autodefrag,compress=lzo) >> /dev/mapper/VG1-BTR_POOL on /tmp type btrfs >> (rw,relatime,subvol=UBUNTU/@tmp,compress=lzo) >> /dev/sda2 on /boot type btrfs (rw,relatime,subvol=UBUNTU/@boot,autodefrag) >> /dev/mapper/VG1-BTR_POOL on /home type btrfs >> (rw,relatime,subvol=UBUNTU/@home,autodefrag,compress=lzo) >> /dev/mapper/VG1-BTR_POOL on /storage type btrfs >> (rw,relatime,subvol=STORAGE,autodefrag,compress=lzo) >> /dev/mapper/VG1-BTR_POOL on /data/BIG type btrfs >> (rw,noatime,subvol=DATA/BIG,compress=lzo) > > That would only seem to work with btrfs on LVM which I''d think is uncommon and complicated. >Oh thanks for that little reminder that you can put btrfs on an LV. I am trying to see if I can get grub2 and os-prober to handle btrfs. There are a couple of patches out there but they do little if anything. The btrfs volumes and subvolumes are "not your father''s filesystem" 8-) I have a little of what is needed working but, the more I look at things, the more it looks like some real kludgy hack is going to be needed to have something which works with /dev/<whatever> to now use UUID=xxx,subvol=name Gene -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Le 27/12/2012 20:25, Chris Murphy a écrit :> For whatever reason, our mount command behaviors differ. When I use mount, I do not get a subvol entry at all in parenthesis like you are. I can only see this information in /proc/self/mountinfo.I get this on vanilla Ubuntu 12.10 Quantal... -- Swâmi Petaramesh <swami@petaramesh.org> http://petaramesh.org PGP 9076E32E Ne cherchez pas : Je ne suis pas sur Facebook. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Le 27/12/2012 20:27, Gene Czarcinski a écrit :> Oh thanks for that little reminder that you can put btrfs on an LV.That''s an installation over a LUKS-encrypted LVM for everything except for /boot, which lies on a separate "ordinary" partition... -- Swâmi Petaramesh <swami@petaramesh.org> http://petaramesh.org PGP 9076E32E Ne cherchez pas : Je ne suis pas sur Facebook. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Dec 27, 2012, at 12:27 PM, Swâmi Petaramesh <swami@petaramesh.org> wrote:> Le 27/12/2012 20:25, Chris Murphy a écrit : >> For whatever reason, our mount command behaviors differ. When I use mount, I do not get a subvol entry at all in parenthesis like you are. I can only see this information in /proc/self/mountinfo. > > I get this on vanilla Ubuntu 12.10 Quantal…I have util-linux 2.22.1 and libmount 2.22.0, what about you? Chris Murphy-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Dec 27, 2012, at 12:27 PM, Gene Czarcinski <gene@czarc.net> wrote:> Oh thanks for that little reminder that you can put btrfs on an LV.I find it''s more trouble than it''s worth. It doesn''t bring much to the table.> I am trying to see if I can get grub2 and os-prober to handle btrfs. There are a couple of patches out there but they do little if anything. The btrfs volumes and subvolumes are "not your father''s filesystem" 8-)grub2-2.00-12 and -13 in F18 do this correctly already, and automatically. GRUB2 depends on /etc/fstab being properly formed, i.e. includes the proper mount option subvol= in order to know how to create the correct core.img, which has the backed in prefix for grub modules, and also how to create the correct grub.cfg. Unfortunately subvolid= does not work with GRUB2 presently.> I have a little of what is needed working but, the more I look at things, the more it looks like some real kludgy hack is going to be needed to have something which works with /dev/<whatever> to now use UUID=xxx,subvol=nameYes, but if you''re using Fedora 18, it does this correctly for you. Chris Murphy-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Le 27/12/2012 20:35, Chris Murphy a écrit :> On Dec 27, 2012, at 12:27 PM, Swâmi Petaramesh <swami@petaramesh.org> wrote: > >> Le 27/12/2012 20:25, Chris Murphy a écrit : >>> For whatever reason, our mount command behaviors differ. When I use mount, I do not get a subvol entry at all in parenthesis like you are. I can only see this information in /proc/self/mountinfo. >> I get this on vanilla Ubuntu 12.10 Quantal… > I have util-linux 2.22.1 and libmount 2.22.0, what about you? > ># dpkg -s util-linux Package: util-linux [...] Architecture: amd64 Multi-Arch: foreign Version: 2.20.1-5.1ubuntu2 # dpkg -s libmount1 Package: libmount1 [...] Architecture: amd64 Multi-Arch: same Source: util-linux Version: 2.20.1-5.1ubuntu2 -- Swâmi Petaramesh <swami@petaramesh.org> http://petaramesh.org PGP 9076E32E Ne cherchez pas : Je ne suis pas sur Facebook. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Dec 27, 2012 at 02:14:43PM -0500, Gene Czarcinski wrote:> On 12/27/2012 11:07 AM, Chris Murphy wrote: > >On Dec 27, 2012, at 7:29 AM, Gene Czarcinski <gene@czarc.net> wrote: > > > >>OK, this is from inside a shell. I have a btrfs volume or a btrfs subvolume on some arbitrary mount mount. Is there some way to tell if it is a btrfs volume or a btrfs subvolume that is mounted? > >cat /proc/self/mountinfo | grep btrfs > > > >That will show you what subvol is mounted and where, subvol is the 4th column, mountpoint is the fifth. > Thank you. That is just what I needed.Please note that the value of 4th column does not reflect the default subvolume. $ [mkfs] $ [mount && cd] $ btrfs subvol create subv1 && touch subv1/.subv1 $ btrfs subvol set-default 256 . $ cat /proc/self/mountinfo 30 21 0:19 / /mnt/test rw,relatime - btrfs /dev/loop2 rw,space_cache $ [umount] $ mount /dev/sdx mnt && cd mnt $ ls .subv1 $ cat /proc/self/mountinfo 30 21 0:19 / /mnt/test rw,relatime - btrfs /dev/loop2 rw,space_cache both say ''/'' while the subvolume mounted is different. There are some unresolved technical obstacles, so this is not yet implemented and I''m not aware of a workaround. david -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 28 Dec 2012, Chris Murphy <lists@colorremedies.com> wrote:> On Dec 27, 2012, at 12:27 PM, Gene Czarcinski <gene@czarc.net> wrote: > > Oh thanks for that little reminder that you can put btrfs on an LV. > > I find it''s more trouble than it''s worth. It doesn''t bring much to the > table.I''ve tried using LVM and BTRFS together. While they work the combination doesn''t seem to offer much benefit. LVM is good for snapshots (which BTRFS does better) and also for dividing a device that is larger than your filesystem can properly support (also not a problem for BTRFS). http://etbe.coker.com.au/2012/12/17/using-btrfs/ At the above URL I''ve documented some of the things I''m currently doing with BTRFS in production. I''m still considering what''s the best way of managing virtual machines. My current method is to run a server with two disks that have separate LVM VGs and give each VM a pair of block devices to run BTRFS RAID-1. The other option I''m considering is a single BTRFS RAID-1 taking all disk space and giving each VM a single block device that''s a file on the BTRFS filesystem. Presumably that will give a significant performance hit because of double filesystem overhead but will make management a little easier and possibly reduce seeks when multiple VMs are writing to disk. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/ -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Dec 27, 2012, at 5:34 PM, Russell Coker <russell@coker.com.au> wrote:> On Fri, 28 Dec 2012, Chris Murphy <lists@colorremedies.com> wrote: >> On Dec 27, 2012, at 12:27 PM, Gene Czarcinski <gene@czarc.net> wrote: >>> Oh thanks for that little reminder that you can put btrfs on an LV. >> >> I find it''s more trouble than it''s worth. It doesn''t bring much to the >> table. > > I''ve tried using LVM and BTRFS together. While they work the combination > doesn''t seem to offer much benefit. LVM is good for snapshots (which BTRFS does > better) and also for dividing a device that is larger than your filesystem can > properly support (also not a problem for BTRFS). > > http://etbe.coker.com.au/2012/12/17/using-btrfs/ > > At the above URL I''ve documented some of the things I''m currently doing with > BTRFS in production. I''m still considering what''s the best way of managing > virtual machines. My current method is to run a server with two disks that > have separate LVM VGs and give each VM a pair of block devices to run BTRFS > RAID-1. > > The other option I''m considering is a single BTRFS RAID-1 taking all disk > space and giving each VM a single block device that''s a file on the BTRFS > filesystem. Presumably that will give a significant performance hit because of > double filesystem overhead but will make management a little easier and > possibly reduce seeks when multiple VMs are writing to disk.What the VMs are doing makes a big difference. But in any case you''d need to benchmark the various configurations that are possible. Off hand it seems to be better to have the host running the more complex/capable file system, in this case btrfs on whole drives. And then the guests write to a file, with a simpler file system like ext4, and optionally disable journaling. For a handful of VMs that aren''t doing heavy writes, then either dedicated partitions or LVs (in effect the same thing), is probably OK. But I suspect as you get busier VMs, or add more VMs, this will not scale. You''ll quickly get too much disk contention, VM''s demanding their own disk region is being written to NOW and will simply slow down while they wait for the disk to handle the request. Whereas if you have the VM guests use ext4 (optionally disable journaling) to a file, either XFS or Btrfs will aggregate those requests much more efficiently than individual VMs can. But still needs to be tested. Chris Murphy-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html