Hello, A while ago I cloned a smaller hard dive with my Suse OS to a larger 1 TB drive. Every thing works well how ever the "/" partition still shows the original partition size and not the true size of the partition. For example, 'df' shows the partition as 359 GB; #df -h / Filesystem Size Used Avail Use% Mounted on /dev/sda4 359G 309G 51G 87% / <snip> However parted shows the correct size and 670GB; (parted) print Model: ATA WDC WD1002FBYS-0 (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags <snip> 4 330GB 1000GB 670GB primary xfs type=83 <snip> What can I do to fix this? Many thanks, James -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 01/27/2012 01:57 PM, James D. Parra wrote:
Hello,
A while ago I cloned a smaller hard dive with my Suse OS to a larger 1 TB drive. Every thing works well how ever the "/" partition still shows the original partition size and not the true size of the partition.
For example, 'df' shows the partition as 359 GB;
#df -h / Filesystem Size Used Avail Use% Mounted on /dev/sda4 359G 309G 51G 87% / <snip>
However parted shows the correct size and 670GB;
(parted) print Model: ATA WDC WD1002FBYS-0 (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/512B Partition Table: msdos
Number Start End Size Type File system Flags <snip> 4 330GB 1000GB 670GB primary xfs type=83 <snip>
What can I do to fix this?
That depends on the filesystem. But every filesystem has tools to handle this. Here is a good starting point: http://www.howtoforge.com/linux_resizing_ext3_partitions HTH, Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU SUSE-IBM Software Integration Center LINUX Tech Lead rjschwei@suse.com rschweik@ca.ibm.com 781-464-8147 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
James D. Parra said the following on 01/27/2012 01:57 PM:
Hello,
A while ago I cloned a smaller hard dive with my Suse OS to a larger 1 TB drive. Every thing works well how ever the "/" partition still shows the original partition size and not the true size of the partition.
For example, 'df' shows the partition as 359 GB;
#df -h / Filesystem Size Used Avail Use% Mounted on /dev/sda4 359G 309G 51G 87% / <snip>
No. DF shows the file system size and utilization. RTFM <quote> df displays the amount of disk space available on the file system containing each file name argument. </qiote>
However parted shows the correct size and 670GB;
(parted) print Model: ATA WDC WD1002FBYS-0 (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/512B Partition Table: msdos
Number Start End Size Type File system Flags <snip> 4 330GB 1000GB 670GB primary xfs type=83 <snip>
You you have a 359G file system on a 670G physical partition. Seems silly but makes sense.
What can I do to fix this?
I dunno about XFS sine I use ext3/4 and resiserFS, both of which can be grown, the latter on a live system. But then I don't go for such huge root file systems either and use LVM where grwing and shrinking a FS is pretty normal. Try xfs_growfs I found that by reading the XFS man page. RTFM first -- There is no use whatever trying to help people who do not help themselves. You cannot push anyone up a ladder unless he be willing to climb himself. - Andrew Carnegie -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
But then I don't go for such huge root file systems either and use LVM where grwing and shrinking a FS is pretty normal.
I also use LVM. When I replaced a drive with a larger one in a notebook, I just added the extra space to the LVM. Worked fine. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
James Knott said the following on 01/28/2012 07:45 AM:
Anton Aylward wrote:
But then I don't go for such huge root file systems either and use LVM where grwing and shrinking a FS is pretty normal.
I also use LVM. When I replaced a drive with a larger one in a notebook, I just added the extra space to the LVM. Worked fine.
LVM is wonderful, isn't it? No only does it allow you to defer crucial issues like partition size and makes it easier to divvy up the file systems, but it makes backups easier with disk-to-disk snapshots, and lets you recover from mistakes such as the wrong partition or file system size. I've used LVM to experiment with other FS such as XFS and BtrFS. As you say, "it works just fine". I don't understand the people who say its too complicated to install. Its no more complicated than conventional for the installer than any other disk partition type. But the OP has another issue: that huge root FS. Among other things I always create a separate /tmp FS and have it mounted nosuid,noexec,nodev http://www.techrepublic.com/blog/opensource/secure-temporary-files-in-linux/... its a simple precaution; it also means that a runaway process that consumes lots (or all) of /tmp can't paralyse the overall system. And if it comes down to that, there's similar reasoning that can be applied to /var, /svc. Compartmentalization and perhaps quota might also apply to /home and others. Perhaps you have a quota on how much mail a user can store. Anyway, an all-in-one FS has many risks and limits flexibility. I realise that for many people (or even myself with this attitude decades ago) there are practical problems, but I've found LVM gets around most of them. -- The more laws and restrictions there are, The poorer people become. The sharper men's weapons, The more trouble in the land. The more ingenious and clever men are, The more strange things happen. The more rules and regulations, The more thieves and robbers. -- The Tao Te Ching -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
As you say, "it works just fine". I don't understand the people who say its too complicated to install. Its no more complicated than conventional for the installer than any other disk partition type.
It makes things a whole lot easier, if you're setting up multiple partitions on a RAID array. My server here has 4 SCSI drives in a RAID array. I set up a RAID5 volume on the entire disks and then used LVM to create the partitions. The alternative would be to create separate RAID5 arrays for each partition, so, if you had 5 partions on a 4 drive array, you'd have to create 20 partitions and they have to match sizes within the RAID arrays. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Anton Aylward
-
James D. Parra
-
James Knott
-
Robert Schweikert