file system usage?

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

file system usage?

Istvan Gabor-3
Hello:

Shortly:
I have to identical partitions I formatted with the same tool.
I copied everything from one partition to the other still
the file system usage is different. Why?

Longer version:

I have two extended partitions on the same hard disks.
They have identical sizes and block numbers.
fdisk report is:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc7       399155791   457744782    29294496   83  Linux
/dev/sdc8       457744846   516333837    29294496   83  Linux

I formatted both partitions as ext4 using Leap 42.2 yast2
partition tool with its default options. I installed Leap
42.2 onto partition 7. Partition 6 also has Leap 42.2 installed
earlier. I booted part6 Leap 42.2, mounted partitions 7 and 8
(as /mnt1 and /mnt2) and rsynced everything from partition 7 to 8:

rsync -a /mnt1/ /mnt2

Interestingly the file systems usage is not the same for
the two partitions (part7 is mnt1, part8 is mnt2):


df -h
Filesystem      Size  Used Avail Use% Mounted on

/dev/sdc7        28G  6.1G   21G  24% /mnt1
/dev/sdc8        28G  6.7G   20G  26% /mnt2

Why is this difference?

Thanks,

Istvan



--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Carlos E. R.-2
On 2017-06-13 15:14, Istvan Gabor wrote:

> Hello:
>
> Shortly:
> I have to identical partitions I formatted with the same tool.
> I copied everything from one partition to the other still
> the file system usage is different. Why?
>
> Longer version:
>
> I have two extended partitions on the same hard disks.
> They have identical sizes and block numbers.
> fdisk report is:
>
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sdc7       399155791   457744782    29294496   83  Linux
> /dev/sdc8       457744846   516333837    29294496   83  Linux
Are they both the same sector size? New disks sectors are 4 KiB.


> I formatted both partitions as ext4 using Leap 42.2 yast2
> partition tool with its default options. I installed Leap
> 42.2 onto partition 7. Partition 6 also has Leap 42.2 installed
> earlier. I booted part6 Leap 42.2, mounted partitions 7 and 8
> (as /mnt1 and /mnt2) and rsynced everything from partition 7 to 8:
>
> rsync -a /mnt1/ /mnt2
>
> Interestingly the file systems usage is not the same for
> the two partitions (part7 is mnt1, part8 is mnt2):
>
>
> df -h
> Filesystem      Size  Used Avail Use% Mounted on
>
> /dev/sdc7        28G  6.1G   21G  24% /mnt1
> /dev/sdc8        28G  6.7G   20G  26% /mnt2
>
> Why is this difference?
Do you have sparse files, perhaps?

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Istvan Gabor-3
On Tue, 13 Jun 2017 15:18:56 +0200, Carlos E. R. wrote:

> On 2017-06-13 15:14, Istvan Gabor wrote:
>> Hello:
>>
>> Shortly:
>> I have to identical partitions I formatted with the same tool.
>> I copied everything from one partition to the other still
>> the file system usage is different. Why?
>>
>> Longer version:
>>
>> I have two extended partitions on the same hard disks.
>> They have identical sizes and block numbers.
>> fdisk report is:
>>
>>   Device Boot      Start         End      Blocks   Id  System
>> /dev/sdc7       399155791   457744782    29294496   83  Linux
>> /dev/sdc8       457744846   516333837    29294496   83  Linux
>
> Are they both the same sector size? New disks sectors are 4 KiB.

Do you mean block size?
I suppose yes, because I formatted the partitions using the same tool
with
the same options (as far as I know).

I looked after how to check it:

blockdev --getbsz /dev/sdc7
4096

blockdev --getbsz /dev/sdc8
4096

Yes, they have the same block size

