On Mon, 2011-09-05 at 16:43 +0200, Björn Kalkbrenner wrote: > Hi Ilya, > > Am 05.09.2011 15:07, schrieb Ilya Dryomov: > > Well, it's *sort of* expected if you think about it. When you mounted > > after set-default, your /home is no longer a valid subvolume access > > point (it was in the default subvolume, until you rebooted). Inside > > your snapshot /home is just an empty directory (there's more to it, > > that's why you can't delete it, but that's irrelevant here). However > > if you mount with subvolid=<objectid>, you point to a subvolume > > directly, skipping the lookup (which leads to an empty dir if you are > > inside your snapshot). That's why it works when you use the subvolid. > > We should probably tune the lookup to make subvol= work in this case. > > Ah, thank you very much, that sounds logical with the lookup table and > the - not valid access point - BUT: > > Why could i still manually "mount -o subvol=home /dev/mapper/root /home" > and home was just empty but mounted (i looked at the mount table output)? > Shouldn't that give me an error that home can't be found in the lookup > table? This is actually because of how the subvolume mounting works internally. It turns out that currently, the command mount -o subvol=home /dev/mapper/root /home effectively does the same thing as mount /dev/mapper/root /home # Mount the "default" subvolume mount --bind /home/home /home # Switch to the "home" subvolume which of course succeeds if /home in your default subvolume is an empty directory. Hopefully this can be improved at some point :) -- Calvin Walton <calvin.walton@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
