Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Howdy;
I'm trying to find out how to do appropriate block sizes for
quota and dd. Near as I've been able to find out, dvd-r uses
a block size of 2048, and has a total of 4044128 blocks.
However, when I try to do the math, it comes out to 8282374144
bytes, and when I try to divide it up to get something that
seems reasonable for the two mentioned programs, and then check
the math by multiplying back up, the numbers all come out
different. Can anyone tell me what the appropriate numbers are?
I don't understand it either. According to one source, dd
is supposed to create a file of n length composed of all
zeros, n being the size of the virtual file thats the same
size as the dvd-r. At least thats what they seemed to be
saying.
result should be the same. but the latter might be a bit faster.
maybe you forgot the 'count' option when reading from dvd.
various dvd drives can add some zeroes to end of .iso file, so you get slightly wrong result. just truncate it to N*2048.
Now, for the second part of my question, how does one do
that for quota? Or would lat-quota be easier? I only just found out about lat-quota, so I haven't even had a chance
to go over the man page yet.
Perhaps I should rephrase the question a bit.
I've been all over the web looking, but all
I've found, is that its relatively easy to
set the number of blocks in quota. What I
haven't been able to find, is how to set the
size of those blocks, or even if quota has
some default block size that it insists on
using. Anyone got a clue on that?
I don't know, never used quota. my guess is it would be equal to size of filesystem blocks. you set that when you format partition. I think its usually 4K.
might be a good idea to have larger blocks if partition is to hold mostly huge files.
Perhaps I should rephrase the question a bit.
I've been all over the web looking, but all
I've found, is that its relatively easy to
set the number of blocks in quota. What I
haven't been able to find, is how to set the
size of those blocks, or even if quota has
some default block size that it insists on
using. Anyone got a clue on that?
Disk quotas are computed using the size of the minimum allocation unit of the disk (a block). If your disk uses 2048 byte blocks, then that is the size it will use. If the disk is 4k byte blocks then that is the size it uses.
iirc, 'physical' block size on *all* disks is 512 bytes. this seems to be logical block size.
if so, its a bit confusing, what happens when you have several mount points with different logical block size?
iirc, 'physical' block size on *all* disks is 512 bytes. this seems to be logical block size.
if so, its a bit confusing, what happens when you have several mount points with different logical block size?
That used to be true, but isn't anymore. Some of the 4TB disks use 4k blocks instead, and emulate (at a performance penalty) a 512 byte block if they are configured to do so.
Each filesystem has the minimum allocation unit in its header, and that is what is used.
Each filesystem mounted has to be given its own quota allocation. Where it is mounted doesn't matter. Now that said, SOME filesystems don't support quotas - FAT/VFAT don't support quotas, NTFS looks like it does, Ext2/3/4 and btrfs do. Memory resident filesystems tmpfs/ramfs do not (and tmpfs introduce a denial of service attack area with the ability to cause OOM when users can access that filesystem).
It looks like CD/DVD formats do not (iso9660, UDF).
if you're refering to 'advanced format', it has been used on many modern drives, not just 4Tb. but, I doubt you can turn off that 512 byte emulation.
it would be nice though, because of 2Tb limit and other things.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.