Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How full is my drive

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
User avatar
Soapm
Posts: 603
Joined: 2012-05-22 04:23
Has thanked: 1 time

How full is my drive

#1 Post by Soapm »

I have a Debian Jessie headless server that I mostly use as a video server.

I botched my upgrade from wheezy by not following the instructions (I admit it) and though the server works ok, many commands don't work so I'm now backing up all my data prior to wiping out the server and starting fresh.

The problem I'm having is df -h doesn't seem to work (along with ls and many other commands). The computer just sits after a I type df -h in the command prompt and I have to disconnect the terminal and log back in. I need a way of seeing how full my backup drives are so I don't over fill them during back up.

What are some alternate means of seeing how full my backup drives are?

I also have "Webmin" installed and I'm getting a warning that says, "Warning! The 1.61 TB filesystem mounted at /backup1 has no free disk space!" The problem is the drive is supposed to be 4TB so either I didn't format it right or I have other problems???

User avatar
acewiza
Posts: 357
Joined: 2013-05-28 12:38
Location: Out West

Re: How full is my drive

#2 Post by acewiza »

Consider temporarily connecting a monitor and try booting a liveCD to get an alternate view of the drive(s).
Nobody would ever ask questions If everyone possessed encyclopedic knowledge of the man pages.

User avatar
Soapm
Posts: 603
Joined: 2012-05-22 04:23
Has thanked: 1 time

Re: How full is my drive

#3 Post by Soapm »

acewiza wrote:Consider temporarily connecting a monitor and try booting a liveCD to get an alternate view of the drive(s).
Great idea, I will give that a try... I have a gpated64 disc around here somewhere, that will give me a gui to look at.

In the mean time I got "fdisk -lu" to work and it gave me the below. The drive in question is sdg which should be a 4tb drive but I see it is somehow reporting as 1.7 tb. It also doesn't appear to have a partition so I guess I failed when I used gdisk. What's the easiest way to partition the drive to the full 4tb? I will have to go buy a monitor later today since my wife got rid of most of my spare stuff (she called me a hoarder and said it was for my good) including the laptop I had with the notes of how I installed this server many moons ago. It started at "Lenny" (hence the name "lenny") then went to squeeze etc... and now I botched it bigtime with Jessie though it's been running this way for close to a year now.

Code: Select all

root@lenny:/# fdisk -lu

Disk /dev/sda: 74.5 GiB, 80000000000 bytes, 156250000 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: gpt
Disk identifier: 158559CE-F0AE-492D-81F5-E0994636AE9A

Device         Start       End   Sectors  Size Type
/dev/sda1       2048    999423    997376  487M EFI System
/dev/sda2     999424 117436415 116436992 55.5G Microsoft basic data
/dev/sda3  117436416 156248063  38811648 18.5G Linux swap

Disk /dev/sdc: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: EB510EA1-1DB1-4649-B9B4-DBCA7ED28661

Device     Start        End    Sectors  Size Type
/dev/sdc1   2048 5860532223 5860530176  2.7T Linux RAID

Disk /dev/sde: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 56AD6C6E-81DA-4647-BEB5-D49D57B258BF

Device     Start        End    Sectors  Size Type
/dev/sde1   2048 5860532223 5860530176  2.7T Linux RAID

Disk /dev/sdd: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 4754819E-4A01-4D64-A60D-847D22F22218

Device     Start        End    Sectors  Size Type
/dev/sdd1   2048 5860532223 5860530176  2.7T Linux RAID

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 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: gpt
Disk identifier: 5EAF5702-B7B8-452A-8AD5-1E6706179C76

Device     Start        End    Sectors   Size Type
/dev/sdb1   2048 1953523711 1953521664 931.5G Microsoft basic data

Disk /dev/sdf: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: AC9713ED-399B-4A07-B10C-957D45945409

Device     Start        End    Sectors  Size Type
/dev/sdf1   2048 5860532223 5860530176  2.7T Linux RAID

Disk /dev/md0: 8.2 TiB, 9001370124288 bytes, 17580801024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1572864 bytes

[b]Disk /dev/sdg: 1.7 TiB, 1801763774464 bytes, 3519069872 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[/b]

Code: Select all

root@lenny:/# lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda       8:0    0  74.5G  0 disk
  tqsda1    8:1    0   487M  0 part  /boot/efi
  tqsda2    8:2    0  55.5G  0 part  /
  mqsda3    8:3    0  18.5G  0 part  [SWAP]