>
>> I formatted both partitions as ext4 using Leap 42.2 yast2
>> partition tool with its default options. I installed Leap
>> 42.2 onto partition 7. Partition 6 also has Leap 42.2 installed
>> earlier. I booted part6 Leap 42.2, mounted partitions 7 and 8
>> (as /mnt1 and /mnt2) and rsynced everything from partition 7 to 8:
>>
>> rsync -a /mnt1/ /mnt2
>>
>> Interestingly the file systems usage is not the same for
>> the two partitions (part7 is mnt1, part8 is mnt2):
>>
>>
>> df -h
>> Filesystem      Size  Used Avail Use% Mounted on
>>
>> /dev/sdc7        28G  6.1G   21G  24% /mnt1
>> /dev/sdc8        28G  6.7G   20G  26% /mnt2
>>
>> Why is this difference?
>
> Do you have sparse files, perhaps?

I don't exactly know what a spare file is.
How can I find out if I have any?

Thanks,

Istvan


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Bernhard Voelker
On 06/13/2017 03:44 PM, Istvan Gabor wrote:
> I don't exactly know what a spare file is.
> How can I find out if I have any?

E.g.
  rsync --help | grep sparse
   -S, --sparse                handle sparse files efficiently
or
  https://www.gnu.org/software/coreutils/manual/html_node/du-invocation.html
  see option "--apparent-size".

Apart from sparse files, you may have configured the reserved space
for the EXT4 filesystems fidderently (see tune2fs(8)).

Have a nice day,
Berny

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Felix Miata-3
In reply to this post by Istvan Gabor-3
Istvan Gabor composed on 2017-06-13 15:14 (UTC+0200):
.
> I have to identical partitions I formatted with the same tool.
> I copied everything from one partition to the other still
> the file system usage is different. Why?
.
> rsync -a /mnt1/ /mnt2
.
> Interestingly the file systems usage is not the same for
> the two partitions (part7 is mnt1, part8 is mnt2):
.
> df -h
> Filesystem      Size  Used Avail Use% Mounted on
.
> /dev/sdc7        28G  6.1G   21G  24% /mnt1
> /dev/sdc8        28G  6.7G   20G  26% /mnt2
.
> Why is this difference?
.
man rsync tells you:
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
...
-H, --hard-links preserve hard links

My reading is unless you preserve hard links, you get at least two separate
files on the target for each hard linked file on the source. So if you really
want a clone, either clone, or use rsync -aHAX.
--
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Istvan Gabor-3
On Tue, 13 Jun 2017 12:23:57 -0400, Felix Miata wrote:

> Istvan Gabor composed on 2017-06-13 15:14 (UTC+0200):
> .
>> I have to identical partitions I formatted with the same tool.
>> I copied everything from one partition to the other still
>> the file system usage is different. Why?
> .
>> rsync -a /mnt1/ /mnt2
> .
>> Interestingly the file systems usage is not the same for
>> the two partitions (part7 is mnt1, part8 is mnt2):
> .
>> df -h
>> Filesystem      Size  Used Avail Use% Mounted on
> .
>> /dev/sdc7        28G  6.1G   21G  24% /mnt1
>> /dev/sdc8        28G  6.7G   20G  26% /mnt2
> .
>> Why is this difference?
> .
> man rsync tells you:
> -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
> ...
> -H, --hard-links preserve hard links
>
> My reading is unless you preserve hard links, you get at least two
> separate
> files on the target for each hard linked file on the source. So if
> you really
> want a clone, either clone, or use rsync -aHAX.

I will try this if it makes any difference.

Thanks,

Istvan



--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Carlos E. R.-2
In reply to this post by Felix Miata-3
On 2017-06-13 18:23, Felix Miata wrote:
> Istvan Gabor composed on 2017-06-13 15:14 (UTC+0200):


> My reading is unless you preserve hard links, you get at least two separate
> files on the target for each hard linked file on the source. So if you really
> want a clone, either clone, or use rsync -aHAX.

I use:

OPTIONS="--archive --acls --xattrs --hard-links --stats --human-readable"

--archive is the same as:

