LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How read the external Hard disk in right size? (https://www.linuxquestions.org/questions/linux-software-2/how-read-the-external-hard-disk-in-right-size-729004/)

eng_mohammedmostafa 05-28-2009 12:27 AM

How read the external Hard disk in right size?
 
Dears,,

I connected external Hard disk to Linux PC.
but the external hard disk appears in a wrong size.
Also, i tried to copy from the PC Hard to the external hard
it gave me error that there is no space although that the both hard disks are the same mount points and size.

Thanks & Regards,,

chrism01 05-28-2009 01:10 AM

What distro are you running?
What formats/file systems are the disks?
run

df -h

and post the results

eng_mohammedmostafa 05-28-2009 01:18 AM

Kindly , see the following . . .

[root@localhost /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 1.5G 612M 789M 44% /
/dev/mapper/VolGroup00-LogVol08
116G 64G 46G 59% /backup
/dev/sda1 99M 17M 78M 18% /boot
none 1.5G 0 1.5G 0% /dev/shm
/dev/mapper/VolGroup00-LogVol00
1.5G 35M 1.4G 3% /home
/dev/mapper/VolGroup00-LogVol05
1.5G 36M 1.4G 3% /opt
/dev/mapper/VolGroup00-LogVol07
241G 79G 150G 35% /oracle
/dev/mapper/VolGroup00-LogVol01
3.4G 40M 3.2G 2% /tmp
/dev/mapper/VolGroup00-LogVol06
73G 60G 9.1G 87% /u01
/dev/mapper/VolGroup00-LogVol02
15G 6.7G 7.1G 49% /usr
/dev/mapper/VolGroup00-LogVol04
1.5G 35M 1.4G 3% /usr/local
/dev/mapper/VolGroup00-LogVol03
1.5G 249M 1.2G 18% /var
/dev/sdc1 99M 17M 78M 18% /media/usbdisk
/dev/sdc3 1.5G 250M 1.2G 18% /media/usbdisk1


***************************

/etc/fstab

# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
/dev/VolGroup00/LogVol08 /backup ext3 defaults 1 2
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
/dev/VolGroup00/LogVol00 /home ext3 defaults 1 2
/dev/VolGroup00/LogVol05 /opt ext3 defaults 1 2
/dev/VolGroup00/LogVol07 /oracle ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 /tmp ext3 defaults 1 2
/dev/VolGroup00/LogVol06 /u01 ext3 defaults 1 2
/dev/VolGroup00/LogVol02 /usr ext3 defaults 1 2
/dev/VolGroup00/LogVol04 /usr/local ext3 defaults 1 2
/dev/VolGroup00/LogVol03 /var ext3 defaults 1 2
LABEL=SWAP-sdb2 swap swap defaults 0 0
/dev/hda /media/cdrecorder auto pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
/dev/sdc1 /media/usbdisk ext3 pamconsole,noatime,sync,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
/dev/sdc3 /media/usbdisk1 ext3 pamconsole,noatime,sync,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0

chrism01 05-28-2009 01:57 AM

So where/which disks are you trying to copy from/to?
What cmd did you use and what was the output/error msg?
Please use the code tags, its easier to read.

eng_mohammedmostafa 05-28-2009 02:30 AM

I have the same mount points in both hard disks
and I am trying to copy all mount points from the PC Hard to the external Hard disk as following example in specific mount point:
[root@localhost backup]cp -r /backup/* .
But error appear to me ( No space left on devise )

Thanks & Regards,,

chrism01 05-28-2009 08:30 PM

You need to be more specific (actual names) about which disk you are using, as you have several connected.
On the PC, /backup is LogVol08, which says 612M used.
/media/usbdisk isn't big enough, if that's what you're using.

michaelk 05-28-2009 09:16 PM

Code:


Filesystem                      Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol08 116G 64G  46G  59%  /backup
/dev/sdc1                      99M  17M  78M  18%  /media/usbdisk
/dev/sdc3                      1.5G 250M 1.2G  18%  /media/usbdisk1

Neither partition is big enough to copy much from /backup. The drive has multiple partitions but what is the actual capacity of the entire external drive? As stated you need to be more specific.

eng_mohammedmostafa 05-30-2009 02:37 AM

The source is:
/dev/mapper/VolGroup00-LogVol08 116G 64G 46G 59% /backup
The destination is:
/backup mount point under /media/usbdisk1

The both mount points must be 116G because the both hard disks have the same mount points and sizes
The size(116G) mentioned for /backup (source) is true
The size(4.0K) mentioned for /backup (Destination) is false

For more clarifications:
The size for the second hard disk (/dev/sdc3) is right (When be alone)
But once i connected it to the first hard disk ( the sizes be very small and not correct ) ??

eng_mohammedmostafa 05-30-2009 08:08 AM

Dears,,

I made work arround for this issue.
I am trying to copy the data from the source to FAT32 Hard disk then copy them to the destination.
But i faced a problem File size limit exceeded message

how can avoid this to can go ahead?
Thanks,,

michaelk 05-30-2009 08:28 AM

It is a FAT32 filesystem limitation. The only way to avoid is not using FAT32

Post the output of the command
fdisk -l (must be root and l is a small L)

Quote:

For more clarifications:
The size for the second hard disk (/dev/sdc3) is right (When be alone)
But once i connected it to the first hard disk ( the sizes be very small and not correct ) ??
The output of the fdisk command should clarify the question. sdc contains multiple partitions i.e. sdc1 and sdc3. It will also show the information for the entire disk.

eng_mohammedmostafa 05-30-2009 08:40 AM

[root@localhost ~]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 778 6144862+ 82 Linux swap
/dev/sda3 779 969 1534207+ 83 Linux
/dev/sda4 970 60801 480600540 f W95 Ext'd (LBA)
/dev/sda5 970 60801 480600508+ 8e Linux LVM

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 3824 30716248+ 7 HPFS/NTFS
/dev/sdb2 3825 19457 125572072+ f W95 Ext'd (LBA)
/dev/sdb5 3825 14023 81923436 7 HPFS/NTFS
/dev/sdb6 14024 19457 43648573+ 7 HPFS/NTFS

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 1 25063 201318516 c W95 FAT32 (LBA)
/dev/sdc2 25064 50126 201318547+ c W95 FAT32 (LBA)
/dev/sdc3 50127 60801 85746937+ c W95 FAT32 (LBA)
[root@localhost ~]#
=================================================================================
While trying to copy from the source to the FAT32 Hard disk
It can not copy up to 4 G.B ( Why? )

michaelk 05-30-2009 09:18 AM

So sdc1 and sdc2 are ~200G and sdc3 is ~88G which adds up. Without knowing how you created the ext3 filesystems
on sdc1 and sdc3 I can not explain the difference in size. If what you say is true that when both are not mounted sdc1 shows the actual size then umount sdc3 and post the output of df -h again for sdc1.

In a nutshell it is a design limitation. The max file size is (2^32)-1 bytes. There is tons of information on the web that explains the differences between the many filesystems.

eng_mohammedmostafa 05-30-2009 02:03 PM

Ok . . .
But why while trying to copy from the source to the FAT32 Hard disk
it can not copy up to 4 G.B ??
How can avoid this?

Thanks,,

michaelk 05-30-2009 03:33 PM

I am not sure if you are asking why you can not transfer files < 4GB or > 4GB.
How big are the files you are trying transfer?

eng_mohammedmostafa 05-31-2009 02:37 AM

I solved this problem by
editing /etc/security/limits.conf then add the following line:
* * fsize unlimited

But when trying to transfer the same files to external hard disk ( /media/usbdisk )
Note:External hard disk is FAT32
It gave me File size limit exceeded message
How can solve this?


All times are GMT -5. The time now is 06:24 AM.