sdb       8:16   0 931.5G  0 disk
  mqsdb1    8:17   0 931.5G  0 part  /torrent
sdc       8:32   0   2.7T  0 disk
  mqsdc1    8:33   0   2.7T  0 part
  mqmd0   9:0    0   8.2T  0 raid5 /video
sdd       8:48   0   2.7T  0 disk
  mqsdd1    8:49   0   2.7T  0 part
  mqmd0   9:0    0   8.2T  0 raid5 /video
sde       8:64   0   2.7T  0 disk
  mqsde1    8:65   0   2.7T  0 part
  mqmd0   9:0    0   8.2T  0 raid5 /video
sdf       8:80   0   2.7T  0 disk
  mqsdf1    8:81   0   2.7T  0 part
  mqmd0   9:0    0   8.2T  0 raid5 /video
sdg       8:96   0   1.7T  0 disk  /backup1

User avatar
Soapm
Posts: 603
Joined: 2012-05-22 04:23
Has thanked: 1 time

Re: How full is my drive

#4 Post by Soapm »

I seem to have a hardware problem with seeing the full 4tb drive. this is from "parted -l"...

Let me go get a monitor and see what's up with this...

Code: Select all

Model: WDC WD40 EFRX-68N32N0 (scsi)
Disk /dev/sdg: 1802GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End     Size    File system  Flags
 1      0.00B  1802GB  1802GB  ext4

n_hologram
Posts: 459
Joined: 2013-06-16 00:10

Re: How full is my drive

#5 Post by n_hologram »

You might try cfdisk /dev/sdg, and see if there is unused space on the drive's partition table.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
the crunkbong project: scripts, operating system, the list goes on...

User avatar
Soapm
Posts: 603
Joined: 2012-05-22 04:23
Has thanked: 1 time

Re: How full is my drive

#6 Post by Soapm »

I can boot it back up and try that but I took my daughters monitor and have it booted using USB Gparted live and it shows the drive as 2tb also. The drive is a WD40EFRX.

Could it be that the drive is externally connected via USB adapter? The limitation can't be in the BIOS since my 3TB drives are working fine.

User avatar
Soapm
Posts: 603
Joined: 2012-05-22 04:23
Has thanked: 1 time

Re: How full is my drive

#7 Post by Soapm »

I found this quote while googling my problem, is this accurate? If so, this creates a big challenge to me upgrading my raid. Looks like I need a plan "G"...
When you connect via eSATA, the SATA driver talks directly to the HDD. It appears that this driver is not affected by a 32-bit LBA limitation (it is probably 48-bit LBA aware), in which case it is able to see the full capacity of the drive.

However, when you connect via USB, the OS uses a USB mass storage driver which communicates with the firmware on the USB-SATA bridge PCB inside the enclosure rather than with the HDD directly. It appears that the bridge firmware has a 32-bit LBA limitation.

The end result is that the drive will appear to work fine up until the time you try to write data beyong the 2TiB point. When this happens, the LBAs wrap around to sector 0, trashing your file system.

User avatar
Soapm
Posts: 603
Joined: 2012-05-22 04:23
Has thanked: 1 time

Re: How full is my drive

#8 Post by Soapm »

Good news, I pulled my torrent drive and mounted the new one directly and I now see the full capacity. I also noticed commands like "ls -la" and "df -h" work fine with the monitor and keyboard connected to the PC. I wonder why they don't work remotely???

So either my torrent drive is bad or my server hates to be remotely administered???

I don't know why but right now it's not allowing me to remote into it. I'm getting an error saying "connection refused".

ps... The server responds to pings from my other computers? Why would it suddenly stop allowing connections? I tried reinstalling SSH but no go???

User avatar
Soapm
Posts: 603
Joined: 2012-05-22 04:23
Has thanked: 1 time

Re: How full is my drive

#9 Post by Soapm »

The remote connection problem has to do with pulling my torrent drive. My other drives are the main (root) and my raid so I would hate to pull one of them.

How can I tell the service it's ok to run without transmission (torrent) being active.

ps... Looks like the computer was in some kind of limp mode, I put an # in front of the drive in the fstab file and it now works...

Looks like I should have taken a month off for this instead of a day, this is one step forward two steps back...

Post Reply