* how to properly mount an external usb hard drive & other questions
@ 2014-01-05 4:34 dhan.war
2014-01-05 17:43 ` Justus Seifert
0 siblings, 1 reply; 5+ messages in thread
From: dhan.war @ 2014-01-05 4:34 UTC (permalink / raw)
To: linux-btrfs
hi all
i am using up to date debian sid with xfce desktop environment. i am
using Linux 3.13-rc6-amd64 #1 SMP Debian 3.13~rc6-1~exp1 (2013-12-30)
x86_64 GNU/Linux from experimental.
i have installed usbmount to auto mount all the devices connected
through USB.
[cmd# 1] i have created btrfs partition on my external USB hard drive
using the following command :
# mkfs.btrfs -f -L btrfs -m single /dev/sdc
Turning ON incompat feature 'extref': increased hardlink limit per file
to 65536
fs created label btrfs on /dev/sdc
nodesize 16384 leafsize 16384 sectorsize 4096 size 931.51GiB
Btrfs v3.12
[cmd# 2] my permissions of the device :
# ls -l /dev/sdc
brw-rw---- 1 root floppy 8, 32 Jan 5 09:47 /dev/sdc
my questions :
[a] does the partition created by me is appropriate ?
[b] how do i specify lzo compression in fstab ? last time when i tried
to create entry fstab it is complaining about the auto mounting of the
device by automount.
[c] what compression method is used by btrfs by default for the
partitions created using the command mentioned above. [ cmd# 1]
[d] does the file permissions for my device are accurate ? [ cmd# 2]
[e] what is the appropriate fstab entry for my device ? [ i don't want
to remove usbmount].
[f] should i use single or dup for the device ?
please provide suggestions for configuring my device appropriately.
thank you for reading the message patiently.
please alway cc me.
regards,
wardhan.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to properly mount an external usb hard drive & other questions
2014-01-05 4:34 how to properly mount an external usb hard drive & other questions dhan.war
@ 2014-01-05 17:43 ` Justus Seifert
2014-01-05 17:50 ` Justus Seifert
0 siblings, 1 reply; 5+ messages in thread
From: Justus Seifert @ 2014-01-05 17:43 UTC (permalink / raw)
To: linux-btrfs; +Cc: dhan.war
[-- Attachment #1.1: Type: text/plain, Size: 2331 bytes --]
On 05.01.2014 05:34, dhan.war wrote:
> hi all
>
> i am using up to date debian sid with xfce desktop environment. i am
> using Linux 3.13-rc6-amd64 #1 SMP Debian 3.13~rc6-1~exp1 (2013-12-30)
> x86_64 GNU/Linux from experimental.
> i have installed usbmount to auto mount all the devices connected
> through USB.
>
> [cmd# 1] i have created btrfs partition on my external USB hard drive
> using the following command :
>
> # mkfs.btrfs -f -L btrfs -m single /dev/sdc
> Turning ON incompat feature 'extref': increased hardlink limit per file
> to 65536
> fs created label btrfs on /dev/sdc
> nodesize 16384 leafsize 16384 sectorsize 4096 size 931.51GiB
> Btrfs v3.12
>
> [cmd# 2] my permissions of the device :
> # ls -l /dev/sdc
> brw-rw---- 1 root floppy 8, 32 Jan 5 09:47 /dev/sdc
>
> my questions :
> [a] does the partition created by me is appropriate ?
it seems ok
> [b] how do i specify lzo compression in fstab ? last time when i tried
> to create entry fstab it is complaining about the auto mounting of the
> device by automount.
if you dont want the partition to be mounted with the fstab during boot
then you should add "noauto" to the list of options in the respective
fstab line.
> [c] what compression method is used by btrfs by default for the
> partitions created using the command mentioned above. [ cmd# 1]
none. if you order mount to use compression without spezifieng the
algo, it will use zlib (thats like gz). if you do not use the option
"compression" then it will not compress new files.
> [d] does the file permissions for my device are accurate ? [ cmd# 2]
i dont know. are you member of the group floppy? what is the purpose
of the group floppy on your machine? what users are members of the
group floppy?
> [e] what is the appropriate fstab entry for my device ? [ i don't want
> to remove usbmount].
/dev/sdc /path/to/your/favorite/mountpoint/that/has/to/exist/already
btrfs compress,noauto 0 0
> [f] should i use single or dup for the device ?
maybe use single
>
> please provide suggestions for configuring my device appropriately.
> thank you for reading the message patiently.
>
> please alway cc me.
>
> regards,
> wardhan.
i tried to keep it short. feel free to ask for more.
cheers
justus
[-- Attachment #1.2: justus_seifert.vcf --]
[-- Type: text/x-vcard, Size: 206 bytes --]
begin:vcard
fn:Justus Seifert
n:Seifert;Justus
adr:;;;Dresden;Saxony;;Germany
email;internet:justus.seifert@dergleichrichter.de
tel;cell:+4915730640509
x-mozilla-html:FALSE
version:2.1
end:vcard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to properly mount an external usb hard drive & other questions
2014-01-05 17:43 ` Justus Seifert
@ 2014-01-05 17:50 ` Justus Seifert
2014-01-05 18:02 ` Jim Salter
0 siblings, 1 reply; 5+ messages in thread
From: Justus Seifert @ 2014-01-05 17:50 UTC (permalink / raw)
To: linux-btrfs; +Cc: dhan.war
[-- Attachment #1.1: Type: text/plain, Size: 896 bytes --]
On 05.01.2014 18:43, Justus Seifert wrote:
> On 05.01.2014 05:34, dhan.war wrote:
>> hi all
>>
>> i am using up to date debian sid with xfce desktop environment. i am
>> using Linux 3.13-rc6-amd64 #1 SMP Debian 3.13~rc6-1~exp1 (2013-12-30)
>> x86_64 GNU/Linux from experimental.
>> i have installed usbmount to auto mount all the devices connected
>> through USB.
>> […]
>>
>> [e] what is the appropriate fstab entry for my device ? [ i don't want
>> to remove usbmount].
>
> /dev/sdc /path/to/your/favorite/mountpoint/that/has/to/exist/already
> btrfs compress,noauto 0 0
oh i forgot: if you want to mount it without su privileges you have to use:
/dev/sdc /path/to/your/favorite/mountpoint compress,noauto,users,user 0 0
also look into subvolume mounting with "subvol=myfirstsubvolume" in your
list of mount options, if you want to do cool stuff with subvolumes.
[-- Attachment #1.2: justus_seifert.vcf --]
[-- Type: text/x-vcard, Size: 206 bytes --]
begin:vcard
fn:Justus Seifert
n:Seifert;Justus
adr:;;;Dresden;Saxony;;Germany
email;internet:justus.seifert@dergleichrichter.de
tel;cell:+4915730640509
x-mozilla-html:FALSE
version:2.1
end:vcard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to properly mount an external usb hard drive & other questions
2014-01-05 17:50 ` Justus Seifert
@ 2014-01-05 18:02 ` Jim Salter
2014-01-05 18:09 ` Jim Salter
0 siblings, 1 reply; 5+ messages in thread
From: Jim Salter @ 2014-01-05 18:02 UTC (permalink / raw)
To: linux-btrfs, dhan.war
On 01/05/2014 12:50 PM, Justus Seifert wrote:
> oh i forgot: if you want to mount it without su privileges you have to
> use:
>
> /dev/sdc /path/to/your/favorite/mountpoint compress,noauto,users,user 0 0
If you want LZO compression, as you specified:
/dev/sdc /path/to/mountpoint compress=lzo,noauto,users,user 0 0
Better yet, if your btrfs is actually on /dev/sdc right now, let's get
that fstab entry mounting it by UUID instead.
ls -l /dev/disk/by-uuid | grep sdc
lrwxrwxrwx 1 root root 10 Jan 3 09:40
12345678-9abc0-1234-5678-9a0123456789 -> ../../sdc
So then:
# this is not a real UUID, you need to check
/dev/disk/by-uuid on your machine for a real UUID
UUID=12345678-9abc0-1234-5678-9a0123456789
/path/to/mountpoint compress=lzo,noauto,users,user 0 0
This is EXTRA important with a USB drive, since it's HIGHLY likely it
won't always be on the same physical devicename.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to properly mount an external usb hard drive & other questions
2014-01-05 18:02 ` Jim Salter
@ 2014-01-05 18:09 ` Jim Salter
0 siblings, 0 replies; 5+ messages in thread
From: Jim Salter @ 2014-01-05 18:09 UTC (permalink / raw)
To: linux-btrfs, dhan.war
On 01/05/2014 01:02 PM, Jim Salter wrote:
> If you want LZO compression, as you specified:
>
> /dev/sdc /path/to/mountpoint compress=lzo,noauto,users,user 0 0
>
> Better yet, if your btrfs is actually on /dev/sdc right now, let's get
> that fstab entry mounting it by UUID instead.
>
> ls -l /dev/disk/by-uuid | grep sdc
> lrwxrwxrwx 1 root root 10 Jan 3 09:40
> 12345678-9abc0-1234-5678-9a0123456789 -> ../../sdc
>
> So then:
>
> # this is not a real UUID, you need to check
> /dev/disk/by-uuid on your machine for a real UUID
> UUID=12345678-9abc0-1234-5678-9a0123456789
> /path/to/mountpoint compress=lzo,noauto,users,user 0 0
>
> This is EXTRA important with a USB drive, since it's HIGHLY likely it
> won't always be on the same physical devicename.
One other note: in this particular case, you might actually be better
served setting compression by mounting the drive normally, then:
cd /path/to/drive
chattr +c . ; chattr +c * ; chattr +c .*
This will set compression on by default for any future files stored on
that USB drive, *without* needing any special mount options.
Why might this be a better idea? Well, if it's a USB drive, presumably
you might want to mount it on foreign systems from time to time. This
way, even if you mount the drive on a foreign system that doesn't know
anything about your preferences, it will see the +c on the root
directory of the drive, and store any new data on the drive compressed.
The only caveat: +c won't set the compression algorithm to LZO. It'll be
gzip, which is the default algorithm. (And, of course, this won't
compress any EXISTING data already stored there - only NEW data written
to it after you set the +c attribute.)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-05 18:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-05 4:34 how to properly mount an external usb hard drive & other questions dhan.war
2014-01-05 17:43 ` Justus Seifert
2014-01-05 17:50 ` Justus Seifert
2014-01-05 18:02 ` Jim Salter
2014-01-05 18:09 ` Jim Salter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.