You are not logged in.

#1 2014-11-14 11:17:09

cezarrangel
Member
Registered: 2013-02-11
Posts: 53

(solved) blkid informs that there are two swap partitions

#blkid
/dev/sda3:UUID=fb5a1a10-7a2f-4fa9-b4c9-0d38e87f1c60 type swap
/dev/sdb3:UUID=6271c1d8-f255-45d6-bd64-92dd70ce8193  type swap

The real swap is /dev/sdb3. /dev/sda3, in reality, is a /home (ext4) partition but it cannot be mounted as the system recognizes it as swap. How can I fix it? Thanks

Last edited by cezarrangel (2014-11-17 12:06:06)

Offline

#2 2014-11-14 11:50:58

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: (solved) blkid informs that there are two swap partitions

Try another tool, and if that reports /dev/sda3 you probably mistyped /dev/sdb3 and formated /dev/sda3 as swap.

Offline

#3 2014-11-14 19:09:01

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: (solved) blkid informs that there are two swap partitions

It is also possible that the OP "turned on" the swap option using the "swapon" command and directed that line to sda3, isn't it?  Would that command just tell the kernel that sda3 is a swap partition but leave the data on the /home partition intact?

Offline

#4 2014-11-15 03:52:49

cezarrangel
Member
Registered: 2013-02-11
Posts: 53

Re: (solved) blkid informs that there are two swap partitions

Thanks bstaletic and moonswan:
Maybe that is what is happening MoonSwan. here is the result of #fdisk -l. it seems you are right. According to it, /dev/sda3 is not swap. But in this case, how can I fix it? to change sda3 from swap to ext4 partition as it really is?

[root@arch cezar]# fdisk -l

Disco /dev/sda: 465,8 GiB, 500107862016 bytes, 976773168 setores
Unidades: setor de 1 * 512 = 512 bytes
Tamanho de setor (lógico/físico): 512 bytes / 512 bytes
Tamanho E/S (mínimo/ótimo): 512 bytes / 512 bytes
Tipo de rótulo do disco: dos
Identificador do disco: 0x7df3d782

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 613730303 613728256 292,7G  7 HPFS/NTFS/exFAT
/dev/sda2       613730304 762170903 148440600  70,8G 83 Linux
/dev/sda3       762170904 976773167 214602264 102,3G 83 Linux

Disco /dev/sdb: 232,9 GiB, 250059350016 bytes, 488397168 setores
Unidades: setor de 1 * 512 = 512 bytes
Tamanho de setor (lógico/físico): 512 bytes / 512 bytes
Tamanho E/S (mínimo/ótimo): 512 bytes / 512 bytes
Tipo de rótulo do disco: dos
Identificador do disco: 0x94110a5e

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdb1  *           63 167975639 167975577  80,1G 83 Linux
/dev/sdb2       167975640 484488269 316512630 150,9G 83 Linux
/dev/sdb3       484488270 488397167   3908898   1,9G 82 Linux swap / Solaris

Disco /dev/sdc: 931,5 GiB, 1000194400256 bytes, 1953504688 setores
Unidades: setor de 1 * 512 = 512 bytes
Tamanho de setor (lógico/físico): 512 bytes / 512 bytes
Tamanho E/S (mínimo/ótimo): 512 bytes / 512 bytes
Tipo de rótulo do disco: dos
Identificador do disco: 0x454db989

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdc1  *     2048 1953503231 1953501184 931,5G  7 HPFS/NTFS/exFAT

Disco /dev/sdd: 931,5 GiB, 1000194400256 bytes, 1953504688 setores
Unidades: setor de 1 * 512 = 512 bytes
Tamanho de setor (lógico/físico): 512 bytes / 512 bytes                                                                 
Tamanho E/S (mínimo/ótimo): 512 bytes / 512 bytes                                                                       
Tipo de rótulo do disco: dos                                                                                             
Identificador do disco: 0x34809cdb                                                                                       
                                                                                                                         
Device     Boot Start        End    Sectors   Size Id Type                                                               
/dev/sdd1  *       64 1953503999 1953503936 931,5G  7 HPFS/NTFS/exFAT

besides, this is the result of #cfdisk /dev/sda. But I cannot find /dev/sda3

/dev/sda1        *                     2048       613730303       613728256       292,7G       7 HPFS/NTFS/exFAT   
/dev/sda2                         613730304       762170903       148440600        70,8G      83 Linux
    /dev/sda3                         762170904       976773167       214602264       102,3G      83 Linux

besides:

[root@arch cezar]# fdisk -l | grep sda
Disco /dev/sda: 465,8 GiB, 500107862016 bytes, 976773168 setores
/dev/sda1  *         2048 613730303 613728256 292,7G  7 HPFS/NTFS/exFAT
/dev/sda2       613730304 762170903 148440600  70,8G 83 Linux
/dev/sda3       762170904 976773167 214602264 102,3G 83 Linux
[root@arch cezar]#

and:

[root@arch ~]# lsblk -f
NAME   FSTYPE LABEL   UUID                                 MOUNTPOINT
sda                                                       
├─sda1 ntfs           9C7AC58F7AC5671C                     /mnt/win7
├─sda2 ext4           f42bce9b-4e25-4fd1-9b6b-8cd5c22134c6 /mnt/slack
└─sda3 swap           fb5a1a10-7a2f-4fa9-b4c9-0d38e87f1c60
sdb                                                       
├─sdb1 ext4           6ea90d2a-f445-4dc2-88ae-cdedcd2be530 /
├─sdb2 ext4           6b1c3042-97aa-46b6-a6cb-b2b9837748a9 /home
└─sdb3 swap           6271c1d8-f255-45d6-bd64-92dd70ce8193 [SWAP]
sdc                                                       
└─sdc1 ntfs           083818523818415C                     /mnt/samsung2
sdd                                                       
└─sdd1 ntfs   SAMSUNG 0E604C85604C758D                     /mnt/samsung1
sr0                                                       
[root@arch ~]#

so how can I be sure the /home data at /dev/sda2 is instact?

Last edited by cezarrangel (2014-11-15 23:29:52)

Offline

#5 2014-11-16 22:17:51

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: (solved) blkid informs that there are two swap partitions

Try:

swapoff /dev/sda3
mount /dev/sda3 /mtn
ls /mnt

If that looks like your home partition, the data is intact. Unfortunately I dought it.

Offline

#6 2014-11-17 12:05:35

cezarrangel
Member
Registered: 2013-02-11
Posts: 53

Re: (solved) blkid informs that there are two swap partitions

I thank you Bstaletic for your attention. Unfortunately my home partition data has been destroyed. Nevertheless, I think the thread has had a good solution as I have had the opportunity of remembering that the command line is very powerful and that you have to deal with it with much attention and think before you execute any command in order to avoid an unpleasant result as I have described. In the end, I had to reinstall.

Last edited by cezarrangel (2014-11-17 12:09:42)

Offline

Board footer

Powered by FluxBB