* How to get Btrfs on 2nd partition of USB HDD to automount as read/write
@ 2012-08-19 19:51 dg1727
2012-08-19 20:05 ` C Anthony Risinger
2012-08-19 20:10 ` Hugo Mills
0 siblings, 2 replies; 6+ messages in thread
From: dg1727 @ 2012-08-19 19:51 UTC (permalink / raw)
To: linux-btrfs
Hello,
The question below is based on
https://lists.ubuntu.com/archives/xubuntu-users/2012-
August/004509.html
Thanks in advance for any help with the following question,
including pointing me to some other info resource if needed.
I have a user with an Xubuntu 12.04.1 laptop, 32-bit. He needs to
use a USB hard disk drive which has 2 partitions: the 1st
partition is NTFS and the 2nd partition is Btrfs.
When he plugs in the hard drive, both partitions auto-mount OK,
except that the Btrfs partition automounts read-only. That is, the
permissions of the directories in /dev are drwx------ for the NTFS
and dr-xr-xr-x for the Btrfs.
How can the OS be set up so that the Btrfs will automount
read/write?
The "dmesg" command shows the following on plug-in of the drive:
[ 7253.520087] usb 2-4: new high-speed USB device number 11 using
ehci_hcd
[ 7253.656344] scsi11 : usb-storage 2-4:1.0
[ 7256.651677] scsi 11:0:0:0: Direct-Access TOSHIBA External
USB 3.0 0001 PQ: 0 ANSI: 6
[ 7256.654722] sd 11:0:0:0: Attached scsi generic sg2 type 0
[ 7256.656970] sd 11:0:0:0: [sdb] 1465149168 512-byte logical
blocks: (750 GB/698 GiB)
[ 7256.660515] sd 11:0:0:0: [sdb] Write Protect is off
[ 7256.660534] sd 11:0:0:0: [sdb] Mode Sense: 1f 00 00 08
[ 7256.662509] sd 11:0:0:0: [sdb] No Caching mode page present
[ 7256.662523] sd 11:0:0:0: [sdb] Assuming drive cache: write
through
[ 7256.668478] sd 11:0:0:0: [sdb] No Caching mode page present
[ 7256.668498] sd 11:0:0:0: [sdb] Assuming drive cache: write
through
[ 7256.673838] sdb: sdb1 sdb2
[ 7256.681474] sd 11:0:0:0: [sdb] No Caching mode page present
[ 7256.681493] sd 11:0:0:0: [sdb] Assuming drive cache: write
through
[ 7256.681507] sd 11:0:0:0: [sdb] Attached SCSI disk
[ 7257.545702] device label partition_label devid 1 transid 19
/dev/sdb2
[ 7257.546790] btrfs: disk space caching is enabled
Neither the "usbmount" nor "pmount" packages are installed, but
"thunar-volman" is installed. I did install "pmount" only to find
that it appears to be meant to be invoked manually, so I un-
installed it again.
"uname -rv" reports:
3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:04:05 UTC 2012
The "groups" command shows that the user is a member of the
following (in addition to a group named after his username):
adm dialout fax cdrom floppy tape sudo dip video plugdev fuse
lpadmin sambashare
The "mount" command shows for the Btrfs partition in question:
/dev/sdb2 on /media/[partition_label] type btrfs
(rw,nosuid,nodev,uhelper=udisks)
(I have substituted [partition_label] for the partition label,
which is all letters, no punctuation marks.)
Because "mount" shows "rw", does that mean that it is the
configuration of Btrfs, not the configuration of automounting, that
is at issue?
Thanks again for any suggestions.
-dg1727
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to get Btrfs on 2nd partition of USB HDD to automount as read/write
2012-08-19 19:51 How to get Btrfs on 2nd partition of USB HDD to automount as read/write dg1727
@ 2012-08-19 20:05 ` C Anthony Risinger
2012-08-21 15:36 ` David Sterba
2012-08-19 20:10 ` Hugo Mills
1 sibling, 1 reply; 6+ messages in thread
From: C Anthony Risinger @ 2012-08-19 20:05 UTC (permalink / raw)
To: dg1727; +Cc: linux-btrfs
On Sun, Aug 19, 2012 at 2:51 PM, dg1727 <dg1727@hushmail.com> wrote:
>
> permissions of the directories in /dev are drwx------ for the NTFS
> and dr-xr-xr-x for the Btrfs.
>
> How can the OS be set up so that the Btrfs will automount
> read/write?
try:
chmod u+w /path/to/btrfs/mount
... for whatever reason mkfs.btrfs created new subvolumes (but not
snapshots!) with 555 perms, which essentially says "writable to nobody
at all" ... IIRC, this was changed within the last year or so.
--
C Anthony
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to get Btrfs on 2nd partition of USB HDD to automount as read/write
2012-08-19 19:51 How to get Btrfs on 2nd partition of USB HDD to automount as read/write dg1727
2012-08-19 20:05 ` C Anthony Risinger
@ 2012-08-19 20:10 ` Hugo Mills
1 sibling, 0 replies; 6+ messages in thread
From: Hugo Mills @ 2012-08-19 20:10 UTC (permalink / raw)
To: dg1727; +Cc: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]
On Sun, Aug 19, 2012 at 03:51:47PM -0400, dg1727 wrote:
> Hello,
>
> The question below is based on
> https://lists.ubuntu.com/archives/xubuntu-users/2012-
> August/004509.html
>
> Thanks in advance for any help with the following question,
> including pointing me to some other info resource if needed.
>
> I have a user with an Xubuntu 12.04.1 laptop, 32-bit. He needs to
> use a USB hard disk drive which has 2 partitions: the 1st
> partition is NTFS and the 2nd partition is Btrfs.
>
> When he plugs in the hard drive, both partitions auto-mount OK,
> except that the Btrfs partition automounts read-only. That is, the
> permissions of the directories in /dev are drwx------ for the NTFS
> and dr-xr-xr-x for the Btrfs.
>
> How can the OS be set up so that the Btrfs will automount
> read/write?
As Anthony points out, this is a property of the filesystem, not
the OS or the mount options. Just use chmod.
(It's only filesystems like FAT, which have no concept of
permissions, which have mount options to set permissions)
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
--- Two things came out of Berkeley in the 1960s: LSD and Unix. ---
This is not a coincidence.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to get Btrfs on 2nd partition of USB HDD to automount as read/write
2012-08-19 20:05 ` C Anthony Risinger
@ 2012-08-21 15:36 ` David Sterba
2012-08-21 19:28 ` dg1727
0 siblings, 1 reply; 6+ messages in thread
From: David Sterba @ 2012-08-21 15:36 UTC (permalink / raw)
To: C Anthony Risinger; +Cc: dg1727, linux-btrfs
On Sun, Aug 19, 2012 at 03:05:11PM -0500, C Anthony Risinger wrote:
> On Sun, Aug 19, 2012 at 2:51 PM, dg1727 <dg1727@hushmail.com> wrote:
> > permissions of the directories in /dev are drwx------ for the NTFS
> > and dr-xr-xr-x for the Btrfs.
> >
> > How can the OS be set up so that the Btrfs will automount
> > read/write?
>
> try:
>
> chmod u+w /path/to/btrfs/mount
>
> ... for whatever reason mkfs.btrfs created new subvolumes (but not
> snapshots!) with 555 perms, which essentially says "writable to nobody
> at all" ... IIRC, this was changed within the last year or so.
The issue with subvols pemr 0700 was indeed fixed, on the kernel side.
The problem with missing 'w' (ie mode 555) on a freshly mkfs'ed image is
still present and it's the user-space tools (mkfs) proble. Patch has
been sent some time ago
http://www.spinics.net/lists/linux-btrfs/msg17909.html
The workaround is to chmod as you suggested and is permanent once done.
david
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to get Btrfs on 2nd partition of USB HDD to automount as read/write
2012-08-21 15:36 ` David Sterba
@ 2012-08-21 19:28 ` dg1727
2012-08-22 14:40 ` David Sterba
0 siblings, 1 reply; 6+ messages in thread
From: dg1727 @ 2012-08-21 19:28 UTC (permalink / raw)
To: dave, linux-btrfs
On Tue, 21 Aug 2012 11:36:32 -0400 David Sterba <dave@jikos.cz>
wrote:
>On Sun, Aug 19, 2012 at 03:05:11PM -0500, C Anthony Risinger
>wrote:
>> On Sun, Aug 19, 2012 at 2:51 PM, dg1727 <dg1727@hushmail.com>
>> wrote:
>> > permissions of the directories in /dev are drwx------ for the
>> > NTFS and dr-xr-xr-x for the Btrfs.
>> >
>> > How can the OS be set up so that the Btrfs will automount
>> > read/write?
>>
>> try:
>>
>> chmod u+w /path/to/btrfs/mount
>>
>> ... for whatever reason mkfs.btrfs created new subvolumes (but
>> not snapshots!) with 555 perms, which essentially says "writable
>> to nobody at all" ... IIRC, this was changed within the last
>> year or so.
>
>The issue with subvols pemr 0700 was indeed fixed, on the kernel
>side.
>
>The problem with missing 'w' (ie mode 555) on a freshly mkfs'ed
>image is still present and it's the user-space tools (mkfs)
>proble. Patch has been sent some time ago
>
>http://www.spinics.net/lists/linux-btrfs/msg17909.html
>
>The workaround is to chmod as you suggested and is permanent once
>done.
Thanks a lot for these answers. As an exercise, how would I track
that patch so I can tell when it has been released? Pointing me to
a webpage that covers this would be fine.
-dg1727
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to get Btrfs on 2nd partition of USB HDD to automount as read/write
2012-08-21 19:28 ` dg1727
@ 2012-08-22 14:40 ` David Sterba
0 siblings, 0 replies; 6+ messages in thread
From: David Sterba @ 2012-08-22 14:40 UTC (permalink / raw)
To: dg1727; +Cc: dave, linux-btrfs
On Tue, Aug 21, 2012 at 03:28:22PM -0400, dg1727 wrote:
> Thanks a lot for these answers. As an exercise, how would I track
> that patch so I can tell when it has been released? Pointing me to
> a webpage that covers this would be fine.
You can easily check that the patch appears in the main progs repo at
http://git.kernel.org/?p=linux/kernel/git/mason/btrfs-progs.git;a=summary
or you can clone the repo and check the git log directly.
david
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-08-22 14:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-19 19:51 How to get Btrfs on 2nd partition of USB HDD to automount as read/write dg1727
2012-08-19 20:05 ` C Anthony Risinger
2012-08-21 15:36 ` David Sterba
2012-08-21 19:28 ` dg1727
2012-08-22 14:40 ` David Sterba
2012-08-19 20:10 ` Hugo Mills
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).