Score:1

Identifying partition creation dates and deleting one

cn flag

I am trying to re-purpose an older laptop. It has two Ubuntu partitions. I only need one, so how can I identify which one is actually in use on the machine? The extra space would then be used to extend the remaining partition and hopefully improve the machine's performance as well. Gparted doesn't give me the info I need. As a corollary: is it actually safe to delete one of the two?

EDIT: I have no idea which is being written to when (say) updating mail or fs. My guess is that if I can locate the one that was updated most recently that is the one **not ** to remove.

parted gives:


Model: ATA TOSHIBA MQ01ABD1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  538MB   537MB   fat32                 boot, esp
 2      538MB   333GB   333GB   ext4
 4      507GB   992GB   485GB   ext4
 3      992GB   1000GB  7724MB  linux-swap(v1)        swap

def - h gives:


Filesystem      Size  Used Avail Use% Mounted on
udev            3.5G     0  3.5G   0% /dev
tmpfs           715M  2.1M  713M   1% /run
/dev/sda4       445G   72G  351G  17% /
tmpfs           3.5G  960K  3.5G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.5G     0  3.5G   0% /sys/fs/cgroup
/dev/loop3       56M   56M     0 100% /snap/core18/2066
/dev/loop5      7.2M  7.2M     0 100% /snap/foobar2000/310
/dev/loop4      128K  128K     0 100% /snap/acrordrdc/8
/dev/loop0       56M   56M     0 100% /snap/core18/2074
/dev/loop7       56M   56M     0 100% /snap/core18/1885
/dev/loop6       98M   98M     0 100% /snap/core/10185
/dev/loop1       98M   98M     0 100% /snap/core/10126
/dev/loop2      9.2M  9.2M     0 100% /snap/canonical-livepatch/95
/dev/loop10     7.3M  7.3M     0 100% /snap/foobar2000/313
/dev/loop9      9.2M  9.2M     0 100% /snap/canonical-livepatch/94
/dev/loop8      162M  162M     0 100% /snap/gnome-3-28-1804/128
/dev/loop11     163M  163M     0 100% /snap/gnome-3-28-1804/145
/dev/loop12     219M  219M     0 100% /snap/gnome-3-34-1804/72
/dev/loop13     2.5M  2.5M     0 100% /snap/gnome-calculator/826
/dev/loop14     2.5M  2.5M     0 100% /snap/gnome-calculator/748
/dev/loop16     6.7M  6.7M     0 100% /snap/gnome-clocks/257
/dev/loop15     219M  219M     0 100% /snap/gnome-3-34-1804/66
/dev/loop19     384K  384K     0 100% /snap/gnome-characters/570
/dev/loop17     1.0M  1.0M     0 100% /snap/gnome-logs/100
/dev/loop20     6.4M  6.4M     0 100% /snap/gnome-clocks/261
/dev/loop18     256M  256M     0 100% /snap/gnome-3-34-1804/36
/dev/loop21     384K  384K     0 100% /snap/gnome-characters/550
/dev/loop23     2.3M  2.3M     0 100% /snap/gnome-system-monitor/145
/dev/loop22     1.0M  1.0M     0 100% /snap/gnome-logs/93
/dev/loop24     2.3M  2.3M     0 100% /snap/gnome-system-monitor/148
/dev/loop27      66M   66M     0 100% /snap/gtk-common-themes/1515
/dev/loop25      55M   55M     0 100% /snap/gtk-common-themes/1502
/dev/loop26      65M   65M     0 100% /snap/gtk-common-themes/1514
/dev/loop28      52M   52M     0 100% /snap/snap-store/518
/dev/loop29      51M   51M     0 100% /snap/snap-store/547
/dev/loop30      33M   33M     0 100% /snap/snapd/12159
/dev/loop31      33M   33M     0 100% /snap/snapd/12398
/dev/loop33     457M  457M     0 100% /snap/wine-platform/125
/dev/loop34      74M   74M     0 100% /snap/wine-platform-3-stable/6
/dev/loop32     457M  457M     0 100% /snap/wine-platform/122
/dev/loop36     216M  216M     0 100% /snap/wine-platform-5-stable/10
/dev/loop35     457M  457M     0 100% /snap/wine-platform/128
/dev/loop38     227M  227M     0 100% /snap/wine-platform-runtime/145
/dev/loop39     232M  232M     0 100% /snap/wine-platform-runtime/179
/dev/loop37     215M  215M     0 100% /snap/wine-platform-5-stable/5
/dev/sda2       306G  3.2G  287G   2% /datadisk
/dev/sda1       511M  7.9M  504M   2% /boot/efi
tmpfs           715M   56K  715M   1% /run/user/1000
/dev/sdb1       115G   67G   48G  59% /media/peter/F232-AE96

guiverc avatar
cn flag
It's common to separate the /home and / directories; so the two partitions could be (1) system partition & (2) data or user directories. You can `mount` them and look, or just boot the system and see what it uses, but if you look at the *file-system table* you'll see how they're mounted.
user535733 avatar
cn flag
[Edit your question](https://askubuntu.com/posts/1349146/edit) to include the complete output of `sudo parted --list` and of `df -h`
Nate T avatar
it flag
Looks to me like they are all in use. sda4 is OS. sda1 is boot. sdb1 is an external drive. sda2 is extra space? the others are system mounts.
Nate T avatar
it flag
sda2 may be a candidate, but id find out what is on it first.
Nate T avatar
it flag
If you run into trouble afterward, see [here](https://askubuntu.com/questions/956680/problems-booting-ubuntu-after-unmounting-or-formating-hdd-data-disk). I only see 1 OS partition.
Nate T avatar
it flag
If sda2 is mounted, you should be able to look inside, in order to see what it contains.
Score:1
jp flag

Open Disks -> Select Your Disk -> Look For 'primary' keyword. This will tell you what is your primary partition.

Look At This Picture

Most of the times its /dev/sda2. You can resize your partition after unmount whole disk. To increase partition size you need free space in your disk.

To know the create date of specific partition, run this code:-

sudo dumpe2fs /dev/sda2 | grep create

here /dev/sda2 is name of your partition device.

To un-mount you can use sudo unmount -v '/' where / is your target location.

Nate T avatar
it flag
Will he/she still be able to wipe if it is unmounted? I do know that wiping first will cause boot issues. I guess gparted can still access it afterward +1.
Nate T avatar
it flag
Although it is a 300 Gig partition. greping 'create' may need piped to 'less'. : )
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.