#        -a, --archive               archive mode; same as -rlptgoD (no -H)
#        -r, --recursive             recurse into directories
#        -l, --links                 copy symlinks as symlinks
#        -p, --perms                 preserve permissions
#        -t, --times                 preserve times
#        -g, --group                 preserve group
#        -o, --owner                 preserve owner (super-user only)
#        -D                          same as --devices --specials
#            --devices               preserve device files (super-user only)
#            --specials              preserve special files


--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Carlos E. R.-2
In reply to this post by Istvan Gabor-3
On 2017-06-13 15:44, Istvan Gabor wrote:

> On Tue, 13 Jun 2017 15:18:56 +0200, Carlos E. R. wrote:
>> On 2017-06-13 15:14, Istvan Gabor wrote:
>>> Hello:
>>>
>>> Shortly:
>>> I have to identical partitions I formatted with the same tool.
>>> I copied everything from one partition to the other still
>>> the file system usage is different. Why?
>>>
>>> Longer version:
>>>
>>> I have two extended partitions on the same hard disks.
>>> They have identical sizes and block numbers.
>>> fdisk report is:
>>>
>>>   Device Boot      Start         End      Blocks   Id  System
>>> /dev/sdc7       399155791   457744782    29294496   83  Linux
>>> /dev/sdc8       457744846   516333837    29294496   83  Linux
>>
>> Are they both the same sector size? New disks sectors are 4 KiB.
>
> Do you mean block size?
> I suppose yes, because I formatted the partitions using the same tool with
> the same options (as far as I know).
Format doesn't matter, it is a hardware issue. Example:

Telcontar:~ # fdisk -l /dev/sda
Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes



>> Do you have sparse files, perhaps?
>
> I don't exactly know what a spare file is.
> How can I find out if I have any?

Sparse, not spare :-)

Files with holes. You can create a gigabyte file and only one megabyte
block in the middle has data, the rest doesn't exist. Not that the rest
(the holes) contain zeroes, but no: it contains nothing, it doesn't
exist on disk.

Such a file would use only one megabyte of disk space.


Who uses that? Well, some download utilities: they populate the regions
of the file that they manage to download, and the rest are holes,
conserving disk space.

They are seldom used (I have only seen them with a p2p utility), and
right now, I do not remember how to find out if they exist on a partition.

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Istvan Gabor-3
On Tue, 13 Jun 2017 22:46:47 +0200, Carlos E. R. wrote:

> On 2017-06-13 15:44, Istvan Gabor wrote:
>> On Tue, 13 Jun 2017 15:18:56 +0200, Carlos E. R. wrote:
>>> On 2017-06-13 15:14, Istvan Gabor wrote:
>>>> Hello:
>>>>
>>>> Shortly:
>>>> I have to identical partitions I formatted with the same tool.
>>>> I copied everything from one partition to the other still
>>>> the file system usage is different. Why?
>>>>
>>>> Longer version:
>>>>
>>>> I have two extended partitions on the same hard disks.
>>>> They have identical sizes and block numbers.
>>>> fdisk report is:
>>>>
>>>>   Device Boot      Start         End      Blocks   Id  System
>>>> /dev/sdc7       399155791   457744782    29294496   83  Linux
>>>> /dev/sdc8       457744846   516333837    29294496   83  Linux
>>>
>>> Are they both the same sector size? New disks sectors are 4 KiB.
>>
>> Do you mean block size?
>> I suppose yes, because I formatted the partitions using the same
>> tool with
>> the same options (as far as I know).
>
> Format doesn't matter, it is a hardware issue. Example:
>
> Telcontar:~ # fdisk -l /dev/sda
> Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes

I do have both partitions on the same hardware.
On the same physical hard drive, not two identical
drives.

>>> Do you have sparse files, perhaps?
>>
>> I don't exactly know what a spare file is.
>> How can I find out if I have any?
>
> Sparse, not spare :-)

Sorry, typo.

> Files with holes. You can create a gigabyte file and only one
> megabyte
> block in the middle has data, the rest doesn't exist. Not that the
> rest
> (the holes) contain zeroes, but no: it contains nothing, it doesn't
> exist on disk.
>
> Such a file would use only one megabyte of disk space.
>
>
> Who uses that? Well, some download utilities: they populate the
> regions
> of the file that they manage to download, and the rest are holes,
> conserving disk space.
>
> They are seldom used (I have only seen them with a p2p utility), and
> right now, I do not remember how to find out if they exist on a
> partition.

I guess some torrent client use this, but I wasn't sure that
is was the same thing.

Thanks,

Istvan

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Anton Aylward-2
In reply to this post by Istvan Gabor-3
On 13/06/17 09:14 AM, Istvan Gabor wrote:
> df -h
> Filesystem      Size  Used Avail Use% Mounted on
>
> /dev/sdc7        28G  6.1G   21G  24% /mnt1
> /dev/sdc8        28G  6.7G   20G  26% /mnt2
>
> Why is this difference?

Could you run without the "-h" so we see the number of bytes, please.

--
         A: Yes.
     >   Q: Are you sure?
     >>  A: Because it reverses the logical flow of conversation.
     >>> Q: Why is top posting frowned upon?


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Anton Aylward-2
In reply to this post by Carlos E. R.-2
On 13/06/17 04:46 PM, Carlos E. R. wrote:
> They are seldom used (I have only seen them with a p2p utility), and
> right now, I do not remember how to find out if they exist on a partition.

Neither do I, right now, but IIR it's pretty normal for database files to have
such for a number or reasons, ranging from unused field pace, blanks in the
record or gaps due to the indexing.

--
         A: Yes.
     >   Q: Are you sure?
     >>  A: Because it reverses the logical flow of conversation.
     >>> Q: Why is top posting frowned upon?


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Istvan Gabor-3
In reply to this post by Felix Miata-3
On Tue, 13 Jun 2017 12:23:57 -0400, Felix Miata wrote:

> Istvan Gabor composed on 2017-06-13 15:14 (UTC+0200):
> .
>> I have to identical partitions I formatted with the same tool.
>> I copied everything from one partition to the other still
>> the file system usage is different. Why?
> .
>> rsync -a /mnt1/ /mnt2
> .
>> Interestingly the file systems usage is not the same for
>> the two partitions (part7 is mnt1, part8 is mnt2):
> .
>> df -h
>> Filesystem      Size  Used Avail Use% Mounted on
> .
>> /dev/sdc7        28G  6.1G   21G  24% /mnt1
>> /dev/sdc8        28G  6.7G   20G  26% /mnt2
> .
>> Why is this difference?
> .
> man rsync tells you:
> -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
> ...
> -H, --hard-links preserve hard links
>
> My reading is unless you preserve hard links, you get at least two
> separate
> files on the target for each hard linked file on the source. So if
> you really
> want a clone, either clone, or use rsync -aHAX.

I compared rsync -a and rsync -aHAX.
I have two pieces of identical hard drives.
I formatted on both the first primary partiton (same size)
to ext3 using mkfs -t ext3.

These are the partitions:

sfdisk -l /dev/sda
Disk /dev/sda: 298.1 GiB, 320068705792 bytes, 625134191 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1e951881

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sda1  *         2048 104859647 104857600   50G 83 Linux


sfdisk -l /dev/sdb
Disk /dev/sdb: 298.1 GiB, 320068705792 bytes, 625134191 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1e951881

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sdb1  *         2048 104859647 104857600   50G 83 Linux

That is the disks and the partition look identical.

I mount /dev/sda1 to /mnt1 (read only) and /dev/sdb1 to /mnt2.
/dev/sdb2 had a freshly formatted file system.
I deleted lost+found from /mnt2 the rsynced everything from
mnt1 to mnt2:

# rsync -aHAX /mnt1/ /mnt2/

After it I get:

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        50G   44G  3.5G  93% /mnt1
/dev/sdb1        50G   43G  3.7G  93% /mnt2

# df
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda1       51475068 45240120   3613508  93% /mnt1
/dev/sdb1       51475068 45034476   3819152  93% /mnt2

There is difference in used and free space.
It is ~200 MBs if I calculate correctly.
??

tune2fs gives:

# tune2fs -l /dev/sda1
tune2fs 1.42.11 (09-Jul-2014)
Filesystem volume name:   <none>
Last mounted on:          /mnt1
Filesystem UUID:          1fe642de-fba4-4e71-804d-a49678ee8f4a
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index
filetype sparse_super large_file
Filesystem flags:         signed_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              3276800
Block count:              13107200
Reserved block count:     655360
Free blocks:              1558737
Free inodes:              3260644
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      1020
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Filesystem created:       Sat Jun  3 12:36:03 2017
Last mount time:          Tue Jun 13 17:02:22 2017
Last write time:          Tue Jun 13 17:16:04 2017
Mount count:              9
Maximum mount count:      -1
Last checked:             Sat Jun  3 12:36:03 2017
Check interval:           0 (<none>)
Lifetime writes:          25 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      20f34777-5a2a-4f37-8066-b3304b2a25bf
Journal backup:           inode blocks

# tune2fs -l /dev/sdb1
tune2fs 1.42.11 (09-Jul-2014)
Filesystem volume name:   <none>
Last mounted on:          /mnt2
Filesystem UUID:          690c6d35-44ab-4d4f-b8b1-565221582a8b
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index
filetype needs_recovery sparse_super large_file
Filesystem flags:         signed_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              3276800
Block count:              13107200
Reserved block count:     655360
Free blocks:              12855468
Free inodes:              3276789
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      1020
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Filesystem created:       Wed Jun 14 18:28:40 2017
Last mount time:          Wed Jun 14 18:29:11 2017
Last write time:          Wed Jun 14 18:29:11 2017
Mount count:              1
Maximum mount count:      -1
Last checked:             Wed Jun 14 18:28:40 2017
Check interval:           0 (<none>)
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      c2043247-ca58-45a4-affc-52c1dc46b664
Journal backup:           inode blocks

Istvan




--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Carlos E. R.-2
In reply to this post by Anton Aylward-2
On 2017-06-14 18:52, Anton Aylward wrote:
> On 13/06/17 04:46 PM, Carlos E. R. wrote:
>> They are seldom used (I have only seen them with a p2p utility), and
>> right now, I do not remember how to find out if they exist on a partition.
>
> Neither do I, right now, but IIR it's pretty normal for database files to have
> such for a number or reasons, ranging from unused field pace, blanks in the
> record or gaps due to the indexing.

Maybe because records are deleted in the middle of the file. They are
emptied, the sectors given back to the filesystem, which can reuse then
on another place even for the same database file, now at the end :-)

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Carlos E. R.-2
In reply to this post by Istvan Gabor-3
On 2017-06-14 19:12, Istvan Gabor wrote:
> On Tue, 13 Jun 2017 12:23:57 -0400, Felix Miata wrote:


> I deleted lost+found from /mnt2 the rsynced everything from
> mnt1 to mnt2:
>
> # rsync -aHAX /mnt1/ /mnt2/
>
> After it I get:
>
> # df -h
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/sda1        50G   44G  3.5G  93% /mnt1
> /dev/sdb1        50G   43G  3.7G  93% /mnt2
>
> # df
> Filesystem     1K-blocks     Used Available Use% Mounted on
> /dev/sda1       51475068 45240120   3613508  93% /mnt1
> /dev/sdb1       51475068 45034476   3819152  93% /mnt2
>
> There is difference in used and free space.
> It is ~200 MBs if I calculate correctly.
> ??
>
> tune2fs gives:

Placing that in two columns make visible the three differences:

# tune2fs -l /dev/sda1                         # tune2fs -l /dev/sdb1

Inode count:              3276800              Inode count:              3276800
Block count:              13107200             Block count:              13107200
Reserved block count:     655360               Reserved block count:     655360
Free blocks:              1558737              Free blocks:              12855468    **
Free inodes:              3260644              Free inodes:              3276789     **

Check interval:           0 (<none>)           Check interval:           0 (<none>)
Lifetime writes:          25 GB                                                      **
Reserved blocks uid:      0 (user root)        Reserved blocks uid:      0 (user root)


See again:

Free blocks:         1558737              
Free blocks:        12855468

That difference is large. Too large.

:-?

--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Felix Miata-3
In reply to this post by Istvan Gabor-3
Istvan Gabor composed on 2017-06-14 19:12 (UTC+0200):
.
>>> df -h
>>> Filesystem      Size  Used Avail Use% Mounted on
>> .
>>> /dev/sdc7        28G  6.1G   21G  24% /mnt1
>>> /dev/sdc8        28G  6.7G   20G  26% /mnt2
.
> # rsync -aHAX /mnt1/ /mnt2/
.
> After it I get:
.
> # df -h
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/sda1        50G   44G  3.5G  93% /mnt1
> /dev/sdb1        50G   43G  3.7G  93% /mnt2
.
> # df
> Filesystem     1K-blocks     Used Available Use% Mounted on
> /dev/sda1       51475068 45240120   3613508  93% /mnt1
> /dev/sdb1       51475068 45034476   3819152  93% /mnt2
.
> tune2fs gives:
.
> # tune2fs -l /dev/sda1
> Free blocks:              1558737
> Free inodes:              3260644
> Lifetime writes:          25 GB
.
> # tune2fs -l /dev/sdb1
> Free blocks:              12855468
> Free inodes:              3276789
[Lifetime writes absent]
.
So, after changing rsync options, the "clone" has more freespace, rather than
less, and massively more free blocks. This suggests to me sparse files are now
the primary difference, whereas before it was not preserving of hardlinks.
Secondarily it looks like access time overhead is not preserved by the selected
rsync options.

When I want a clone, I clone (raw sector copy), immediately followed by 'tune2fs
-U random -L <newlabel>' to unique the clone's UUID and volume label, and
reconfiguring bootloader and fstab(s) if applicable.
--
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

Anton Aylward-2
In reply to this post by Carlos E. R.-2
On 14/06/17 01:34 PM, Carlos E. R. wrote:
> See again:
>
> Free blocks:         1558737              
> Free blocks:        12855468
>
> That difference is large. Too large.

Not only that, but also

Free inodes:              3260644
Free inodes:              3276789

A small matter of 16,145 more files on one than the other.

Something is wrong with your copying.
Perhaps it is balking at some (large) files for some reason.

* are you copying as root?
* are there some hidden files?
* is there stuff lurking in the lost+found
* have you tried with debug/logging turned on?

--
         A: Yes.
     >   Q: Are you sure?
     >>  A: Because it reverses the logical flow of conversation.
     >>> Q: Why is top posting frowned upon?


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file system usage?

L A Walsh
In reply to this post by Istvan Gabor-3
Istvan Gabor wrote:
>>> /dev/sdc8        28G  6.7G   20G  26% /mnt2
>>> Why is this difference?
> /dev/sdc7        28G  6.1G   21G  24% /mnt1
----
    Rather than looking at the global problem, why not
look at the micro problem(s).

I.e. start with:

du -k /dev/mnt1 >/tmp/du_mnt1.txt
du -k /dev/mnt2 >/tmp/du_mnt2.txt

Find the first directory they differ on
and compare "ls -l" of both dirs side-by-side.

See if the diff is in the files or in the directories.

Might help narrow down the problem.(?)





--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Loading...